Permalink
Browse files

Patches refresh

  • Loading branch information...
1 parent 1f84131 commit ac6acd464f49fb20cf189aecd18e0dd644e09353 @zimbatm committed Dec 27, 2009
View
35 patches/0001-http-ServerResponse.prototype.sendHeader-change.patch
@@ -0,0 +1,35 @@
+From ee4810cad5f4a05f345fce407ecfd574f4cfc9cd Mon Sep 17 00:00:00 2001
+From: Jonas Pfenniger <jonas@pfenniger.name>
+Date: Sun, 27 Dec 2009 01:07:16 +0100
+Subject: [PATCH 1/2] [http] ServerResponse.prototype.sendHeader change
+
+Now accepting a two-sized array to choose your own reason string.
+
+(Needed by WebSocket, apparently the reasons is not free to choose)
+---
+ lib/http.js | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/lib/http.js b/lib/http.js
+index abb472e..d14d546 100644
+--- a/lib/http.js
++++ b/lib/http.js
+@@ -261,7 +261,14 @@ sys.inherits(ServerResponse, OutgoingMessage);
+ exports.ServerResponse = ServerResponse;
+
+ ServerResponse.prototype.sendHeader = function (statusCode, headers) {
+- var reason = STATUS_CODES[statusCode] || "unknown";
++ var reason;
++ if (statusCode.splice) {
++ reason = statusCode[1];
++ statusCode = statusCode[0];
++ } else {
++ reason = STATUS_CODES[statusCode] || "unknown";
++ }
++
+ var status_line = "HTTP/1.1 " + statusCode.toString() + " " + reason + CRLF;
+ this.sendHeaderLines(status_line, headers);
+ };
+--
+1.6.6
+
View
7 ...od-to-http.Request.prototype.connec.patch → ...PConnection-now-has-a-hijack-method.patch
@@ -1,8 +1,11 @@
-From 37a975b92da63d9141690d379adfeb827dbd097c Mon Sep 17 00:00:00 2001
+From aa7bbd6f4881ccd00748c177eb3af98c3034cb01 Mon Sep 17 00:00:00 2001
From: Pfenniger Jonas <zimbatm@Guybrush.local>
Date: Fri, 25 Dec 2009 23:51:00 +0100
-Subject: [PATCH] Added hijack method to http.Request.prototype.connection
+Subject: [PATCH 2/2] [http] HTTPConnection now has a hijack() method.
+This is used by the WebSocket server implementation to change the rules
+of HTTP connection. Virtually taking over the connection by hijack()ing
+it. Yarrrrrrr !
---
src/node_http.cc | 14 ++++++++++++++
src/node_http.h | 8 ++++++++

0 comments on commit ac6acd4

Please sign in to comment.