Ben Noordhuis
359a65a6db
http: emit Error object after .abort()
It was emitting the net.Socket object due to misuse of the arguments object.
Fixes #1399 .
13 years ago
koichik
8a729270c1
fix for --harmony_block_scoping
Fixes #1969 .
13 years ago
seebees
216570b5e1
Lint
13 years ago
seebees
005d607aed
http.request(url.parse(x))
http2.js
protocols object to store defaults for http and https, and use as a switch for supported protocols.
options.hostname > options.host > 'localhost'
if I have an options.auth element and I do not have an Authorization header, I do basic auth.
http.request collapses to new ClientRequest since the defaults are handled by the protocol object
test-http-url.parse*
Fixes #1390
Conflicts:
lib/http2.js
13 years ago
Ben Noordhuis
84d0b1bcc5
http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
13 years ago
Yoshihiro Kikuchi
f90ba61478
http: tiny fix in http.js
Fixes #1885 .
13 years ago
Ryan Dahl
3a34972672
Fix test-http-conn-reset.js on OSX
13 years ago
Bert Belder
153629c99a
Some small optimizations
13 years ago
Ben Noordhuis
bc7cfd7cd7
http: remove legacy http library
13 years ago
Ryan Dahl
9cd510846e
Fixes #1546 . Remove expensive debug call.
13 years ago
Peter Lyons
a4eee3d28f
http: remove 'headers sent?' check in OutgoingMessage.getHeader()
Fixes #752 .
13 years ago
Ryan Dahl
2126989a32
Fix test-http-upgrade-server and test-http-parser
Problem was introduced in last http-parser upgrade which fixed a long
standing bug with the upgrade event and removed several callbacks.
13 years ago
koichik
62aaf56d1b
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417 .
Fixes #1223 .
13 years ago
koichik
8b3ba47f88
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417 .
Fixes #1223 .
13 years ago
Ben Noordhuis
2ed23314c3
http: make http and http2 co-exist
http2 is currently disabled pending addition of a --use-http2 switch
13 years ago
Mikeal Rogers
2b929c7f19
http: http2 implementation
13 years ago
Trent Mick
bbf7e8ed5e
http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374 .
13 years ago
Trent Mick
a8f96d3314
http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374 .
13 years ago
Reid Burke
973153d1cc
Properly respond to HEAD during end(body) hot path
During write(), _hasBody is checked to make sure a body
is allowed -- this is now also checked during end(body)
when write() isn't used.
Concise final chunk for HEAD req's res.end(data).
Instead of simply clearing data, check _hasBody
earlier to avoid sending cruft when chunkedEncoding
is used.
Fixes #1291 .
14 years ago
Stefan Rusu
5b02d564c3
Fixes #1085 . The agent end event may call detachSocket() after the socket is detached and destroyed by abort(). This patch avoids that behavior.
13 years ago
Ben Noordhuis
b62ecdc5bb
Revert 3e2a2a7
. Always send a HTTP/1.1 status line to the client.
14 years ago
Ben Noordhuis
3e8667d829
Revert 8dc8773
. Always send a HTTP/1.1 status line to the client.
14 years ago
Ryan Dahl
64a06c5ffd
Revert "Error argument for http.ServerRequest 'close'"
Too slow.
This reverts commit e7ac6d8fcd
.
14 years ago
Ben Noordhuis
f91988979f
Don't send a HTTP/1.1 status line to HTTP/1.0 clients.
Fixes #1234 .
14 years ago
Ben Noordhuis
8dc87731c7
Don't send a HTTP/1.1 status line to HTTP/1.0 clients.
Fixes #1234 .
14 years ago
Ryan Dahl
6d8b43c366
http: Fix agent id creation
Unbreaks test-regress-GH-877.js
14 years ago
Ryan Dahl
efca5456b8
Fixes #877 . Don't wait for socket pool to establish connections.
Thanks to Yann Biancheri for putting together an initial test.
14 years ago
Ryan Dahl
d627083ed5
Fixes #1187 . Support multiple 'link' headers
14 years ago
isaacs
794cb60f9e
typo
14 years ago
isaacs
580ab7ba2c
Avoid instanceof for native object types
For classes defined in the module, this is fine. For 'Error'
it's probably not very hazardous. However, testing 'Object'
and 'String' is much more reliable using typeof, to work with
the repl and NODE_MODULE_CONTEXT modes.
14 years ago
Ryan Dahl
70dd6d4ea3
Fix TJ's assert error
Unable to reproduce but connect's "make test TESTS=test/static.test.js" does
it occasionally.
14 years ago
Felix Geisendörfer
e7ac6d8fcd
Error argument for http.ServerRequest 'close'
Problem: It was not possible to detect the reason for a premature
connection termination in http requests.
This patch provides a new `err` argument to the 'close' event which
can be inspected to differentiate between a timeout and a client
actively terminating the connection.
Also contains tests for this new behavior for http and https.
14 years ago
Ryan Dahl
110f06578d
Agent socket errors bubble up to req only if req exists
Fixes #836 .
14 years ago
Mark Cavage
a2328dc73c
Add support for Unix Domain Sockets to HTTP
fixes #979 .
14 years ago
Abe Fettig
83727a4c86
Fix bug where http response.readable was never set to false
Closes GH-867.
14 years ago
Ryan Dahl
9ccf0e527f
Don't error on ENOTCONN from shutdown()
14 years ago
isaacs
6d85da185c
Closes GH-721 Set default host header properly
However, this test is failing for some quite unrelated issue.
Getting some odd "socket hangup" crashes, and only the first request
ever makes it to the server.
14 years ago
Ryan Dahl
66570c1964
Fix double free of parser on error in http.Agent.
Thanks to Stéphan Kochen for the fix and Maurice Fonk for reproducing the
bug.
Closes GH-784.
Closes GH-803.
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
Ryan Dahl
36e75b7351
Fix HTTP agent disconnection problem
https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o
Closes GH-787.
14 years ago
Russell Haering
7276ff9822
http: fix missing 'drain' events
14 years ago
Ryan Dahl
ea9f5b110a
Add 'close' and 'aborted' events to Agent responses
Closes GH-722.
14 years ago
Ryan Dahl
360885a7e9
deprecate http.cat
14 years ago
Felix Geisendörfer
f423ec90fc
In addition to 'aborted' emit 'close' from incoming requests
Closes GH-160.
14 years ago
Ryan Dahl
5287703cce
Pragma HTTP header comma separation
Closes GH-715, GH-716.
14 years ago
Ryan Dahl
c2a62951f6
TLS sockets should not be writable after 'end'
Closes GH-694.
14 years ago
Ryan Dahl
aac5cbe025
HTTP Agent sockets should not reconnect on error
Closes GH-684.
14 years ago
Ryan Dahl
9b0c7618c5
HTTP Agent should not die on evil server
Closes GH-680.
14 years ago
Ryan Dahl
c365f56061
https was missing 'end' event sometimes
Closes GH-671.
14 years ago
Ryan Dahl
77ae87d367
default to port 80 for http.request
14 years ago