Ben Noordhuis
34c750d7a9
net: fix .listen({fd:0})
13 years ago
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.
13 years ago
Ben Noordhuis
23f09d7e02
fs: fix readFileSync("/proc/cpuinfo") regression
Don't use positional reads. Not all proc files support pread(), especially on
older linux kernels.
Fixes #3808 .
13 years ago
koichik
72bc4dcda4
assert: fix throws() throws an error without message property
Fixes #2893 .
13 years ago
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 .
13 years ago
Tom Hughes-Croucher
c05f52c254
child_process: improve maxBuffer error message
Mention what buffer (stdout, stderr) overflowed.
14 years ago
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 .
13 years ago
Ben Noordhuis
332fea5ac1
dgram: make .bind() always asynchronous
13 years ago
isaacs
b0c0111b04
https: Use host header as effective servername
13 years ago
Nathan Rajlich
9eddaebb79
assert: remove unnecessary use of __proto__
AssertionError already inherits from Error above using util.inherits(),
so this extra line was redundant.
test/simple/test-assert.js already tests for `instanceof`, and still passes.
13 years ago
isaacs
5809426d75
net.js: lint
13 years ago
Ben Noordhuis
1513848f88
net: fix Socket({ fd: 42 }) api
Make the implementation match the documentation. This should work:
var s = new net.Socket({ fd: 42, allowHalfOpen: true };
And now it does.
13 years ago
isaacs
e4c9c9f412
readline: Remove event listeners on close
Fix #3756
13 years ago
Timothy J Fontaine
cd6122edeb
add ref/unref to setTimeout timers
13 years ago
Timothy J Fontaine
2637b5c261
ref/unref for net.Socket net.Server dgram.Socket
13 years ago
Bert Belder
43a0c88116
windows: correctly prep long path for fs.exists(Sync)
Closes GH-3739
13 years ago
Brian White
e06b5d7af7
http: remove duplicate assignments
Closes GH-3754
13 years ago
Fedor Indutny
42c6952edb
tls: pass linting
13 years ago
Fedor Indutny
85185bbbaa
tls: pass linting
13 years ago
Fedor Indutny
92e7433ff9
tls: fix 'hostless' tls connection verification
And fix last failing tests
13 years ago
Fedor Indutny
1ccdde9a69
Revert "http/https: pass request to .createConnection()"
This reverts commit 53716eb0b5
.
13 years ago
Fedor Indutny
50122fed8a
tls: fix 'hostless' tls connection verification
And fix last failing tests
13 years ago
Fedor Indutny
93d496a4ec
tls: revert accidental API change
socket.authorizationError should always be string. Also make sni test
pass.
13 years ago
Fedor Indutny
5950db197c
tls: revert accidental API change
socket.authorizationError should always be string. Also make sni test
pass.
13 years ago
Fedor Indutny
4aa09d1e0e
tls: localhost is valid against identity-check
13 years ago
Fedor Indutny
e43fe5c833
Revert "http/https: pass request to .createConnection()"
This reverts commit 53716eb0b5
.
13 years ago
Fedor Indutny
0cf235410d
tls: localhost is valid against identity-check
13 years ago
Fedor Indutny
eb2ca10462
tls: veryify server's identity
13 years ago
Fedor Indutny
53716eb0b5
http/https: pass request to .createConnection()
It's useful for passing some additional options of request object to the
underlying API
13 years ago
Fedor Indutny
1fa0bca2ad
net: ignore socket.setTimeout(Infinity) (and NaN)
13 years ago
Fedor Indutny
8ba189b8d3
tls: veryify server's identity
13 years ago
Fedor Indutny
2b3ba3f538
http/https: pass request to .createConnection()
It's useful for passing some additional options of request object to the
underlying API
13 years ago
Fedor Indutny
b0950cbea2
net: ignore socket.setTimeout(Infinity) (and NaN)
13 years ago
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.
13 years ago
isaacs
d6b78d0e37
domain: Fix stack leak on error
13 years ago
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 .
13 years ago
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 .
13 years ago
Ben Noordhuis
5d97d72753
net: fix bogus errno reporting
_listen2() emits the error on the next tick. The errno value may have changed
by then.
13 years ago
isaacs
3ad07ed0b8
lint
13 years ago
Shigeki Ohtsu
76104f3414
timer: change new Date to Date.now for performance
Speeds up benchmark/settimeout.js by about 30%.
13 years ago
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
13 years ago
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 .
13 years ago
Nathan Rajlich
8a9e8d60d2
readline: don't use Function#call()
It wasn't necessary.
13 years ago
Jonas Westerlund
2297d638c1
Forgotten commit: add arguments to handleGroup
13 years ago
Jonas Westerlund
c7bc4cacde
Use unicode escape sequences instead of octal
The latter is illegal in strict mode.
13 years ago
Jonas Westerlund
4cfdc57712
Inline timeout function, avoiding declaration in conditional
Moving it out would require an anonymous function, or bind(), anyway.
Luckily It's a tiny function. Fixes crash in strict mode.
13 years ago
Jonas Westerlund
7e7d5d38ea
Move function declaration out of conditional
Also avoid using eval as identifier.
Fixes crashes in strict mode.
13 years ago
Jonas Westerlund
0b0b72c2fa
Move function declaration to top-level
Gets rid of a strict mode error and a few levels of indentation.
13 years ago
Jonas Westerlund
e5bb8391a8
Do not assign to properties that only have getters
It is an error in strict mode, and silent failure otherwise.
13 years ago
Jonas Westerlund
93d4259cf0
Avoid redeclaring variable
Capitalize the constructor to avoid redeclaration.
Fixes strict mode error.
13 years ago