0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

1132 Commits

Author SHA1 Message Date
Ryan
6a172d7119 Fix a bug in HTTP server when receiving half-closes. 2009-05-19 20:24:37 +02:00
Ryan
a5d5056327 Bug fix: need to return readyState symbol from scope. 2009-05-19 16:19:47 +02:00
Ryan
536eceaa2d Debugging http. Add simple test. (Does not pass.) 2009-05-19 14:50:09 +02:00
Ryan
3700568322 Add request method. (How could that be missing still?) 2009-05-19 14:46:07 +02:00
Ryan
5dce17c5aa Modify website colors. 2009-05-19 13:16:36 +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
456bb1b9f8 Work on motivation statement. 2009-05-18 23:53:26 +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
310eed03e0 Clean up readyState handling. Add test. 2009-05-18 13:53:39 +02:00
Ryan
69ab87ca53 Fix crash in oi_socket; add ready state reader to Connection objects. 2009-05-18 13:38:15 +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
d0b5961960 Work on website styling. 2009-05-17 15:54:06 +02:00
Ryan
9c0db09d95 Add to module documentation. 2009-05-16 13:53:18 +02:00
Ryan
9a63d8ec28 Remove v8 prefix from function template callbacks. 2009-05-16 12:54:44 +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
91bd3124ad Add sendUtf8 method to socket objects.
Encoding UTF-16 (the native string representation) to UTF-8 is rather
expensive, however just chopping off the second bit to convert UTF-16 to
ASCII is rather fast. I've noticed major performance issues with
String::WriteUtf8 and thus I'm going to explicitly separate in the API.

Still need interfaces to this for the web server.
2009-05-16 12:44:49 +02:00
Ryan
2cb81113ec Slightly better buffer allocation. (Probably not worth it.) 2009-05-15 22:41:36 +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
baed9d514d Inform V8 of external allocations.
This is sloppy: after each ObjectWrap allocation the user needs to
call ObjectWrap::InformV8ofAllocation(). In addition each class deriving
from  ObjectWrap needs to implement the virtual method size() which should
return the size of the derived class. If I was better at C++ I could
possibly make this less ugly. For now this is how it is.

Memory usage looks much better after this commit.
2009-05-15 16:28:10 +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
febbf75302 Wrap calls in TryCatch; Check return values after UNWRAP.
This is to avoid a segfault when you don't use the API correctly.
2009-05-15 01:12:46 +02:00
Ryan
73fb24f48d Relatively large update to TCP API. No more "protocol".
Instead servers are passed a function which gets called on connection (like
in the original design) which has one argument, the connecting socket. The
user sets up callbacks on that. It's pretty much how I had it originally.

Encoding is now set via v8 getter/setter and can be changed dynamically.

The timeout for all sockets is fixed at 60 seconds for now. Need to fix
that.
2009-05-14 23:47:21 +02:00
Ryan
31ba3cde17 Rename TCP classes to sit in node hierarchy. 2009-05-14 20:34:14 +02:00
Ryan
de6036669d Add p() like in Ruby. 2009-05-14 18:37:53 +02:00
Ryan
dfde465483 Don't need librt. 2009-05-14 17:36:39 +02:00
Ryan
28f86c7aa8 update node.html 2009-05-14 17:36:25 +02:00
Ryan
028c278a05 Add HTTP Server documentation. 2009-05-14 15:55:28 +02:00
Ryan
4b2cd6f305 Remove -n from echo in Makefile. (Doesn't work on OSX.) 2009-05-14 14:05:07 +02:00
Ryan
427e3f5dcb Introduce NODE_SET_PROTOTYPE_METHOD which properly sets the signature. 2009-05-14 13:16:45 +02:00
Ryan
8d00691f78 Was not properly passing the host parameter to Acceptor::Listen. 2009-05-13 23:44:05 +02:00
Ryan
740139408d Fix memory leak in timer. 2009-05-13 23:35:36 +02:00
Ryan
3212b31ea1 Rename main.js to node.js. 2009-05-13 21:43:24 +02:00
Ryan
f6c955b7f4 Move Timer class into node namespace. 2009-05-13 21:42:18 +02:00
Ryan
d64a78ac46 more updates to websites 2009-05-13 21:37:01 +02:00
Ryan
b34792a480 Add webpage. Very incomplete. 2009-05-13 17:46:00 +02:00
Ryan
4d39a3586c Path, URI, Fragment, etc were not getting passed to RequestHandler. 2009-05-12 11:39:42 +02:00
Ryan
94a182a2c8 liboi should include libev 2009-05-12 03:46:30 +02:00
Ryan
15c1e0b007 Random clean-ups to the web server. 2009-05-12 03:46:04 +02:00
Ryan
3a41367c40 Upgrade v8 to version 1.2.3. 2009-05-12 00:12:56 +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
55d840ea96 Add profile window around socket on_read. 2009-05-11 17:16:14 +02:00
Ryan
43531093a3 don't die on EPIPE 2009-05-07 16:32:36 +02:00
Ryan
ba17940551 Add accessor File#encoding 2009-05-07 16:15:07 +02:00
Ryan
103a8800c7 Binary HTTP bodies for both requests and responses. 2009-05-07 12:15:01 +02:00
Ryan
62a1465332 get chunked responses working 2009-05-06 19:08:38 +02:00