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
ssuda
70005be4ff
Fixing ClientRequest setTimeout EventEmitter Leak
This will fix #3068
13 years ago
ssuda
48d52d85c3
http, https: fix .setTimeout()
Fixes #3107 .
13 years ago
Igor Zinkovsky
5ad0140f48
Emit end event only once
fixes #2888
Previously a pair of end events would be emitted if a response was
paused/resumed, and the underlying socket was closed while the
response was paused
13 years ago
Yoshihiro Kikuchi
f82ef0f7c3
http: remove ClientRequest.prototype.pause()
ClientRequest.prototype.pause() is not needed. ClientRequest is a writable
stream and deferring to OutgoingMessage.prototype.pause() is broken, the method
does not exist.
13 years ago
Dmitry Nizovtsev
1e9bcf26ce
net, http, https: add localAddress option
Binds to a local address before making the outgoing connection.
13 years ago
Maciej Małecki
da908364a8
tls http https: don't pollute user's `options` object
13 years ago
isaacs
0cdf85e28d
Lint all the JavaScripts.
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
Mark Nottingham
1e425e3fa7
Generate Date headers on responses when not already present.
13 years ago
Ben Noordhuis
6141386f7e
http: allow multiple WWW-Authenticate headers
13 years ago
koichik
c2dc673eb5
http: fix http-parser is freed twice
after response to CONNECT/Upgrade request.
Fixes #2704 .
13 years ago
koichik
3fd13c6426
http: fix free http-parser too early
when the status code is 100 (Continue).
Fixes #2636 .
13 years ago
Brandon Benvie
5403a8ce4c
core: add `NativeModule.prototype.deprecate`
Formalize and cleanup handling of deprecated core methods.
13 years ago
Ben Noordhuis
e806ad39d0
net, tls, http: remove socket.ondrain
Replace the ondrain hack with a regular 'drain' listener. Speeds up the
bytes/1024 http benchmark by about 1.2%.
13 years ago
koichik
a6f3451e25
http: fix test-http-should-keepalive.js is fail
3df7c90
was removed when conflict was resolved.
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
Ben Noordhuis
56e34c2f81
http: fix deprecation warning module ID
Mea culpa, I told @mmalecki wrong
13 years ago
koichik
35fe3eb5c7
http: reduce creating http-parser instances
Fixes #2577 .
13 years ago
Maciej Małecki
d5047f5fe6
http: use `util._deprecationWarning` for deprecation warning
13 years ago
Fedor Indutny
f1678bfc65
http: do not accept headers if limit is exceeded
* fix limiting when parser was reused
* fix maxHeadersCount = 0 is ignored ( credit to @koichik )
* add test-http-max-headers-count.js ( credit to @koichik )
13 years ago
Fedor Indutny
8a98c2f1d8
http, querystring: added limits to prevent DoS
13 years ago
koichik
7dffbaf2ce
http: Upgrade/CONNECT request should detach its socket earlier
With Upgrade or CONNECT request, http.ClientRequest emits 'close' event
after its socket is closed. However, after receiving a response, the socket
is not under management by the request.
http.ClientRequest should detach the socket before 'upgrade'/'connect'
event is emitted to pass the socket to a user. After that, it should
emit 'close' event immediately without waiting for closing of the socket.
Fixes #2510 .
13 years ago
koichik
08a91acd76
http: better support for CONNECT method.
Introduces 'connect' event on both client (http.ClientRequest) and
server (http.Server).
Refs: #2259 , #2474 .
Fixes #1576 .
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
e6b6075024
http: Avoid 'data'/'end' events after pause()
Fixes #1040 .
13 years ago
koichik
7aa5924dc6
http: fix resource leak
Fixes #2069
13 years ago
Ryan Dahl
48a9a2d355
Add deprecation message for http.Client
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 .
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