Commit Graph

849 Commits (20b945df706b2b9fcbc1a84230372d288d497544)

Author SHA1 Message Date
Ryan Dahl 1cacb50f2b Fix memory leak on fs.write()
Reported by onne@onnlucky.com.
2009-11-22 00:47:36 +01:00
Ryan Dahl 8be6a89654 Upgrade http_parser (fixes bug reported by Felix) 2009-11-21 22:03:52 +01:00
Felix Geisendörfer 528c449901 Multipart improvements
Multipart parts now have a name and filename property. Those are the
same as:

part.headers['content-disposition'].name
part.headers['content-disposition'].filename

This patch also updates and improves the docs for the multipart module.
2009-11-21 17:16:06 +01:00
Ryan Dahl 39a12b2a22 Remove debug message 2009-11-21 17:16:05 +01:00
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.
2009-11-21 16:27:02 +01:00
Ryan Dahl 1eba0cadc1 Revert "Normalize HTTP headers."
This reverts commit f623fd7658.
But only the changes made in lib/ they were falsely detecting outgoing
headers.
2009-11-21 15:52:12 +01:00
Onne 9d39e18c6d fixes lib/file.js write, it doesnt allways emit errors or success 2009-11-19 19:12:42 +01:00
Ryan Dahl 686bec4f35 Only detach timers when active. 2009-11-19 19:08:47 +01:00
Ryan Dahl 0b441462ab Speed up test-wait-ordering.js 2009-11-18 15:55:02 +01:00
Ryan Dahl 728d8a37f4 Upgrade v8 to 2.0
(With just one change: remove -Werror)
2009-11-18 15:28:54 +01:00
Ryan Dahl 8195e0f723 Fix default value for persistent in watchFile() 2009-11-17 23:07:31 +01:00
Ryan Dahl 6de2173d7c Add options to process.watchFile() 2009-11-17 22:35:47 +01:00
Ryan Dahl 027829d285 bump version 2009-11-17 15:05:10 +01:00
Ryan Dahl 6cb0e0e5f5 Test runner should only run test-*.js 2009-11-17 15:05:10 +01:00
Ryan Dahl 6e6562e551 Fix stat handler test for macintosh 2009-11-17 15:05:01 +01:00
Ryan Dahl 0bf34b598f add link to slides on web page 2009-11-17 14:22:23 +01:00
Ryan Dahl 8d2f9e83a4 Add process.watchFile() process.unwatchFile()
This is an interface to libev's ev_stat watcher.
2009-11-17 14:07:48 +01:00
Ryan Dahl 55f9fdd6b5 Upgrade libev to latest CVS 2009-11-17 12:41:19 +01:00
Felix Geisendörfer 6e9e61b9df Format JSON for inspecting objects
This patch enables formatting for inspecting JSON objects. Example:

p({foo: "bar", deep: {foo: "bar"}})

becomes:

{
 "foo": "bar",
 "deep": {
  "foo": "bar"
 }
}
2009-11-16 12:40:58 +01:00
Ryan Dahl ca2c7d1745 Add doc for uncaughtException 2009-11-15 01:06:13 +01:00
Felix Geisendörfer 2b252acea4 Implement process "uncaughtException" event
This event can be used to overwrite the default exception mechanism which
reports the exception and kills the node process.

See google group post:
http://groups.google.com/group/nodejs/browse_thread/thread/9721dc3a2638446f
2009-11-14 23:46:37 +01:00
fwg bd6c08a984 Add EventEmitter.removeListener 2009-11-13 17:12:41 +01:00
Johan Sørensen 04f9c9fb09 Supply the strerror as a second arg to the tcp.Connection close event 2009-11-13 15:17:23 +01:00
Ryan Dahl 06d493e7e3 Remove debug message 2009-11-12 12:47:02 +01:00
Felix Geisendörfer bb8f0725da Bugfix, Promise.timeout() blocked the event loop
Promise.timeout() was blocking the event loop from shutting down while it
was waiting for an internal timer to fire. This timer is now cleared when
it is no longer needed, causing the event loop to shut down as fast as
possible.
2009-11-12 12:45:06 +01:00
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
2009-11-11 18:53:05 +01:00
Felix Geisendörfer 7371fcb312 Temporary function to determine str byte length
Will need a better place later on
2009-11-11 18:42:46 +01:00
Felix Geisendörfer 1026ffea40 Proper deprecation message for process.inherits 2009-11-11 17:38:45 +01:00
Ryan Dahl 2ca788e6e2 Add 'drain' event to tcp.Connection 2009-11-10 17:43:37 +01:00
Ryan Dahl d1f69ef35d bump version 2009-11-07 20:20:30 +01:00
Felix Geisendörfer a021db151a Bug fix for test-remote-module-loading.js
Fix bug that caused test-remote-module-loading.js
to use the installed version of the http library
rather than the build one.
2009-11-07 20:07:55 +01:00
Ryan Dahl 6c9ec1ac40 Use '127.0.0.1' instead of 'localhost' for keep-alive test
ab seems to have to problem resolving 'localhost' on Urban's computer.
2009-11-07 17:31:42 +01:00
Ryan Dahl cff1df1f9b Fix ev_unref error in signal handler 2009-11-07 17:18:23 +01:00
Ryan Dahl 42dd629c16 deprecation error for process.inherits() 2009-11-07 16:27:18 +01:00
Ryan Dahl 9cfa4fd7d6 Output stderr from test-remote-module-loading.js
There is a small problem with test-remote-module-loading.js.
When it starts a child "node", the child uses the default require.paths
instead unshifting the build lib/
2009-11-07 15:08:46 +01:00
Ryan Dahl 1020efb6f7 Create require.main, remove process.cat() 2009-11-07 14:57:49 +01:00
Ryan Dahl 43121c15be API: rename process.inherits to sys.inherits 2009-11-07 14:45:39 +01:00
Ryan Dahl d737a060c8 Combine all compiled javascript files into src/node.js 2009-11-07 14:37:22 +01:00
Ryan Dahl b833aa48e9 Add test to ensure the server can handle keep-alive 2009-11-06 13:42:56 +01:00
Ryan Dahl 54c8ea5ea2 Fix http_simple server for new API 2009-11-06 12:53:27 +01:00
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.
2009-11-06 12:44:20 +01:00
Ryan Dahl 8ad47c8de7 Expose http.IncomingMessage and http.OutgoingMessage 2009-11-05 00:02:15 +01:00
Ryan Dahl c6bd0e56cb Fix regexp in file extension checking 2009-11-04 12:39:08 +01:00
Ryan Dahl 60131fc88c Expose http.ClientRequest and http.ServerResponse 2009-11-04 12:37:52 +01:00
Ryan Dahl 711774c1f0 Remove unreachable lines 2009-11-04 02:18:31 +01:00
Ryan Dahl d3de943eb1 Fix google-analytics on index.html 2009-11-04 00:18:05 +01:00
Brandon Beacher 47fcf785ac Added process.chdir() 2009-11-03 19:22:37 +01:00
Ryan Dahl 726865af7b bump version 2009-11-03 13:48:02 +01:00
Ryan Dahl b3b3cfe007 Move memoryUsage() into C on Linux 2009-11-03 13:00:42 +01:00
Ryan Dahl 3a70129a9c Add sys.memoryUsage() 2009-11-03 01:30:01 +01:00