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
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
50122fed8a
tls: fix 'hostless' tls connection verification
And fix last failing tests
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
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
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
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
Jonas Westerlund
e11b6b8f75
Remove octal escape sequences and avoid reserved keyword
Both are errors in strict mode.
13 years ago
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 .
13 years ago
Tim Macfarlane
0dba28b5c2
readline: fix for unicode prompts
prompt length is char length, not byte length
13 years ago
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
13 years ago
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.
13 years ago
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 .
13 years ago
isaacs
3e0757c101
lint
13 years ago
isaacs
f2a9ed4873
Fix #3577 Un-break require('sys')
13 years ago
Ben Noordhuis
6531f187d8
util: speed up formatting of large arrays/objects
Don't .indexOf() into the keys array. V8 is smart but not so smart that it
knows how to turn the linear scan into a O(1) lookup.
Fixes #3562 .
13 years ago
Bert Belder
0cdeb8ed96
windows: make fs.realpath(Sync) work with UNC paths
Closes #3542
13 years ago
isaacs
21aa0df8b2
realpath: No sync cb() calling allowed.
13 years ago
isaacs
5b39929d47
Add --no-deprecation and --trace-deprecation flags
13 years ago
isaacs
260695afd0
http: Hush 'MUST NOT have a body' warnings to debug()
13 years ago
Ben Noordhuis
ef1ffcb717
fs: make fs.watchFile() interval default to 5007
13 years ago
Ben Noordhuis
f0ce98441f
fs: make fs.watchFile() work on windows
13 years ago
Karl Skomski
57d53a47e8
Use parent SlowBuffer, if any, when Buffer is sliced
Closes #3416
Closes #3477
13 years ago
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.
13 years ago
isaacs
f105f2f2fd
trivial: Doc typo and lint fix
13 years ago
isaacs
1df222f179
Fix breakage introduced in de65ba7
13 years ago
isaacs
de65ba7aba
net.Socket: Delay pause/resume until after connect
Fix #3118
13 years ago
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.
13 years ago
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.
13 years ago
Maciej Małecki
3db2e034c4
events: cache `domain` module locally
It's faster than calling `require` every time we create an
`EventEmitter`.
13 years ago