.htaccess RewriteRule [cookie] sends SetCookie instead of expected Set-Cookie header.

Discussion in 'Bug Reports' started by mayhemer, Feb 20, 2013.

  1. mayhemer

    mayhemer New Member

    LiteSpeed version 4.2.2



    RewriteEngine On
    RewriteBase /
    RewriteCond %{QUERY_STRING} .*TEST=.*
    RewriteRule ^.* /some-existing-dir/ [cookie=TEST_COOKIE:true:.your-domiain.com:3600:/,R,L]

    Access http://your-domain.com/?TEST=

    TEST_COOKIE not set on the client

    TEST_COOKIE set on the client

    [cookie=] command doesn't send the correct header name. Response contains SetCookie: TEST_COOKIE; ... instead of Set-Cookie: TEST_COOKIE; ...

    SetCookie is not recognized by browsers (at least not by Firefox), which is an expected behavior.

    Change "SetCookie" header name to "Set-Cookie" for the cookie rewrite rule command.
  2. webizen

    webizen Well-Known Member

    Thanks for the feedback. The fix will be in the next 4.2.2 build.
    Last edited: Feb 21, 2013
  3. webizen

    webizen Well-Known Member

    new 4.2.2 build (with the fix) is available now.

Share This Page