0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

164 Commits

Author SHA1 Message Date
Ryan Dahl
653bf580bf Merge branch 'develop' into net2
Conflicts:
	src/node.cc
2010-01-20 15:24:38 -08:00
Ryan Dahl
faefb3f5a4 test-http-eof-on-connect missing require('./common') 2010-01-20 10:06:44 -08:00
Felix Geisendörfer
bfd3144861 Make unhandled Promise errors throw an exception
A promise will throw an exception unless an error handler is attached in the
same "tick" that the error is emitted. This is to avoid silent promise
failures.
2010-01-19 14:29:57 -08:00
Felix Geisendörfer
f64371fccb Support late callback binding for Promises
Listeners attached with addCallback / addErrback will now be executed
right away if the promise has already fired.
2010-01-19 14:29:49 -08:00
Felix Geisendörfer
f2274840a9 Removed Promise.cancel()
The current implementation was bad and nobody is using it. Has a chance
of getting re-implemented by somebody who has an actual need for it.
2010-01-19 14:29:38 -08:00
Micheil Smith
6e3d12f617 Allow optional params to setTimeout, setInterval 2010-01-18 10:41:03 -08:00
Ryan Dahl
8abeffa9ea Add process.nextTick()
This is a replacement for the common hack:

  setTimeout(cb, 0);

It's much more efficient.
2010-01-18 10:32:36 -08:00
Ryan Dahl
aeb7d6d168 Add process.IdleWatcher
With priorities. Will be used for process.nextLoop().
2010-01-18 10:12:04 -08:00
Ryan Dahl
70293a43c9 API: Move Promise and EventEmitter into 'events' module 2010-01-15 12:46:08 -08:00
Ryan Dahl
02e52ef8e9 Merge branch 'master' into net2 2010-01-12 16:59:14 -08:00
Ben Williamson
a3631a383b Added regression test for issue #44 2010-01-11 16:43:23 -08:00
David Sklar
a876df6c71 Initial take on passing FDs between processes 2010-01-09 01:28:19 -08:00
isaacs
988174a629 Add tests for path module. 2010-01-09 00:31:51 -08:00
Ryan Dahl
53413598b6 Fix another problem with the EIO interface
Should call eio_poll() when given a done_poll signal as well.

Bug report and test case by Kris Zyp <kriszyp@gmail.com>
2010-01-08 22:20:23 -08:00
Benjamin Thomas
947c577c0d Fix bug in the url module's url_parse method if 'parseQueryString' is true 2010-01-06 02:12:11 -08:00
Ryan Dahl
f80cc69c23 libeio bugfix part 3
Finally (hopefully) fix the issue that Felix reported. It's only appearing
on macintosh (test/mjsunit/test-eio-race3.js)

The trick/hack is to call eio_poll() again before reentering the event loop.

Additionally this commit implements a more complex method of calling
eio_poll(), occasionally dropping to an ev_idle watcher.

See also:
3f39772834
http://lists.schmorp.de/pipermail/libev/2010q1/000855.html
http://groups.google.com/group/nodejs/browse_thread/thread/9f8db11c792a68bb/a89705f68971f53c
2010-01-06 01:27:31 -08:00
Felix Geisendörfer
7d947f8723 Clean up multipart test case 2010-01-05 20:15:03 -08:00
Felix Geisendörfer
f86c1783b7 Handle bad requests in simplified parser API 2010-01-05 22:37:51 +01:00
Felix Geisendörfer
aa73ed973c Added test case for the simple multipart API
So far this didn't have any test coverage.
2010-01-05 22:28:03 +01:00
Felix Geisendörfer
d9a81374b2 Throw exception for invalid multipart streams
When using the multipart parser with an regular http request, the
parser did not complain and just never finished.
2010-01-05 22:23:56 +01:00
Ryan Dahl
04dd2d51be libeio bugfix: want_poll should be called if breaking on maxreq
Reported by shansen and hassox
http://github.com/ry/node/issues#issue/38

Will send upstream.
2010-01-04 23:26:58 -08:00
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
2010-01-04 21:22:46 -08:00
isaacs
7ff04c1f86 Add URL and QueryString modules, and tests for each.
Also, make a slight change from original on url-module to put the
spacePattern into the function.  On closer inspection, it turns out that the
nonlocal-var cost is higher than the compiling-a-regexp cost.

Also, documentation.
2010-01-04 21:03:54 -08:00
Tim Caswell
fd184ee2fa Rename "Dynamic Property" to "Getter/Setter" in sys.inspect. 2010-01-03 21:15:21 -08:00
Tim Caswell
6c68a9679b Fix inspect to not trigger dynamic properties
but to display them as special. Add unit tests to match
2010-01-02 18:18:01 -08:00
Tim Caswell
732c6f2036 Fix inspect for the special case of an Object that inherits from Array, but has other properties. 2009-12-31 09:57:29 -08:00
Ryan Dahl
20eec646b3 [net2] add unix server to ping-pong test 2009-12-30 11:51:43 -08:00
Ryan Dahl
a8ede8dd9e [net2] port ping pong test 2009-12-30 10:58:46 -08:00
Ryan Dahl
e2569c402f Add some tests to test-buffer.js 2009-12-29 21:12:28 +01:00
Ryan Dahl
630bb7a012 Rename blob to buffer. 2009-12-29 21:12:28 +01:00
Ryan Dahl
dd35637603 Fix assert.js code style 2009-12-29 20:10:59 +01:00
Ryan Dahl
0d7e88a429 Bugfix: libeio race condition
Process at most 10 pending responses from the thread pool in one go.
10 was chosen arbitrarily.
Test and report by Felix Geisendörfer <felix@debuggable.com>
2009-12-29 19:11:04 +01:00
Michaeljohn Clement
3d24e119e0 don't chunk responses to HTTP/1.0 clients, even if they send Connection: Keep-Alive (e.g. wget) 2009-12-23 22:24:29 +01:00
isaacs
4dcdfaf929 Fix require("../blah") issues
Added some more tests, and refactored the uri and path modules to use the
same normalization logic, so that nothing is relying on flaky regexps.

http://groups.google.com/group/nodejs/browse_thread/thread/34779f8c10098c5e
http://groups.google.com/group/nodejs/browse_thread/thread/1aa0146b92582679#msg_9822c03998cb4064
2009-12-22 17:22:12 +01:00
Ryan Dahl
0981e7f663 Fix test-readdir.js
Was broken because I added "throws_error.js" to the fixtures directory.
Problem appeared in bfa36136da.
2009-12-19 00:45:01 +01:00
Ryan Dahl
bfa36136da require() should throw error if module does.
Reported by Kris Zyp
http://groups.google.com/group/nodejs/browse_thread/thread/1feab0309bd5402b
2009-12-18 23:58:04 +01:00
isaacs
4526308560 Update to fix failing test. Rewrite of the resolveObject function, and some tweaks to format. 2009-12-18 19:02:27 +01:00
isaacs
2f9722cca0 Pull in the uri.js from Narwhal and create tests, stripping out the cruft from a previous code-surgery. 2009-12-18 18:56:59 +01:00
Ryan Dahl
89a3fa93a0 add missing semicolon 2009-12-09 15:59:53 +01:00
Xavier Shay
756544fd28 sys.inspect prints out special chars correctly (\n, \u0001, etc...) 2009-12-07 10:05:18 +01:00
Felix Geisendörfer
876b6d2183 Make process.mixin copy over undefined values
This is not a bug in process.mixin, but I think it is undesirable
behavior. Right now process.mixin will not copy over keys with undefined
values. To me that is an unexpected filtering that should not happen
unless specifically called for.
2009-12-06 19:21:20 +01:00
Felix Geisendörfer
f080de5380 Two bug fixes for process.mixin
Bug #1 occurred when trying to use process.mixin on a function and
produced a fatal exception.

Bug #2 occurred when trying to do a deep merge with an object containing
one or more objects with a nodeType property. In those cases the deep
copy for this part of the object was not performed and a shallow one was
performed instead.

Both of these bugs were artifacts of the jQuery.extend port.
2009-12-06 19:21:06 +01:00
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().
2009-12-06 18:36:32 +01:00
Xavier Shay
34c02357ff sys.inspect is totally more awesome now
- No longer relies on JSON.stringify, so it can output nulls and functions
- Handles circular references better
- Has tests
2009-12-06 12:19:23 +01:00
Ryan Dahl
8141448fe5 Don't use promises internally in DNS module 2009-12-06 09:26:09 +01:00
Ryan Dahl
c5d82380f4 Bugfix: Don't use chunked encoding for 1.0 requests.
http://groups.google.com/group/nodejs/browse_thread/thread/b2edb76691b1848c
2009-12-05 08:37:46 +01:00
Karl Guertin
4f679fd8d0 Dependency free assert module with unit tests 2009-12-05 01:05:16 +01:00
Felix Geisendörfer
530328f12b CommonJS testing for node.js
Refactored test suite to use the assert module for testing rather than
mjsunit.
2009-12-05 01:05:16 +01:00
Michaeljohn Clement
485823f3e4 fixed HTTP duplicated header bug
added test case for HTTP duplicated header bug on keepalive
2009-12-05 00:56:22 +01:00
Rhys Jones
5b1a535cd8 Add HTTP client TLS support 2009-11-30 16:51:20 +01:00