Unset cookies before 302 redirect with phpLsapi

IO

Active Member
#1
I use a php script to unset some cookies (for log-out).
At the end of the script there is a header('Location: ...);

It work fine with phpFcgi but the cookies are randomly unset with phpLsapi.
 

mistwang

LiteSpeed Staff
#2
Thank you for the bug report.

Does the unset always work if no Location header?
Can this be tested with wget or lynx?

It will be great if you can provide a test script.
 

IO

Active Member
#3
I make some tests, the cookies seem to be always sent, but there is a difference between the headers :

phpFcgi (Always Work) :
Code:
 1 HTTP/1.0 302 Found
 2 Content-type: text/html
 3 Set-Cookie: one=deleted; expires=Mon, 27 Sep 2004 01:24:25 GMT; path=/
 4 Set-Cookie: two=deleted; expires=Mon, 27 Sep 2004 01:24:25 GMT; path=/
 5 Location: http://www.redirect.com/
 6 Content-Encoding: gzip
 7 Vary: Accept-Encoding
 8 Content-Length: 20
 9 Server: LiteSpeed
10 Date: Tue, 27 Sep 2005 01:24:25 GMT
11 Connection: close
phpLsapi (Work Randomly) :
Code:
 1 HTTP/1.0 302 Found
 2 Set-Cookie: one=deleted; expires=Mon, 27 Sep 2004 01:23:05 GMT; path=/
 3 Set-Cookie: two=deleted; expires=Mon, 27 Sep 2004 01:23:05 GMT; path=/
 4 Location: http://www.redirect.com/
 5 Content-type: text/html
 6 Content-Encoding: gzip
 7 Vary: Accept-Encoding
 8 Content-Length: 20
 9 Server: LiteSpeed
10 Date: Tue, 27 Sep 2005 01:23:06 GMT
11 Connection: close
I don't think the place of Content-type: text/html is important :?
And I can't remove it (it's not necessary for a redirect) because it is defined in php.ini
 

IO

Active Member
#5
It work nice with 1.5 patch.

There is also no error "corrupted double-linked list with RHEL4" with the new patch and lsws 2.1.2

Good job :!: :wink:
 
Top