LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > .htaccess RewriteRule [cookie] sends SetCookie instead of expected Set-Cookie header.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2013, 04:38 AM
mayhemer mayhemer is offline
New Member
 
Join Date: Feb 2013
Posts: 1
Default .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.
Reply With Quote
  #2  
Old 02-20-2013, 12:51 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Thanks for the feedback. The fix will be in the next 4.2.2 build.

Last edited by webizen; 02-21-2013 at 03:00 PM..
Reply With Quote
  #3  
Old 02-21-2013, 03:01 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
new 4.2.2 build (with the fix) is available now.
Reply With Quote
Reply

Tags
cookie, litespeed, rewrite rules, set-cookie

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:35 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.