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
Ryan Dahl
e2b7902469
Don't use parseUri for HTTP server
The big parseUri RE was showing up often in profiles - this is simpler and
yields better performance by taking advantage of the C http parser.
15 years ago
Ryan Dahl
7b337096c9
Add a third argument to http.cat to specify req headers.
15 years ago
isaacs
45f5402446
Pass the Host header in http.cat calls, if it was specified in the URL passed to http.cat.
15 years ago
Ryan Dahl
cda659a8c8
Camel-case all http events
15 years ago
Ryan Dahl
f6657c3c9d
Move http library to /http.js
15 years ago
Ryan Dahl
07792afe0a
Remove "raw" encoding. Rename "raws" to "binary".
Deprecation warnings have been added to help the conversion to this new API.
15 years ago
Ryan Dahl
9db2e5f375
Default to utf8 encoding for node.fs.cat()
15 years ago
Ryan Dahl
4f98e2deb3
Fix buffering logic for HTTP outgoing messages.
Was sending two packets instead of one for some short messages, and even 3,
for short chunked-encoded messages. Also use the more general Encode()
function for receiving HTTP bodies.
Gives ~6% improvement on "hello world" web server benchmarks.
15 years ago
Ryan Dahl
d1a13bdd35
Fix default encoding for outgoing HTTP messages
Was causing send() to throw argument errors because arrays of ints would get
paired with the "raws" encoding. The bug was introduced in 8eb1294
.
15 years ago
Ryan Dahl
8eb1294f87
Bugfix: sendBody wasn't setting encoding
15 years ago
Ryan
dbe116ddfe
API: Change arguments of emit(), emitSuccess(), emitError()
Instead of
myemitter.emit("event", [arg1, arg2, arg3]);
the API is now
myemitter.emit("event", arg1, arg2, arg3);
This change saves the creation of an extra array object for each event.
The implementation is also slightly more simple.
15 years ago
Ryan
9dbd92476e
Bugfix: Trap exceptions in URIParser.
A user was able to crash chat.tinyclouds.org by sending it a malformed URL!
Not good.
15 years ago
Ryan
116f4dea05
lint
15 years ago
Ryan
316e2833f0
Use flat object instead of array-of-arrays for HTTP headers.
E.G. { "Content-Length": 10, "Content-Type": "text/html" } instead of
[["Content-Length", 10], ["Content-Type", "text/html"]].
The main reason for this change is object-creation efficiency.
This still needs testing and some further changes (like when receiving
multiple header lines with the same field-name, they are concatenated with a
comma but some headers ("Content-Length") should not be concatenated ; the
new header line should replace the old value).
Various thoughts on this subject:
http://groups.google.com/group/nodejs/browse_thread/thread/9a67bb32706d9efc#
http://four.livejournal.com/979640.html
http://mail.gnome.org/archives/libsoup-list/2009-March/msg00015.html
15 years ago