Package: cherokee
Version: 0.5.5.dfsg-2

First day I use cherokee, so it's possible I did something wrong...

I have a cgi-bin script I've been working on - it generates thumbnail
galleries from some picture directory on my hard drive. Sometimes the CGI
script generates a Location: header for a client redirect response,
as per section 6.2.3 of RFC 3875.

The script is currently in /var/www/pygall/devel/gen2/pygall.py.
cherokee.conf includes this:
Request "^/pygall/.*\.cgi$" {
        Handler cgi
}

I generated a request as follows:

cherokee% telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET http://localhost/pygall/devel/gen2/pygall.cgi HTTP/1.1

HTTP/1.1 200 OK
Connection: Close
Date: Mon, 18 Aug 2008 06:22:06 GMT--8
Server: Cherokee
Location: http://localhost/pygall/devel/gen2/pygall.cgi/

Connection closed by foreign host.

Cherokee's answer is wrong here - it should have used the 302 status code,
not 200. Because cherokee did not follow the RFC here, web clients do not
redirect to the desired location.

(The output of my CGI script was the Location line with two final newlines).


Trying to see if I could figure out a workaround, I modified my script so that
it adds an additional line 'Status: 302 Found' after the location header.
But now cherokee crashes when processing this request:

% telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET http://localhost/pygall/devel/gen2/pygall.cgi HTTP/1.1

Connection closed by foreign host.
% ps auxw|grep -i cherokee
walken   28997  0.0  0.0   2736   564 pts/4    S+   06:27   0:00 grep -i 
cherokee


This seems to happen reproduceably here.

Hope this helps. I can send the full contents of my /etc/cherokee and my
pygall.py script if desired.

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to