ClientRequest and ClientResponse Problem

32 views
Skip to first unread message

puritys

unread,
Aug 7, 2012, 12:26:20 PM8/7/12
to te...@googlegroups.com
============ 1.============= 
In file :lib/http.js
code Line 275 : arr.push(escape(p)+"="+escape(this.cookie[p]));

escape(this.cookie[p]))  has problem.
The standard http protocol  ,  cookie value don't need to escape.
I write a teajs code that like php curl.
When the code execute , It will be failed . If the cookie value have some symbols ( maybe:  key=val!#@=1val2=; ).

============ 2.=============
In file :lib/http.js 
function  ClientResponse
line 420 :   this._headers[parts[1].toUpperCase()] = parts[2];

This line will overwrite header (Set-Cookie) . If the server site code like the following code.
<?php
setcookie("key1","a");
setcookie("key2","b");
?>

The right response will get two Set-Cookie data.
But the real response  is missing  first cookie data.
[key1] will be overwritten by [key2].








Reply all
Reply to author
Forward
0 new messages