LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Bug Reports (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=9)
-   -   .htaccess RewriteRule [cookie] sends SetCookie instead of expected Set-Cookie header. (http://www.litespeedtech.com/support/forum/showthread.php?t=6697)

mayhemer 02-20-2013 04:38 AM

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

STR:

.htaccess:

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=

Actual:
TEST_COOKIE not set on the client

Expected:
TEST_COOKIE set on the client

Cause:
[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.

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

webizen 02-20-2013 12:51 PM

Thanks for the feedback. The fix will be in the next 4.2.2 build.

webizen 02-21-2013 03:01 PM

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


All times are GMT -7. The time now is 10:08 PM.