"Sullivan WxPyQtKinter" <[EMAIL PROTECTED]> wrote: > >title:Python CGI problem: correct result, but incorrect browser >response. > >In one of my CGI program,named 'login.py', the script return a HEADER >to web browser: > >Set-Cookie: sessionID=LAABUQLUCZIQJTZDWTFE; >Set-Cookie: username=testuser; >Status:302 >Location:edit.py >(blank line) > >but the IE prompted to let me choose to save the 'login.py'. When I >save it, the file is just the header. That means the IE failed to parse >the header. My IE has already enabled cookie read and write. I also >tried Firefox, but the result is the same. How does this happen?
Perhaps you should show us the script. Is it possible that you have already printed a "Content-Type" header and blank line before these headers, or perhaps just a blank line? Remember that this will fail: print """ Set-Cookie: sessionID=LAABUQLUCZIQJTZDWTFE; Set-Cookie: username=testuser; Status:302 Location:edit.py """ because you get a blank line first, which terminates the headers. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list