From 22e59afda3d0e9ef4ccee181aeb6374ec8b395d6 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 19 Oct 2012 08:52:01 +0000
Subject: [PATCH] Fix '79s arbitrary fuckupery.

From RFC2616 section 2.2 (Basic Rules)

   HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
   protocol elements except the entity-body
---
 exec/load/http.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/exec/load/http.js b/exec/load/http.js
index 54649320b9..081c493f3f 100644
--- a/exec/load/http.js
+++ b/exec/load/http.js
@@ -80,13 +80,13 @@ function HTTPRequest(username,password)
 			throw("Unable to connect");
 		if(this.url.scheme=='https')
 			this.sock.ssl_session=true;
-		if(!this.sock.send(this.request+"\n"))
+		if(!this.sock.send(this.request+"\r\n"))
 			throw("Unable to send request: " + this.request);
 		for(i in this.request_headers) {
-			if(!this.sock.send(this.request_headers[i]+"\n"))
+			if(!this.sock.send(this.request_headers[i]+"\r\n"))
 				throw("Unable to send headers");
 		}
-		if(!this.sock.send("\n"))
+		if(!this.sock.send("\r\n"))
 			throw("Unable to terminate headers");
 		if(this.body != undefined) {
 			if(!this.sock.send(this.body))
@@ -140,7 +140,7 @@ function HTTPRequest(username,password)
 		}
 		if(this.username && this.password) {
 			var auth = base64_encode(this.username + ":" + this.password);
-			this.request_headers.push("Authorization: Basic " + auth + "\n");
+			this.request_headers.push("Authorization: Basic " + auth + "\r\n");
 		}
 	}
 	
-- 
GitLab