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.
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