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
Richard Rodger
b11d78b386
Fix for DNS fail in HTTP request
Closes GH-653.
14 years ago
Tj Holowaychuk
fe838611f6
Fixed field merging with progressive fields on writeHead()
14 years ago
Tim Caswell
b09c5889be
Add support for mutable/implicit headers for http.
This works for both ServerResponse and ClientRequest.
Adds three new methods as a couple properties to to OutgoingMessage objects.
Tests by Charlie Robbins.
Change-Id: Ib6f3829798e8f11dd2b6136e61df254f1564807e
14 years ago
Ryan Dahl
e9257b859d
New DTrace probes from CA team
14 years ago
Russell Haering
e6ede31554
http: fix buffer writes to outgoing messages
14 years ago
Mikeal Rogers
2b03ba5917
http: agent takes options instead of host, port pair
14 years ago
Ryan Dahl
4733d0b1f0
http: handle aborts
14 years ago
Ryan Dahl
bfb6a67d60
Another fix for process.assert
14 years ago
Ali Farhadi
36ef5643c3
Fixing bug in http request default encoding.
14 years ago
Ryan Dahl
39ff40e5a2
Use old http.Client
This is meant as a path for upgrading to the new http.request() API.
http.Client will be disappearing in the future.
14 years ago
Ryan Dahl
068b733583
Land Cantrill's DTrace patch
only works on solaris
14 years ago
Ryan Dahl
9e976abad9
lint
14 years ago
Ali Farhadi
d81afcb3a6
Fixing bug in http request's end method.
14 years ago
Mikeal Rogers
8d37f80f4b
Expose agent in http and https client.
14 years ago
Ryan Dahl
76afea90cf
Fix test-http-exceptions
Agent: Each time an http req is sent to a socket, _cycle to try to dispatch
another. Problem became apparent in 4612b0 when we wait for connecting
sockets.
14 years ago
Ryan Dahl
4612b07604
Fix test-http-allow-req-after-204-res
Agent queue waits for connecting sockets.
14 years ago
Ryan Dahl
68f2aa2715
http: agent should cycle on close
14 years ago