Skip to content
Snippets Groups Projects
Commit 828671cd authored by echicken's avatar echicken
Browse files

Surcease from sending additional header-termination newline (a blank line...

Surcease from sending additional header-termination newline (a blank line already appears after the headers.)
parent 3f8c1be8
No related branches found
No related tags found
No related merge requests found
......@@ -74,8 +74,6 @@ function HTTPRequest(username,password)
};
this.SendRequest=function() {
var i;
if((this.sock=new Socket(SOCK_STREAM))==null)
throw("Unable to create socket");
if(!this.sock.connect(this.url.host, this.url.port?this.url.port:(this.url.scheme=='http'?80:443)))
......@@ -88,8 +86,9 @@ function HTTPRequest(username,password)
if(!this.sock.send(this.request_headers[i]+"\n"))
throw("Unable to send headers");
}
if(!this.sock.send("\n"))
throw("Unable to terminate headers");
// This termination is apparently unnecessary - blank line already appears after headers.
// if(!this.sock.send("\n"))
// throw("Unable to terminate headers");
if(this.body != undefined) {
if(!this.sock.send(this.body))
throw("Unable to send body");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment