Ryan
56c785ceae
small clean ups to http.js
2009-07-16 11:23:37 +02:00
Ryan
ef09b2c65d
large http.js refactor
2009-07-14 18:31:50 +02:00
Ryan
216e6204f0
http: Add IncomingMessage as abstract base class of ServerReq ClientRes
2009-07-14 12:03:47 +02:00
Ryan
996d5ef5f1
Add res.client to ClientResponse
2009-07-13 16:38:54 +02:00
Joshaven Potter
4b9f26c51a
validate js
2009-07-01 02:33:08 +02:00
Ryan
d428eff023
Snakecase events .
2009-06-29 13:18:30 +02:00
Ryan
65324866bc
Implement Promises for file i/o
2009-06-28 19:08:27 +02:00
Ryan
ed926da691
Remove onEvent compatibility
2009-06-28 19:08:26 +02:00
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.
2009-06-28 19:08:26 +02:00
Ryan
20c0e1fdfb
events for http.Server
2009-06-28 19:08:26 +02:00
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.
2009-06-28 19:08:26 +02:00
Ryan
dce072a67e
lint
2009-06-22 13:12:47 +02:00
Urban Hafner
ea290e727d
Finished remote module loading
2009-06-21 16:59:11 +02:00
Urban Hafner
c192a1b5df
Update to use the new parseUri()
2009-06-21 16:28:58 +02:00
Urban Hafner
6550e8cfa0
Remove empty parts of the parsed URI.
2009-06-21 16:28:23 +02:00
Urban Hafner
ce85f84d15
Implementation of node.http.cat
2009-06-17 08:52:47 +02:00
Ryan
d77f757745
Fix test-http-client-race bug
2009-06-16 20:53:15 +02:00
Ryan
916b9ca715
Add Request objects on the HTTP server can be interrupted.
2009-06-12 17:37:43 +02:00
Ryan
3a0de007aa
onBodyComplete was not getting called in HTTP server
2009-06-12 15:26:06 +02:00
Ryan
88c04e74c9
Add HTTP proxy test. Fix bug in http.Server.
...
was not properly inheriting http.Server from http.LowLevelServer.
2009-06-09 14:10:53 +02:00
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.
2009-06-06 23:57:15 +02:00
Ryan
c226f81768
Fix HTTP client output bug.
2009-06-04 15:44:38 +02:00
Ryan
c457b829e2
If http.Client has an error, do not continue to reconnect.
2009-06-04 12:39:19 +02:00
Ryan
8bf2a2fa55
Rename req.uri.queryKey to req.uri.params. More familar to rails users.
2009-06-01 20:59:33 +02:00
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
2009-05-29 17:05:03 +02:00
Ryan
e8f177aa2d
Clean up outgoing encoding API. Generally: send(chunk, encoding).
2009-05-26 17:48:59 +02:00
Ryan
cb3a11d72a
Camel case status_code and http_version.
2009-05-20 16:06:08 +02:00
Ryan
81b39a04cd
Add setBodyEncoding to http client responses.
2009-05-20 13:00:20 +02:00
Ryan
a1aecc9378
HTTP Server: Close 1.0 connections properly.
2009-05-20 10:28:10 +02:00
Ryan
0ef5c99973
Add http.ServerRequest.setBodyEncoding. Needs test still.
2009-05-20 10:17:07 +02:00
Ryan
b445514898
Remove debugging statement.
2009-05-19 20:40:56 +02:00
Ryan
6a172d7119
Fix a bug in HTTP server when receiving half-closes.
2009-05-19 20:24:37 +02:00
Ryan
536eceaa2d
Debugging http. Add simple test. (Does not pass.)
2009-05-19 14:50:09 +02:00
Ryan
87e6578aa9
Simple HTTP client is working a bit.
2009-05-19 13:12:46 +02:00
Ryan
3bc73ba967
Add ParseUri to the node namespace
2009-05-19 00:01:11 +02:00
Ryan
edc38b4134
Use parseUri() for req.uri. Update docs.
2009-05-18 19:33:05 +02:00
Ryan
9c70bf356b
HTTP Server: check the ready state of the connection before each send.
2009-05-18 14:02:50 +02:00
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.
2009-05-18 12:44:01 +02:00
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.
2009-05-16 12:53:24 +02:00
Ryan
fb96f07ece
Commit partial work in http.js. Comment out V8::Dispose(); in node.cc
2009-05-15 18:11:49 +02:00
Ryan
81691c7dc5
Fixes to get HTTP working with new TCP API.
2009-05-15 01:47:17 +02:00
Ryan
589d8af5d4
Wrap NewInstance with TryCatch. (Was still missing the error.)
2009-05-15 01:36:51 +02:00
Ryan
427e3f5dcb
Introduce NODE_SET_PROTOTYPE_METHOD which properly sets the signature.
2009-05-14 13:16:45 +02:00
Ryan
740139408d
Fix memory leak in timer.
2009-05-13 23:35:36 +02:00
Ryan
4d39a3586c
Path, URI, Fragment, etc were not getting passed to RequestHandler.
2009-05-12 11:39:42 +02:00
Ryan
15c1e0b007
Random clean-ups to the web server.
2009-05-12 03:46:04 +02:00
Ryan
7869ed6681
Add keep-alive handling.
2009-05-11 23:38:41 +02:00
Ryan
918c71856a
Add status code reasons to server API.
2009-05-11 19:08:29 +02:00
Ryan
421b955888
change the http server response api slightly
2009-05-11 18:54:52 +02:00
Ryan
103a8800c7
Binary HTTP bodies for both requests and responses.
2009-05-07 12:15:01 +02:00