isaacs
14a5b45c06
Guard against emitting 'end' twice on http responses
13 years ago
isaacs
07d8a4650e
Break up huge function in ClientRequest.onSocket
13 years ago
isaacs
8c758e127c
Don't destroy on timeout
13 years ago
isaacs
b4fbf6d275
Fix #3231 . Don't try to emit error on a null'ed req object
13 years ago
isaacs
2fc528ce00
http: Clean up parser usage
Move parsers.free(parser) to a single function, which also
nulls all of the various references we hang on them.
Also, move the parser.on* methods out of the closure, so that
there's one shared definition of each, instead of re-defining
for each parser in a spot where they can close over references
to other request-specific objects.
13 years ago
isaacs
e3ceee2dce
http: .once() usage in setTimeout
13 years ago
isaacs
b7e8e35c0e
http leak: Null links from parser to req/res
13 years ago
vvo
75f2365558
Fix #3179 HTTP memory leak using ClientRequest.
13 years ago
isaacs
c9be1d5ffd
http client: Destroy on timeout
13 years ago
isaacs
bce68134b6
http: Remove socket ondata/onend in parser cleanup
13 years ago
isaacs
bfe9cdb7f2
Null references to request object on socket errors.
Regarding #3199 and #3179 and issues seen in production.
Hopefully this fixes them.
13 years ago
einaros
83fd1c1de5
Add WebSocket RFC6455 multiheader fields to the http parser.
13 years ago
Ben Noordhuis
2c07712860
http: allow multiple WWW-Authenticate headers
13 years ago
koichik
3fd13c6426
http: fix free http-parser too early
when the status code is 100 (Continue).
Fixes #2636 .
13 years ago
koichik
3df7c90c30
http: keep-alive should default with HTTP/1.1 server
As RFC 2616 says we should, assume that servers will provide a persistent
connection by default.
> A significant difference between HTTP/1.1 and earlier versions of
> HTTP is that persistent connections are the default behavior of any
> HTTP connection. That is, unless otherwise indicated, the client
> SHOULD assume that the server will maintain a persistent connection,
> even after error responses from the server.
> HTTP/1.1 applications that do not support persistent connections MUST
> include the "close" connection option in every message.
Fixes #2436 .
13 years ago
koichik
35fe3eb5c7
http: reduce creating http-parser instances
Fixes #2577 .
13 years ago
koichik
dd9593ccc4
http: fix ServerResponse does not emit 'close'
Refs #2453 .
13 years ago
koichik
baebd30eee
http: use `self` insted of `this`
13 years ago
koichik
a337ac7584
http: fix XMLHttpRequest piped in a writable file stream hangs next request
Fixes #2263 .
13 years ago
koichik
7aa5924dc6
http: fix resource leak
Fixes #2069
13 years ago
seebees
aab958b713
OutgoingMessage.prototype.write does not take Array
Changed the type checking for OutgoingMessage.prototype.write so it only accepts string and Buffer.
And test.
Fixes #2162
Fixes #2208
13 years ago
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 .
14 years ago
koichik
8a729270c1
fix for --harmony_block_scoping
Fixes #1969 .
14 years ago
seebees
216570b5e1
Lint
14 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
14 years ago
Ben Noordhuis
84d0b1bcc5
http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
14 years ago
Yoshihiro Kikuchi
f90ba61478
http: tiny fix in http.js
Fixes #1885 .
14 years ago
Ryan Dahl
3a34972672
Fix test-http-conn-reset.js on OSX
14 years ago
Bert Belder
153629c99a
Some small optimizations
14 years ago
Ben Noordhuis
bc7cfd7cd7
http: remove legacy http library
14 years ago
Ryan Dahl
9cd510846e
Fixes #1546 . Remove expensive debug call.
14 years ago
Peter Lyons
a4eee3d28f
http: remove 'headers sent?' check in OutgoingMessage.getHeader()
Fixes #752 .
14 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.
14 years ago
koichik
62aaf56d1b
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417 .
Fixes #1223 .
14 years ago
koichik
8b3ba47f88
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417 .
Fixes #1223 .
14 years ago
Ben Noordhuis
2ed23314c3
http: make http and http2 co-exist
http2 is currently disabled pending addition of a --use-http2 switch
14 years ago
Mikeal Rogers
2b929c7f19
http: http2 implementation
14 years ago
Trent Mick
bbf7e8ed5e
http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374 .
14 years ago
Trent Mick
a8f96d3314
http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374 .
14 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.
14 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