cgi

How can I programmatically get the image on this page?

The URL http://www.fourmilab.ch/cgi-bin/Earth shows a live map of the Earth. If I issue this URL in my browser (FF), the image shows up just fine. But when I try 'wget' to fetch the same page, I fail! Here's what I tried first: wget -p http://www.fourmilab.ch/cgi-bin/Earth Thinking, that probably all other form fields are required ...

Apache CGI redirect to absolute URI doesn't work

I have Apache 2.2.13 running in console mode on Windows. I have made an executable that handles requests. In a certain case, when it detects a URL pointing to a directory but has not trailing slash, it tries to redirect to the same URL with the missing slash appended. The exit-code is set to 301. Strangely enough, having this in the resp...

http POST with asp.net

I've an annoying ASP.NET problem: I have a Perl script (see below), which gets the form_info variable. Now unfortunately, it's http POST, and not http GET, so Request.Querystring doesn't work... Now I have to replace the Perl Script with an asp.net page/app, but my problem is that I cannot process the string form_info when I don't have...

How can I improve Moose performance in non-persistent CGI processes?

Moose is a fantastic object framework. The trouble is that, taken together with its dependencies, it's very big. Our profiling indicates that on our platform, simply loading Moose will incur a 5-6 second overhead on non-persistent CGI application scripts. That's just not acceptable for these one-off applications. By contrast, when we...

Python CGI returning an http status code, such as 403?

Hi, How can my python cgi return a specific http status code, such as 403 or 418? I tried the obvious (print "Status:403 Forbidden") but it doesn't work. ...

[WEB-CGI-C++] I want to start developing CGI, but I am very new at this.

Hi I want to develop my next web project in C++ as FastCGI but I don't know how to start and google wasn't very friendly about this. I really don't know much about fastCGI or others libraries that makes cgi persistent... Tried to read some stuff, but it seems to be used along Linux with all those .configure Makefiles etc... can anyone ...

Detecting the http request type (GET, HEAD, etc) from a python cgi

Hi, How can I find out the http request my python cgi received? I need different behaviors for HEAD and GET. Thanks! ...

Time out error while creating cgi.FieldStorage object

Hey, any idea about what is the timeout error which I am getting here: Error trace: File "/array/purato/python2.6/lib/python2.6/site-packages/cherrypy/_cprequest.py", line 606, in respond cherrypy.response.body = self.handler() ...

What python web frameworks work well with CGI (e.g. on nearlyfreespeech.net)?

From nearlyfreespeech's website, they state that the following don't work well: mod_python Web application frameworks that depend on persistent processes, including: Ruby On Rails, Django, Zope, and others (some of these will run under CGI, but will run slowly and are suitable only for development purposes) Are there any Python web ...

CGI:Session set session key

Hi, I am new to Perl and have been asked to incorporate a perl site into an existing Ajax site. The existing site already has session management and a cookie. What I want is to be able to set the session key (from the first login) as the session to be used by the CGI:session. that way both sessions can use the same cookie and the sam...

How do I create CGI scripts with Perl?

I am creating a website and done with some HTML stuff, but I am thinking to create site using CGI and Perl scripting. I don't have much idea on CGI scripting. Can anyone please suggest me how to create a CGI script and how to create web pages with that? ...

Which version of Rebol 2 do I use on CentOS?

Can somebody please tell me which version of Rebol 2 to use on CentOS? There are a couple of Linux versions on this page: http://www.rebol.com/platforms.html I'm going to have a go at this tutorial: Quick and Easy CGI - A Beginner's Tutorial and Guide By Carl Sassenrath. Thanks ...

Python CGI FieldStorage Too Slow

Hi Everyone, I have recently been learning python and have run into a problem when uploading files larger than 1-2mb with cgi. I am building a file uploader with a progress bar that updates with ajax. Everything is working great for smaller files and for larger files once it gets past the line: form = cgi.FieldStorage() I think ...

How to improve performance of python cgi that reads a big file and returns it as a download?

I have this python cgi script that checks if it hasn't been accessed to many times from the same IP, and if everything is ok, reads a big file form disk (11MB) and then returns it as a download. It works,but performance sucks. The bottleneck seems to be reading this huge file over and over: def download_demo(): """ Returns the...

Is cgi dead?

Ok, let's put it in a more mildly: Is cgi (common gateway interface) legacy? yes? no? Under what circumstances would a project starting today (one that does noot have to interact with legacy systems or libraries) use cgi? ...

internal server error (500) in simple cgi script

I am trying to run a simple cgi script after configuring my server. My script looks like this: print "Content-type: text/html" print print "<html><head><title>CGI</title></head>" print "<body>" print "hello cgi" print "</body>" print "</html>" When I go to my scripts url http://127.0.0.1/~flybywire/cgi-bin/main.py I get: Internal Se...

CGI program that outputs a gif image, and other non-HTML content

I am writing a CGI program (in C++) that will output the following data in its response: (inline) GIF image (i.e. octect stream) JSON Javascript XHTML All the CGI examples I have seen are "trivial" and return only one data type. How can I return a response that contains all of the above ? ...

CGI and PHP why? and when?

one day I chat with a experienced programmer about devloping file hosting system, he tell me it's need to use cgi in your program to work in best way. so what is cgi ? whay to use? and when? ...

How can I get the browser's screen height?

Hello Does anyone know how to get the screen height in a Perl CGI script? I know that Perl is a server-side language but is there any way to get the screen height (pixels) of the users screen? Thanks ...

What does a HTTP Request that references a file in the middle of the path?

I'm writting a HTTP server and when i tried the Serendipity PHP Blog i get requests from the browser like this one: GET /serendipity_admin.php/templates/default/admin/pluginmanager.css HTTP/1.1 The "/serendipity_admin.php" file does exist so the "/serendipity_admin.php/templates/default/admin/pluginmanager.css" obviously must fail. W...