Ryan
0638a3a3ab
Add IncomingMessage.prototype.pause() and resume().
15 years ago
Ryan
b27f8ba06d
Default to chunked for client requests without C-Length.
Also add test. Reported by Felix Geisendörfer.
15 years ago
Ryan
eb10553634
Move node.inherit, node.path, node.cat to new file: util.js
16 years ago
Ryan
56c785ceae
small clean ups to http.js
16 years ago
Ryan
ef09b2c65d
large http.js refactor
16 years ago
Ryan
216e6204f0
http: Add IncomingMessage as abstract base class of ServerReq ClientRes
16 years ago
Ryan
996d5ef5f1
Add res.client to ClientResponse
16 years ago
Joshaven Potter
4b9f26c51a
validate js
16 years ago
Ryan
d428eff023
Snakecase events .
16 years ago
Ryan
65324866bc
Implement Promises for file i/o
16 years ago
Ryan
ed926da691
Remove onEvent compatibility
16 years ago
Ryan
70fe920fb5
Use events for all HTTP messages.
This is a rather large refactor! Mostly for the better side. I've had to
remove some functionality like req.interrupt(). A lot of other work is left
messy or incomplete.
16 years ago
Ryan
20c0e1fdfb
events for http.Server
16 years ago
Ryan
ed3d6a63d5
Further expand EventEmitter to TCP and HTTP
The constructor for TCP servers can no longer take a connection handler for
purely technical reasons. (The constructor for EventEmitter is implemented
in C++ but addListener is in javascript, and I don't want to make too many
C++ -> Javascript references.) Thus I introduce new constructor methods to
ease the creation of the servers:
node.tcp.createServer()
node.http.createServer()
These work almost the same as the old constructors.
In general we're working towards a future where no constructors are
publicly exposed or take arguments.
The HTTP events like "on_uri" are not yet using the event interface.
onMessage still is a constructor - but this will change soon.
16 years ago
Ryan
dce072a67e
lint
16 years ago
Urban Hafner
ea290e727d
Finished remote module loading
16 years ago
Urban Hafner
c192a1b5df
Update to use the new parseUri()
16 years ago
Urban Hafner
6550e8cfa0
Remove empty parts of the parsed URI.
16 years ago
Urban Hafner
ce85f84d15
Implementation of node.http.cat
16 years ago
Ryan
d77f757745
Fix test-http-client-race bug
16 years ago
Ryan
916b9ca715
Add Request objects on the HTTP server can be interrupted.
16 years ago
Ryan
3a0de007aa
onBodyComplete was not getting called in HTTP server
16 years ago
Ryan
88c04e74c9
Add HTTP proxy test. Fix bug in http.Server.
was not properly inheriting http.Server from http.LowLevelServer.
16 years ago
Ryan
887f056923
Do not assume transfer-encoding: chunked as default on requests.
If users do not send transfer-encoding or content-length headers, then I
will not add any additional. Content-Length: 0 is assumed if there aren't
other headers and chunked encoding is rare.
16 years ago
Ryan
c226f81768
Fix HTTP client output bug.
16 years ago
Ryan
c457b829e2
If http.Client has an error, do not continue to reconnect.
16 years ago
Ryan
8bf2a2fa55
Rename req.uri.queryKey to req.uri.params. More familar to rails users.
16 years ago
Ryan
aceb1987ed
Remove complex string appending in http's send() method.
That seems to churn the garbage collector like mad.
Before: http://s3.amazonaws.com/four.livejournal/20090529/timeseries6.png
After: http://s3.amazonaws.com/four.livejournal/20090529/timeseries11.png
Got a nice tight side profile for this benchmark now:
http://s3.amazonaws.com/four.livejournal/20090529/hist10.png
16 years ago
Ryan
e8f177aa2d
Clean up outgoing encoding API. Generally: send(chunk, encoding).
16 years ago
Ryan
cb3a11d72a
Camel case status_code and http_version.
16 years ago
Ryan
81b39a04cd
Add setBodyEncoding to http client responses.
16 years ago
Ryan
a1aecc9378
HTTP Server: Close 1.0 connections properly.
16 years ago
Ryan
0ef5c99973
Add http.ServerRequest.setBodyEncoding. Needs test still.
16 years ago
Ryan
b445514898
Remove debugging statement.
16 years ago
Ryan
6a172d7119
Fix a bug in HTTP server when receiving half-closes.
16 years ago
Ryan
536eceaa2d
Debugging http. Add simple test. (Does not pass.)
16 years ago
Ryan
87e6578aa9
Simple HTTP client is working a bit.
16 years ago
Ryan
3bc73ba967
Add ParseUri to the node namespace
16 years ago
Ryan
edc38b4134
Use parseUri() for req.uri. Update docs.
16 years ago
Ryan
9c70bf356b
HTTP Server: check the ready state of the connection before each send.
16 years ago
Ryan
478e45a32f
Change request handler to take two parameters: req, res.
This is more semantic, albeit unnecessary, usage. I think users will
be able to remember the API more easily.
16 years ago
Ryan
175223d5d7
Remove HTTP parser callbacks for fragment, query_string, path.
Instead we're going to just get a single callback for the URI. This can be
parsed additionally in javascript using parseuri:
http://blog.stevenlevithan.com/archives/parseuri
I haven't added that yet, but it will come soon.
16 years ago
Ryan
fb96f07ece
Commit partial work in http.js. Comment out V8::Dispose(); in node.cc
16 years ago
Ryan
81691c7dc5
Fixes to get HTTP working with new TCP API.
16 years ago
Ryan
589d8af5d4
Wrap NewInstance with TryCatch. (Was still missing the error.)
16 years ago
Ryan
427e3f5dcb
Introduce NODE_SET_PROTOTYPE_METHOD which properly sets the signature.
16 years ago
Ryan
740139408d
Fix memory leak in timer.
16 years ago
Ryan
4d39a3586c
Path, URI, Fragment, etc were not getting passed to RequestHandler.
16 years ago
Ryan
15c1e0b007
Random clean-ups to the web server.
16 years ago
Ryan
7869ed6681
Add keep-alive handling.
16 years ago