Questions tagged [cgihttpserver]

CGIHTTPServer is a simple HTTP server that can call external scripts through the common gateway interface (CGI).

CGIHTTPServer is a simple HTTP server that can call external scripts through the common gateway interface (CGI).

16 questions
6
votes
3 answers

Python CGIHTTPServer Default Directories

I've got the following minimal code for a CGI-handling HTTP server, derived from several examples on the inner-tubes: #!/usr/bin/env python import BaseHTTPServer import CGIHTTPServer import cgitb; cgitb.enable() # Error reporting server =…
charleslparker
  • 1,904
  • 1
  • 21
  • 31
5
votes
1 answer

Python CGIHTTPServer access denied on OS X

I get this error while trying to trigger a Python script inside CGI from the browser; Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/CGIHTTPServer.py", line 251, in run_cgi …
user1467267
4
votes
1 answer

How to get javascript to parse json.gz file on browser

In a nutshell - Essentially I am trying to create a Heavy-client & Light-Server Single Page application. I am GET-ing a compressed JSON data file via a simple HTML script tag.
anu
  • 1,017
  • 1
  • 19
  • 36
3
votes
2 answers

Attaching CGI python script to PyCharm debugger?

I'm using Community Edition PyCharm 4.5.1 and I'm developing CGI python scripts. My needs are to start the debugger and attach the script (then break to the first breakpoint) once it is called by my HTTP client. I don't know if I can, I hope.…
dom_beau
  • 2,437
  • 3
  • 30
  • 59
1
vote
0 answers

Python BaseHTTPServer CGIHTTPServer

I am trying to implement a simple HTTP server with a form enabling the user to upload a file. I have got three code files: - A python script creating the webserver with BaseHTTPServer and CGIHTTPServer - A html file with my form - Another python…
Baptiste
  • 25
  • 1
  • 10
1
vote
2 answers

Python CGIHTTPServer set file types for dynamic vs static pages

This question (Python CGIHTTPServer Default Directories) details how to set paths for location of cgi-bin files for Python CGIHTTPServer. From testing this, it seems that you cannot mix .py and .html files in the same folder: in cgi-bin it processes…
havlock
  • 662
  • 9
  • 16
1
vote
1 answer

Error retrieving data from sqlite3 through CGI

I am trying to build a very simple login page, which asks the user for his register_no, username and password. And when he presses the submit button. I am trying to check whether it is an existing user or a new user and display a message…
Tasdik Rahman
  • 2,160
  • 1
  • 25
  • 37
1
vote
1 answer

CGIHTTPRequestHandler giving an error

CGIHTTPRequestHandler gives an import error saying no such module available. import CGIHTTPServer import BaseHTTPServer class Handler(CGIHTTPServer.CGIHTTPRequestHandler): cgi_directories = ["/cgi"] PORT = 8000 httpd =…
Vinod K
  • 1,885
  • 11
  • 35
  • 45
0
votes
1 answer

Does Python CGIHTTPServer decode plus sign(+) in URL into blank space?

In my html, I have below form:
Plain Text:
After inputing "aaa…
Qiu Yangfan
  • 871
  • 11
  • 25
0
votes
0 answers

Download manager does not downloads files from raspberry pi device to mobile device

I am working on a app that connects to Raspberry pi device through mobile hot spot and on request it downloads the file from pi device to mobile storage. I have used various methods as suggested on google but no result.currently i am using download…
0
votes
1 answer

Jenkins badge does not show when embedded in page served over http

I want to show Jenkins status badges on a locally hosted webpage served with CGIHTTPServer from python 2.7. When I call the URL of the badge directly, it is shown correctly, but when embedded in the webpage, only a placeholder is shown. I assume…
kutschkem
  • 7,826
  • 3
  • 21
  • 56
0
votes
1 answer

redirecting python -m CGIHTTPserver 8080 to /dev/null

The standard > /dev/null and >> /dev/null don't work when a computer sends a GET to the task. eg: pi@raspberrypi:~/server $ python -m CGIHTTPServer 8080 & results in 192.168.0.109 - - [26/Sep/2016 23:14:48] "GET /cgi-bin/DS1822remote.py HTTP/1.1"…
jcdammeyer
  • 43
  • 1
  • 1
  • 3
0
votes
1 answer

Access Request Parameters in invoked script of Python CGIHTTPServer

A python script of mine is successfully invoked from CGIHTTPServer. How may we access the request parameters within that script? I have done a number of rounds of googling on this topic. I am not in a position to do mod-cgi on an Apache server for…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
0
votes
1 answer

How to pre-process requests before handling them using BaseHTTPServer?

I want to deny access to certain paths on my server, which is using the CGIHttpServer module. I've come up with a whitelist that I'll need to check on every request, but my problem is how to implement it. I tried overriding the handle_one_request…
rvighne
  • 20,755
  • 11
  • 51
  • 73
0
votes
2 answers

Python CGI and json dumps

I'm using python for a light web application based on BaseHTTPServer and CGIHTTPServer. I have a little issue with an ajax call, which retrieves a dictionary to fill a select widget. Being "list" the select ID this is the javascript code to…
codeJack
  • 2,423
  • 5
  • 24
  • 31
1
2