473,320 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CGIHTTPServer always return 200, no redirects (302) possible

Hi,

The CGIHTTPServer returns

self.send_response(200, "Script output follows")

before it starts the cgi process. This means
you cannot set the status header to 302 for
a redirect.

I don't see a easy and portable way to fix this.

CGIHTTPServer.py:
http://cvs.sourceforge.net/viewcvs.p...1.36&view=auto

Maybe a little note in the docs would save some
people 30-60 minutes of their sparetime.

Thomas

Jul 18 '05 #1
1 2481
Thomas Guettler wrote:
Hi,

The CGIHTTPServer returns

self.send_response(200, "Script output follows")

before it starts the cgi process. This means
you cannot set the status header to 302 for
a redirect.

I don't see a easy and portable way to fix this.

CGIHTTPServer.py:
http://cvs.sourceforge.net/viewcvs.p...1.36&view=auto

Maybe a little note in the docs would save some
people 30-60 minutes of their sparetime.

Thomas

If you'd spent the time it took to post your message posting a doc patch
instead then you'd have saved us boith some time ;-)

regards
Steve
--
http://www.holdenweb.com
http://pydish.holdenweb.com
Holden Web LLC +1 800 494 3119
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William D. Gill | last post by:
I use a notebook (win 98) because of its portability. Unfortunately it is very slow. When I try to develop and test python cgi scripts I use Xitami as a local server, but with python, Xitami, and...
1
by: Sullivan | last post by:
When I run a CGI script (Python) with Python's CGIHTTPServer, it should run with the UID of the user 'nobody' (as the documentation says). But if I let the CGI script e.g. create a file, it...
1
by: Johann Blake | last post by:
Hi, I have come across a rather bizarre problem using the TcpClient to retrieve a web page. I use the TcpClient in conjunction with a StreamWriter to write a HTTP request to the web site. The...
1
by: craigkenisston | last post by:
Hi, I recently read a lot about a topic called page hijacking. It seems that you can steal page rank from search engines while doing a redirect. I reminded I had a code in some pages, where...
4
by: Stan Canepa | last post by:
I have a web app that works fine on the development machine and on several servers running Win2k IIS 5 and Windows2003 IIS 6. But I am having an issue on one particular erver running Win2k IIS 5,...
1
by: ThunderMusic | last post by:
Hi, I want to use a class (if possible other than Socket) which one I could call a custom handler and receive the redirect code it sends... Actually, I tried using the WebClient class, but when...
1
by: Ronald Green | last post by:
Hi all, I'm trying to write a js function that uses XMLHttpRequest against a web application. Sometimes I get a 302, and the XMLHttpRequest automatically redirects. What I want to...
4
by: Fernando Rodriguez | last post by:
Hi, I'musing urllib to download pages from a site. How can I detect if a given url is being redirected somewhere else? I want to avoid this, is it possible? Thanks in advance!
1
by: mpc | last post by:
hello, how does one run a PHP page with a python webserver? Lets say i have a simple python web server running /path/webserver.py #!/usr/bin/env python from BaseHTTPServer import HTTPServer...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.