Unset cookies before 302 redirect with phpLsapi

Discussion in 'Bug Reports' started by IO, Sep 27, 2005.

  1. IO

    IO New Member

    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.
  2. mistwang

    mistwang LiteSpeed Staff

    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.
  3. IO

    IO New Member

    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
  4. mistwang

    mistwang LiteSpeed Staff

  5. IO

    IO New Member

    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:

Share This Page