Commit Graph

1794 Commits (74d076caf1837ddacae0f7cd5d9e6ee0b47d63d2)

Author SHA1 Message Date
isaacs 99ad0561c0 test-message: fix message output
1. The net changes add a stack frame to stdin errors.
2. The error line numbers were overly strict in many places.
2012-08-05 13:53:31 -07:00
Andreas Madsen 085a09874b cluster: do not use internal server API 2012-08-05 13:53:31 -07:00
Andreas Madsen d13887512e net: lazy listen on handler
This allow the server to be shared without the need to handle connection
from master
2012-08-04 22:13:07 -07:00
isaacs 3bf1846bb7 Merge remote-tracking branch 'ry/v0.8'
Conflicts:
	ChangeLog
	deps/uv/src/unix/sunos.c
	deps/uv/test/test-tcp-unexpected-read.c
	src/node_version.h
2012-08-03 16:23:14 -07:00
Bert Belder 5fdeebd94d net: make pause work with connecting sockets
This fixes the problem that calling pause() on a socket would not
actually prevent 'data' events from being emitted. It also replaces
the existing test by a more elaborate one.

Ref: #3118
2012-08-03 17:11:08 +02:00
isaacs 2bee3aeee9 Merge branch 'v0.8.5-release' into v0.8 2012-08-02 14:57:34 -07:00
isaacs 37537d5720 test: stdin error messages 2012-08-02 08:11:18 -07:00
Ben Noordhuis 34c750d7a9 net: fix .listen({fd:0}) 2012-08-02 13:37:02 +02:00
Gil Pedersen f1fba8d1f5 fs: fix ReadStream / WriteStream missing callback
The (undocumented) callback argument to .destroy() was not called if the
stream was no longer readable / writable.
2012-08-02 01:25:53 +02:00
isaacs b3cf3f35fc Report errors properly from --eval and stdin 2012-07-30 08:21:39 -07:00
koichik 72bc4dcda4 assert: fix throws() throws an error without message property
Fixes #2893.
2012-07-29 19:48:16 +09:00
Ben Noordhuis aa0650f444 cluster: fix libuv assert in net.listen()
Problem: calling `server.listen()` (no port) on a net.Server triggered the
following libuv assertion:

  node: ../deps/uv/src/unix/stream.c:406: uv__write: Assertion `fd_to_send >= 0'
  failed.

Cause: uv_tcp_t handles are lazily initialized. Omitting the port made the
handle get initialized even more lazily. Too lazily - it wasn't initialized
when the handle was sent over to the child process.

Solution: implicitly bind to a random port in listen() when the port number
is omitted, it forces the handle to initialize. This is not a change in
behavior, listen() has always been identical to listen(0).

Fixes #3325.
2012-07-29 02:07:16 +02:00
Joe Andaverde 20e12e4be3 events: make .listeners() return a copy
Make EventEmitter.listeners(event) return a copy of the listeners array instead
of the array itself.

Fixes #3442.
2012-07-27 20:28:51 +02:00
Ben Noordhuis 2a30d328fa crypto: add sync interface to crypto.pbkdf2()
Fixes #3766.
2012-07-27 00:02:36 +02:00
Timothy J Fontaine edd3de8fea test: update dgram tests after API change 2012-07-26 23:55:29 +02:00
Ben Noordhuis 105c6ec8d5 test: suppress simple/test-dgram-pingpong chatter 2012-07-26 23:55:29 +02:00
isaacs e5498331f4 Merge remote-tracking branch 'ry/v0.8'
Conflicts:
	AUTHORS
	ChangeLog
	src/node_version.h
2012-07-26 11:58:03 -07:00
isaacs b0c0111b04 https: Use host header as effective servername 2012-07-25 13:38:43 -07:00
isaacs e4c9c9f412 readline: Remove event listeners on close
Fix #3756
2012-07-24 15:36:53 -07:00
Bert Belder febffc107d Merge branch 'v0.8'
Conflicts:
	lib/tls.js
2012-07-23 18:34:03 +02:00
Timothy J Fontaine 77945d7f0f add unref/ref tests for socket/server/timers 2012-07-23 18:31:32 +02:00
Bert Belder 43a0c88116 windows: correctly prep long path for fs.exists(Sync)
Closes GH-3739
2012-07-23 13:55:42 +02:00
Fedor Indutny 92e7433ff9 tls: fix 'hostless' tls connection verification
And fix last failing tests
2012-07-20 21:48:59 +04:00
Fedor Indutny 50122fed8a tls: fix 'hostless' tls connection verification
And fix last failing tests
2012-07-20 21:43:12 +04:00
Fedor Indutny 93d496a4ec tls: revert accidental API change
socket.authorizationError should always be string. Also make sni test
pass.
2012-07-20 21:13:54 +04:00
Fedor Indutny 5950db197c tls: revert accidental API change
socket.authorizationError should always be string. Also make sni test
pass.
2012-07-20 21:10:23 +04:00
Fedor Indutny 4aa09d1e0e tls: localhost is valid against identity-check 2012-07-20 20:51:38 +04:00
Fedor Indutny 0cf235410d tls: localhost is valid against identity-check 2012-07-20 20:47:05 +04:00
Fedor Indutny eb2ca10462 tls: veryify server's identity 2012-07-20 01:49:31 +04:00
Fedor Indutny 1fa0bca2ad net: ignore socket.setTimeout(Infinity) (and NaN) 2012-07-20 01:49:30 +04:00
Fedor Indutny 8ba189b8d3 tls: veryify server's identity 2012-07-20 00:53:36 +04:00
Fedor Indutny b0950cbea2 net: ignore socket.setTimeout(Infinity) (and NaN) 2012-07-20 00:43:41 +04:00
isaacs 430d94ef85 nextTick: Preserve depth in error/reentry cases
When there is an error that is thrown in a nextTick function, which is
then handled by a domain or other process.on('uncaughtException')
handler, if the error handler *also* adds a nextTick and triggers
multiple MakeCallback events (ie, by doing some I/O), then it would
skip over the tickDepth check, resulting in an infinite spin.

Solution: Check the tickDepth at the start of the tick processing, and
preserve it when we are cleaning up in the error case or exiting early
in the re-entry case.

In order to make sure that tick callbacks are *eventually* handled, any
callback triggered by the underlying spinner in libuv will be processed
as if starting from a tick depth of 0.
2012-07-19 10:29:15 -07:00
isaacs 19ecc17e6b nextTick: explicitly no-op when _exiting 2012-07-16 21:05:26 -07:00
isaacs 4e5fe2d45a nextTick: Handle tick callbacks after each tick 2012-07-16 21:05:10 -07:00
isaacs 8973c3d2b6 Merge remote-tracking branch 'ry/v0.8' 2012-07-16 18:35:07 -07:00
Pavel Lang ff14007573 Enable color customization of `util.inspect`
This is rewrite of #3701 and #3603 before.

This patch introduce `util.inspect.styles`
and `util.inspect.colors` objects, which enables customization
of color sequences.
2012-07-16 18:32:03 -07:00
isaacs d6b78d0e37 domain: Fix stack leak on error 2012-07-16 18:04:55 -07:00
isaacs b8d861556a test-eio-limit: Remove confusing broken incorrect test 2012-07-16 16:28:34 -07:00
isaacs db59c84ba0 Merge remote-tracking branch 'ry/v0.8'
Conflicts:
	deps/npm
2012-07-13 12:18:39 -07:00
Nathan Rajlich 713b9249e1 Revert "events: don't delete the listeners array in removeListener()"
This reverts commit 928ea564d1.

Keeping the original Array instance in-place essentially causes a memory leak
on EventEmitters that use an infinite number of event names (an incrementing
counter, for example), which isn't an unreasonable thing to want to do.

Fixes #3702.
2012-07-12 15:43:35 -07:00
Ben Noordhuis 3a6314dbe1 net: fix net.Server.listen({fd:x}) error reporting
* don't assert when fd isn't an open file descriptor

* don't die with a ReferenceError when fd isn't a file descriptor
  you can listen() on

Fixes #3699.
2012-07-12 18:18:38 +02:00
isaacs 424cd5a020 Merge remote-tracking branch 'ry/v0.8' into v0.8-merge
Conflicts:
	src/node_version.h
2012-07-11 17:38:11 -07:00
isaacs 9547ee90db Merge branch 'v0.8.2-release' into v0.8
Conflicts:
	AUTHORS
2012-07-09 10:23:49 -07:00
Toshihiro Nakamura 6530310ed5 domain: Remove first arg from intercepted fn
Fix to remove the first-arg, in case arguments length is more than 2
Add domain.intercept() test about first-arg removal
2012-07-09 09:37:46 -07:00
Ben Noordhuis 63c2391984 test: make test-fs-watch-file write to tmp dir
Write temp files to test/tmp, not test/fixtures.
2012-07-09 15:48:43 +02:00
Ben Noordhuis 5b5362aa8d fs: make unwatchFile() remove a specific listener
Before this commit, `fs.unwatchFile(path)` removed *all* listeners for `path`.

The function is overloaded now: `fs.unwatchFile(path)` still removes all
listeners, but `fs.unwatchFile(path, cb)` lets you remove a specific listener.

Fixes #3660.
2012-07-09 15:48:43 +02:00
Nathan Rajlich d3d83d7b90 process: throw a TypeError when anything but an Array is passed to hrtime()
Fixes #3664.
2012-07-08 20:53:19 -07:00
isaacs c4e9226bdb Fix test-require-json on Windows 2012-07-07 15:15:17 -07:00
TJ Holowaychuk ed7fb149a2 module: add filename to require() json errors
Otherwise it can be quite difficult to figure out which file is busted.

Closes #3580.
2012-07-06 15:26:41 -07:00