0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

271 Commits

Author SHA1 Message Date
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
2012-03-07 13:37:39 -08:00
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.
2012-03-07 20:17:36 +01:00
Dmitry Nizovtsev
1e9bcf26ce net, http, https: add localAddress option
Binds to a local address before making the outgoing connection.
2012-03-06 13:35:49 +01:00
Maciej Małecki
da908364a8 tls http https: don't pollute user's options object 2012-02-20 21:58:00 +01:00
isaacs
0cdf85e28d Lint all the JavaScripts. 2012-02-18 15:34:57 -08:00
isaacs
31721da4b1 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	AUTHORS
	ChangeLog
	Makefile
	doc/about/index.html
	doc/api/tls.markdown
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	lib/http.js
	lib/tls.js
	src/node_version.h
	src/platform_win32.cc
	test/simple/test-tls-connect-given-socket.js
2012-02-18 09:46:58 -08:00
einaros
83fd1c1de5 Add WebSocket RFC6455 multiheader fields to the http parser. 2012-02-16 14:12:38 -08:00
Ben Noordhuis
2c07712860 http: allow multiple WWW-Authenticate headers 2012-02-16 14:11:49 -08:00
Mark Nottingham
1e425e3fa7 Generate Date headers on responses when not already present. 2012-02-15 12:35:34 -08:00
Ben Noordhuis
6141386f7e http: allow multiple WWW-Authenticate headers 2012-02-15 17:04:10 +01:00
koichik
c2dc673eb5 http: fix http-parser is freed twice
after response to CONNECT/Upgrade request.

Fixes #2704.
2012-02-07 02:29:28 +09:00
isaacs
18d179c2d8 Merge remote-tracking branch 'ry/v0.6' into master
Conflicts:
	ChangeLog
	deps/uv/src/unix/udp.c
	deps/uv/src/win/fs.c
	deps/uv/src/win/udp.c
	deps/uv/test/test-fs.c
	doc/index.html
	doc/logos/index.html
	doc/template.html
	src/node_version.h
2012-01-31 18:18:00 -08:00
koichik
3fd13c6426 http: fix free http-parser too early
when the status code is 100 (Continue).

Fixes #2636.
2012-01-31 00:16:01 +09:00
Brandon Benvie
5403a8ce4c core: add NativeModule.prototype.deprecate
Formalize and cleanup handling of deprecated core methods.
2012-01-30 00:27:07 +01:00
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%.
2012-01-24 15:57:50 +01:00
koichik
a6f3451e25 http: fix test-http-should-keepalive.js is fail
3df7c90 was removed when conflict was resolved.
2012-01-24 13:57:20 +09:00
Fedor Indutny
667aae596c Merge branch 'v0.6'
Conflicts:
	ChangeLog
	doc/template.html
	lib/cluster.js
	lib/http.js
	lib/tls.js
	src/node.h
	src/node_version.h
	test/simple/test-cluster-kill-workers.js
2012-01-24 00:30:28 +06:00
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.
2012-01-22 14:55:41 +09:00
Ben Noordhuis
56e34c2f81 http: fix deprecation warning module ID
Mea culpa, I told @mmalecki wrong
2012-01-21 14:34:33 +01:00
koichik
35fe3eb5c7 http: reduce creating http-parser instances
Fixes #2577.
2012-01-20 16:24:01 -08:00
Maciej Małecki
d5047f5fe6 http: use util._deprecationWarning for deprecation warning 2012-01-16 19:45:14 +01:00
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 )
2012-01-16 16:36:23 +06:00
Fedor Indutny
8a98c2f1d8 http, querystring: added limits to prevent DoS 2012-01-16 02:45:05 +06:00
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.
2012-01-12 14:17:19 +09:00
Ryan Dahl
8b28d599a7 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	configure
	src/node_version.h
2012-01-09 11:20:22 -08:00
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.
2012-01-09 03:51:06 +01:00
koichik
dd9593ccc4 http: fix ServerResponse does not emit 'close'
Refs #2453.
2012-01-06 15:45:21 +09:00
koichik
baebd30eee http: use self insted of this 2012-01-05 17:43:00 +09:00
Ben Noordhuis
add4cfcf5f Merge branch 'v0.6'
Conflicts:
	src/platform_win32.cc
2011-12-29 01:56:44 +01:00
koichik
a337ac7584 http: fix XMLHttpRequest piped in a writable file stream hangs next request
Fixes #2263.
2011-12-27 17:42:37 +09:00
koichik
e6b6075024 http: Avoid 'data'/'end' events after pause()
Fixes #1040.
2011-12-26 16:14:47 +01:00
koichik
7aa5924dc6 http: fix resource leak
Fixes #2069
2011-12-26 08:05:35 +01:00
Ryan Dahl
48a9a2d355 Add deprecation message for http.Client 2011-12-23 17:42:27 -08:00
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
2011-11-29 16:52:15 +09:00
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.
2011-11-03 01:30:03 +01:00
koichik
8a729270c1 fix for --harmony_block_scoping
Fixes #1969.
2011-10-31 00:49:20 +09:00
seebees
216570b5e1 Lint 2011-10-22 14:14:40 +09:00
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
2011-10-22 14:14:40 +09:00
Ben Noordhuis
84d0b1bcc5 http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
2011-10-20 19:19:02 -07:00
Yoshihiro Kikuchi
f90ba61478 http: tiny fix in http.js
Fixes #1885.
2011-10-17 01:14:45 +09:00
Ryan Dahl
3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Bert Belder
153629c99a Some small optimizations 2011-10-07 13:38:23 -07:00
Ben Noordhuis
bc7cfd7cd7 http: remove legacy http library 2011-10-04 20:51:34 +02:00
Peter Lyons
a4eee3d28f http: remove 'headers sent?' check in OutgoingMessage.getHeader()
Fixes #752.
2011-08-28 23:47:10 +02:00
Ryan Dahl
8320af7ef3 Merge remote branch 'origin/v0.4'
Conflicts:
	doc/api/tls.markdown
2011-08-17 13:25:44 -07:00
Ryan Dahl
9cd510846e Fixes #1546. Remove expensive debug call. 2011-08-17 13:21:15 -07:00
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.
2011-08-08 17:12:26 -07:00
koichik
62aaf56d1b Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:47:17 +09:00
koichik
8b3ba47f88 Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:07:37 +09:00
Ben Noordhuis
2ed23314c3 http: make http and http2 co-exist
http2 is currently disabled pending addition of a --use-http2 switch
2011-07-26 17:00:53 +02:00