ClosestStorm / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Can't set two cookies at a time #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
this script can reproduce the problem

<code>

//response._output('\r\n');
response.header({
    'x-test-0': '456'
});
response.cookie('cookie1', 'test1');
response.cookie('cookie2', 'test2');

response.header({
    'x-test': '123'
});

response.header({
    'xx-test2': '567'
});

response.write('<pre>');
response.write(Util.serialize(request.cookie, true));
response.write('</pre>');

</code>

Only cookie2 is defined in server response headers. Output function somehow
eats all 'Set-Cookie' and response back only last one. If uncomment first
line headers output will break and you can see that
HTTP.ServerResponse._output function receives all cookies data.

The funniest thing is x-test-0 header is present in responce. Here is the
Firebug output:

x-test-0    456
Set-Cookie  cookie2=test2
x-test  123
xx-test2    567

Original issue reported on code.google.com by neoco...@gmail.com on 25 Nov 2009 at 3:15

GoogleCodeExporter commented 9 years ago
I found the problem. here's the path 
http://dl.dropbox.com/u/1607697/mod_v8cgi.cc.2.patch

Original comment by neoco...@gmail.com on 25 Nov 2009 at 3:47

GoogleCodeExporter commented 9 years ago
Acknowledged, will commit patch soon.

Original comment by ondrej.zara on 25 Nov 2009 at 4:41

GoogleCodeExporter commented 9 years ago
Commited in r685, thanks!

Original comment by ondrej.zara on 25 Nov 2009 at 8:10