Ryan Dahl
6f21ac1282
Don't free http parser for the client!
Fixes test-http-client-race.js, test-http.js
15 years ago
Ryan Dahl
5c6f063ef2
snake to camel in HTTP
15 years ago
Ryan Dahl
70ffdf5db9
Fix HTTP keep-alive
15 years ago
isaacs
6e603ccbe2
Fix debug statement that was using puts instead of debug()
15 years ago
Ryan Dahl
ebe2721cbf
Don't use sys.debug, it gets preprocessed out
Problem introduced in b29f78772e
15 years ago
Ryan Dahl
ac684f3583
Add legacy 'binary' encoding/decoding methods to Buffer
15 years ago
Ryan Dahl
b80f6e9ed1
http2 now default
15 years ago
Ryan Dahl
627fb5adbb
Load c++ modules on demand
15 years ago
Ryan Dahl
4ccdc501d4
Include lib/ directory in node executable. Compile on demand.
Instead of installing the files in /usr/lib/node/libraries and loading them
from the file system, the files are built-in to the node executable.
However, they are only compiled on demand.
The reasoning is:
1. Allow for more complex internal javascript. In particular,
process.stdout and process.stdin can be js implemented streams.
2. Ease system installs. Loading from disk each time is unnecessary
overhead. Note that there is no "system" path for modules anymore. Only
$HOME/.node_libraries.
15 years ago
Jed Schmidt
004faf3846
Added check to make sure writeHead() is called before write(), to prevent silent failure.
15 years ago
Ryan Dahl
d1500cee6e
Store connection in OutgoingMessage
15 years ago
Ryan Dahl
9d4d232eaa
Factor out a http.Client._reconnect() function
15 years ago
Ryan Dahl
64d0e328e8
Remove unused EventEmitter object
15 years ago
Ryan Dahl
b021a845f7
Move process.inherits to sys
15 years ago
Benjamin Thomas
b1b84960ce
Rename writeHeader to writeHead
15 years ago
Ryan Dahl
12d78cd1df
Rename sendHeader to writeHeader; allow reasonPhrase
15 years ago
Ryan Dahl
c094dda53c
Move errors for readPause and readResume
15 years ago
Ryan Dahl
d0f2d465aa
http.cat no longer uses Promise
15 years ago
Ryan Dahl
5013bf1781
API: OutgoingMessage.prototype.finish() renamed to close()
15 years ago
Ryan Dahl
ae85d9af97
API: Make request/response object closer to stream interface
- sendBody() renamed to write()
- 'body' event renamed to 'data'
- 'complete' event renamed to 'end'
15 years ago
Ryan Dahl
23cf502db7
API: connection.send() renamed to connection.write()
15 years ago
Ryan Dahl
bc17d94a0a
API: tcp events 'receive' to 'data', 'eof' to 'end'
No deprecation messages. Not sure how...
15 years ago
Ryan Dahl
1bb52947e0
Forgot to include fix from HTTP client bug ( 30b0522
)
15 years ago
Michaeljohn Clement
4e16e386fe
set default encoding in sendBody
15 years ago
Ryan Dahl
70293a43c9
API: Move Promise and EventEmitter into 'events' module
15 years ago
isaacs
2b3d9e4ad0
Use "url" module instead of "uri" module in http.js.
Deprecate the URI module and remove tests for it.
- Rename "uri" to "url".
- Use the "url" module instead of the "uri" module.
- Remove the url parsing from http.js
- Update http.cat with the changed field names.
- Update tests for changes to http.js
- Update documentation for changes in http.js
15 years ago
Michaeljohn Clement
3d24e119e0
don't chunk responses to HTTP/1.0 clients, even if they send Connection: Keep-Alive (e.g. wget)
15 years ago
isaacs
f65b36eec1
Use the new uri parser.
15 years ago
visionmedia
501b4a54be
Export STATUS_CODES
Express (my framework) uses them as a default
response body when non is present. Others
might use them for something as well.
Beats duplicating the list :D
15 years ago
Christopher Lenz
f8ba9c3bc9
Add http.Client.prototype.request()
Change the http.Client API so that it provides a single request() method
taking an optional parameter to specify the HTTP method (defaulting to
"GET"), instead of the five methods get(), head(), post(), del() and put().
15 years ago
Ryan Dahl
c5d82380f4
Bugfix: Don't use chunked encoding for 1.0 requests.
http://groups.google.com/group/nodejs/browse_thread/thread/b2edb76691b1848c
15 years ago
Ryan Dahl
7538e70767
Expose versionMajor versionMinor to http messages
15 years ago
Michaeljohn Clement
485823f3e4
fixed HTTP duplicated header bug
added test case for HTTP duplicated header bug on keepalive
15 years ago
Rhys Jones
5b1a535cd8
Add HTTP client TLS support
15 years ago
jed
a9ea21feb4
fixed check on header type, to check member instead of object.
15 years ago
Ryan Dahl
7719ce33db
New http-parser
No longer based on Ragel, but hand-written.
Had to add HTTPConnection.resetParser() because the parser is stricter and
will error out when you try to give it a message after the previous had
"Connection: close". The HTTP client was doing that. Thus we reset the
parser manually after each new connection.
15 years ago
Ryan Dahl
1eba0cadc1
Revert "Normalize HTTP headers."
This reverts commit f623fd7658
.
But only the changes made in lib/ they were falsely detecting outgoing
headers.
15 years ago
Felix Geisendörfer
bffee5eda4
Bugfix for sendBody() and chunked utf8 strings
Http expects chunked byte offsets and ignores the encoding specified in the
header. This patch makes node behave accordingly.
Bug report:
http://groups.google.com/group/nodejs/browse_thread/thread/ab701d49cb059317
15 years ago
Ryan Dahl
43121c15be
API: rename process.inherits to sys.inherits
15 years ago
Ryan Dahl
51c1526b6a
Revert "Upgrade http parser, change node as needed."
Something is broken in how keep-alive is working. Reverting until I can fix
it.
This reverts commit b893859c34
.
15 years ago
Ryan Dahl
8ad47c8de7
Expose http.IncomingMessage and http.OutgoingMessage
15 years ago
Ryan Dahl
60131fc88c
Expose http.ClientRequest and http.ServerResponse
15 years ago
Ryan Dahl
7a2e784ad7
Module refactor - almost CommonJS compatible now
API change summary:
* require("/sys.js") becomes require("sys")
* require("circle.js") becomes require("./circle")
* process.path.join() becomes require("path").join()
15 years ago
Ryan Dahl
ad0a4cefb8
Namespace EVERYTHING under process; introduce GLOBAL
http://groups.google.com/group/nodejs/browse_thread/thread/1034fd2ad2cd93e8
15 years ago
Ryan Dahl
910c627fc6
Revert "Change HTTP back to a 1.1 client."
This reverts commit 9a70abbf13
.
15 years ago
Ryan Dahl
9a70abbf13
Change HTTP back to a 1.1 client.
This was modified in b893859c34
even though it
wasn't really required. Some users are experiencing problems after changing
to 1.0 - once those are identified the client will returned to 1.0.
15 years ago
Ryan Dahl
b893859c34
Upgrade http parser, change node as needed.
The latest version of http-parser is a bit more stringent EOF semantics.
15 years ago
Ryan Dahl
2b8ab7e24f
utils.js links to sys.js instead of other way around
15 years ago
Ryan Dahl
f623fd7658
Normalize HTTP headers.
"Content-Length" becomes "content-length".
15 years ago
Ryan Dahl
522909bcbf
Parse queryString into req.uri.params
15 years ago