When POSTing from v8cgi to node.js on Linux the request is ignored. It turn
out that the reason is because the request is padded with two extra CRLF pairs
(http.js 306-315)
/* build request */
var data = this.method + " " + url + " HTTP/1.1\r\n";
for (var p in this._headers) {
data += p+": "+this._headers[p]+"\r\n";
}
data += "\r\n";
if (post) {
data += post+"\r\n"; // <-- extra padding
data += "\r\n"; // <-- extra padding
}
This works on Windows which seems to ignore the extra bytes after the content
length but Wireshark isn't happy with these packets and complains "continuation
or non-http traffic"
Deleting these extra bytes from http.js restores the expected operation on
Linux and doesn't seem to break anything on Windows.
Original issue reported on code.google.com by andy.bis...@gmail.com on 8 Dec 2011 at 10:56
Original issue reported on code.google.com by
andy.bis...@gmail.com
on 8 Dec 2011 at 10:56