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

1767 Commits

Author SHA1 Message Date
Fedor Indutny
92e7433ff9 tls: fix 'hostless' tls connection verification
And fix last failing tests
2012-07-20 21:48:59 +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
0cf235410d tls: localhost is valid against identity-check 2012-07-20 20:47:05 +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
Ben Noordhuis
0c47219a72 timers: fix handling of large timeouts
Don't use the double-negate trick to coalesce the timeout argument into a
number, it produces the wrong result for very large timeouts.

Example:

    setTimeout(cb, 1e10); // doesn't work, ~~1e10 == 1410065408
2012-07-05 23:07:27 +02:00
Nathan Rajlich
9126dd2d90 repl: fix passing an empty line inserting "undefined" into the buffer
There was a possiblity of insering the string "undefined" into the repl's
command buffer, which would cause interesting results while evaluating.
2012-07-04 11:51:24 -07:00
Maciej Małecki
6a11f3edf4 repl: fix crashes when buffering command
Wrong order of operands was causing problems while trying to use command
buffering:

    > {
    ...   a: 3,
    ...

    repl.js:284
            if (cmd.trim().match(/^npm /) && !self.bufferedCommand) {
                    ^
    TypeError: Cannot call method 'trim' of undefined
        at finish (repl.js:284:17)
        at REPLServer.self.eval (repl.js:118:5)
        at rli.on.e (repl.js:260:20)
        at REPLServer.self.eval (repl.js:118:5)
        at Interface.<anonymous> (repl.js:250:12)
        at Interface.EventEmitter.emit (events.js:88:17)
        at Interface._onLine (readline.js:183:10)
        at Interface._line (readline.js:502:8)
        at Interface._ttyWrite (readline.js:720:14)
        at ReadStream.<anonymous> (readline.js:105:12)

Test included.

Closes #3515.
Closes #3517.
Closes #3621.
2012-07-04 11:22:10 -07:00
Mathias Bynens
2ba96451a9 punycode: update to v1.1.1 2012-07-04 13:45:14 +02:00
Ben Noordhuis
fee02db705 Re-apply commit e307468.
The V8 assert got triggered by a missing HandleScope::Close().
2012-06-29 17:29:32 +02:00
Bert Belder
0581afe531 Revert "Fix #3521 Use an object as the process.env proto"
The reverted commit caused a v8 assertion to trigger in debug mode.
This reverts commit e3074689f5.
2012-06-29 17:03:37 +02:00
Bert Belder
ba0efd6de0 Merge branch 'v0.8' 2012-06-29 02:20:39 +02:00
Shigeki Ohtsu
e7e34ddb66 test: fix test-dgram-broadcast-multi-process
The test failed when a router replies IPADDR_BROADCAST.
Fixed it by specifying only one address to bind a socket.
2012-06-28 03:17:47 +02:00
Bert Belder
0cdeb8ed96 windows: make fs.realpath(Sync) work with UNC paths
Closes #3542
2012-06-27 01:59:25 +02:00
isaacs
21aa0df8b2 realpath: No sync cb() calling allowed. 2012-06-26 15:20:26 -07:00
isaacs
e3074689f5 Fix #3521 Use an object as the process.env proto
For some reason, though, it looks like EnvGetter is not called for the
key `__proto__`, so I can't make the info->Data() accessible.  However,
putting the Object.prototype keys there, in such a way that they are not
OwnProperties, and are supersceded by environs, makes process.env much
less weird.
2012-06-26 09:08:40 -07:00
Ben Noordhuis
6003912f81 test: use RC4-MD5 cipher in tls test
NULL-MD5 is not always compiled into openssl but RC4-MD5 should always be
available.

Fixes #3531.
2012-06-25 16:36:02 +02:00
isaacs
5ec056633f Fix #3503: stdin: resume() on pipe(dest) 2012-06-21 16:16:30 -07:00
isaacs
fce7c958ed test: add deprecation fixture 2012-06-21 14:47:25 -07:00
isaacs
5b39929d47 Add --no-deprecation and --trace-deprecation flags 2012-06-21 12:05:33 -07:00
Ben Noordhuis
f0ce98441f fs: make fs.watchFile() work on windows 2012-06-21 03:05:18 +02:00
Ben Noordhuis
d98a8578d6 test: add another fs.watchFile() test 2012-06-21 02:50:13 +02:00
Karl Skomski
57d53a47e8 Use parent SlowBuffer, if any, when Buffer is sliced
Closes #3416
Closes #3477
2012-06-21 01:46:04 +02:00
isaacs
1d3d02c70d Fix fs.readfile('/dev/stdin')
There is no need for fs.readFile() to be using pread rather than read.
The default semantics of read() are such that subsequent reads are where
we want them anyway.
2012-06-20 10:28:44 -07:00
Bert Belder
26b11915b1 test-domain: fix the test to work on Windows
On Windows, full pathnames are stored in the Error object when
a file i/o error happens. This is not the case on Unix. Before
this fix the test would break because of these full paths.
2012-06-20 01:07:57 +02:00
Bert Belder
7a4dfb6aa8 test-cluster-worker-kill: use SIGKILL instead of SIGHUP
In this test sending SIGKILL has the same effect as sending SIGHUP,
but SIGKILL has the advantage that it works on Windows too.
2012-06-20 00:56:33 +02:00
Bert Belder
3795d77113 windows: listen(pipe_name) is not supported when running cluster
- Added a note to the cluster module documentation.
- Disabled test-cluster-http-pipe.
2012-06-20 00:53:01 +02:00
isaacs
de65ba7aba net.Socket: Delay pause/resume until after connect
Fix #3118
2012-06-18 15:17:20 -07:00
Fedor Indutny
0a89e8b838 child_process: add .stdin stream to forks
Remove test as it doesn't make any sense after the latest stdio API
changes.
2012-06-19 01:46:28 +04:00
Bert Belder
30ab1f567d test-eio-limit: bump the number of allowed background tasks to 200
This makes the test pass on Windows.
2012-06-18 15:58:43 +02:00
Bert Belder
1b7d23e81e Fix test-cluster-message so it passes on Windows
The test was relying on a particular order of events that cannot be
guaranteed.

Also fixes some typos.
2012-06-18 15:36:26 +02:00
Ben Noordhuis
ff552ddbaa tls: fix off-by-one error in renegotiation check
Make CLIENT_RENEG_LIMIT inclusive instead of exclusive, i.e. a limit of 2
means the peer can renegotiate twice, not just once.

Update pummel/test-tls-ci-reneg-attack accordingly and make it less timing
sensitive (and run faster) while we're at it.
2012-06-18 04:31:40 +02:00