projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ef5c99
)
HTTP Server: Close 1.0 connections properly.
author
Ryan
<ry@tinyclouds.org>
Wed, 20 May 2009 08:28:10 +0000
(10:28 +0200)
committer
Ryan
<ry@tinyclouds.org>
Wed, 20 May 2009 08:28:10 +0000
(10:28 +0200)
src/http.js
patch
|
blob
|
history
test-http_simple.js
patch
|
blob
|
history
diff --git
a/src/http.js
b/src/http.js
index
c1b51a8
..
1415d1a
100644
(file)
--- a/
src/http.js
+++ b/
src/http.js
@@
-176,7
+176,7
@@
node.http.ServerResponse = function (connection, responses) {
if (connection_expression.exec(field)) {
sent_connection_header = true;
if (close_expression.exec(value))
-
connection_close
= true;
+
this.closeOnFinish
= true;
} else if (transfer_encoding_expression.exec(field)) {
sent_transfer_encoding_header = true;
if (chunk_expression.exec(value))
@@
-191,7
+191,7
@@
node.http.ServerResponse = function (connection, responses) {
if (this.should_keep_alive) {
header += "Connection: keep-alive\r\n";
} else {
-
connection_close
= true;
+
this.closeOnFinish
= true;
header += "Connection: close\r\n";
}
}
diff --git
a/test-http_simple.js
b/test-http_simple.js
index
30dfd40
..
2e3bbb3
100644
(file)
--- a/
test-http_simple.js
+++ b/
test-http_simple.js
@@
-10,7
+10,7
@@
new node.http.Server(function (req, res) {
var arg = commands[2];
var status = 200;
- p(req.headers);
+
//
p(req.headers);
if (command == "bytes") {
var n = parseInt(arg, 10)