summaryrefslogtreecommitdiff
path: root/test/simple
Commit message (Collapse)AuthorAgeFilesLines
* test: Fix premature close in test-http-client-timeout-agentisaacs2012-09-251-3/+10
|
* http: make the client "res" object gets the same domain as "req"Nathan Rajlich2012-09-241-0/+65
| | | | Fixes #4046.
* repl: make invalid RegExps throw in the REPLNathan Rajlich2012-09-211-0/+4
| | | | Fixes #2746.
* domain: Properly exit() on domain disposalisaacs2012-09-211-0/+67
| | | | | | | | | | | | | | | | | | | | | | | This addresses #4034. There are two problems happening: 1. The domain is not exited automatically when calling dispose() on it. Then, since the domain is disposed, attempting to exit it again will do nothing. 2. The active domain is stored on process.domain. Since thrown errors call `process.emit('uncaughtException', er)`, and the process is an event emitter with a `.domain` member, it re-enters the domain a second time before calling the error handler, pushing it onto the stack again. Thus, if the handler calls `domain.dispose()`, then the domain is now on the stack twice, and cannot be exited properly. Since the domain is disposed, any subsequent IO will be no-op'ed, since we've declared that this context is done and best forgotten. The solution here is twofold: 1. In EventEmitter.emit, do not enter the domain if `this===process`. 2. Automatically exit the domain when calling `domain.dispose()`.
* fs: fix watchFile() missing deletion eventsBen Noordhuis2012-09-171-0/+41
| | | | | | | | | | | | | | Make sure the deletion event gets reported in the following scenario: 1. Watch a file. 2. The initial stat() goes okay. 3. Something deletes the watched file. 4. The second stat() fails with ENOENT. The second stat() translates into the first 'change' event but a logic error stopped it from getting emitted. Fixes #4027.
* fs: don't segfault on deeply recursive stat()Ben Noordhuis2012-09-141-0/+33
| | | | | | | | | | | Check that the calls to Integer::New() and Date::New() succeed and bail out if they don't. V8 returns an empty handle on stack overflow. Trying to set the empty handle as a property on an object results in a NULL pointer dereference in release builds and an assert in debug builds. Fixes #4015.
* http: Remove timeout handler when data arrivesFrédéric Germain2012-09-121-0/+89
|
* Update doc and test for sunos/solaris switchisaacs2012-09-111-1/+1
|
* util: make util.inspect() work when "hasOwnProperty" is overwrittenNathan Rajlich2012-09-081-0/+7
|
* http: respect HTTP/1.0 TE headerBen Noordhuis2012-09-081-0/+148
| | | | | | | | | | | A HTTP/1.0 client does not support 'Transfer-Encoding: chunked' unless it explicitly requests it by sending a 'TE: chunked' header. Before this commit, node.js always disabled chunked encoding for HTTP/1.0 clients. Now it will scan for the TE header and turn on chunked encoding if requested and applicable. Fixes #940.
* crypto: make pbkdf2() compatible with domainsBen Noordhuis2012-09-031-0/+1
|
* crypto: make randomBytes() compatible with domainsBen Noordhuis2012-09-031-0/+36
| | | | | | | | | | | | | | | Don't execute the callback in the context of the global object. MakeCallback() tries to apply the active domain to the callback. If the user polluted the global object with a 'domain' property, as in the code example below, MakeCallback() will try to apply that. Example: domain = {}; // missing var keyword is intentional crypto.randomBytes(8, cb); // TypeError: undefined is not a function Fixes #3956.
* Revert "buffer: added support for writing NaN and Infinity"koichik2012-09-022-102/+0
| | | | This reverts commit 6b9425fe3783193cf95cb04cbcbcbb97f5a77d31.
* buffer: added support for writing NaN and Infinitykoichik2012-09-022-0/+102
| | | | | to writeDoubleBE(), writeDoubleLE(), writeFloatBE() and writeFloatLE(). Fixes #3934.
* tls: support unix domain socket/named pipe in tls.connectShigeki Ohtsu2012-08-311-0/+49
|
* child process: fix processes with IPC channel don't emit 'close'Bert Belder2012-08-301-0/+57
| | | | | | | With this patch the IPC socket is no longer available in the ChildProcess.stdio array. This shouldn't be very problematic, since this socket was effectively non-functional; it would never emit any events.
* https: make https.get() accept a URLkoichik2012-08-241-0/+55
| | | | | | | https.get() now accepts either a URL (as a string) or an options object. Refs #2859. Fixes #3882.
* tls: handle multiple CN fields when verifying certBen Noordhuis2012-08-121-0/+8
| | | | Fixes #3861.
* zlib: Emit 'close' on destroy().Dominic Tarr2012-08-041-0/+36
|
* child_process: Fix stdout=null when stdio=['pipe']Tyler Neylon2012-08-041-0/+36
| | | | | | | | | | | | | Previously, a command with a short stdio array would result in the child's stdout and stderr objects set to null. For example: var c = child_process.spawn(cmd, args, {stdio: ['pipe']}); // results in c.stdout === null. The expected behavior is the above line functioning the same as this one: var c = child_process.spawn(cmd, args, {stdio: ['pipe', null, null]}); // provides correct (non-null) c.stdout; as does the above, after this fix.
* net: make pause work with connecting socketsBert Belder2012-08-032-30/+101
| | | | | | | | 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
* net: fix .listen({fd:0})Ben Noordhuis2012-08-021-0/+36
|
* fs: fix ReadStream / WriteStream missing callbackGil Pedersen2012-08-021-1/+6
| | | | | The (undocumented) callback argument to .destroy() was not called if the stream was no longer readable / writable.
* Report errors properly from --eval and stdinisaacs2012-07-301-6/+7
|
* assert: fix throws() throws an error without message propertykoichik2012-07-291-0/+10
| | | | Fixes #2893.
* cluster: fix libuv assert in net.listen()Ben Noordhuis2012-07-291-0/+41
| | | | | | | | | | | | | | | | | | 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.
* https: Use host header as effective servernameisaacs2012-07-251-0/+218
|
* readline: Remove event listeners on closeisaacs2012-07-242-0/+13
| | | | Fix #3756
* windows: correctly prep long path for fs.exists(Sync)Bert Belder2012-07-231-0/+66
| | | | Closes GH-3739
* tls: fix 'hostless' tls connection verificationFedor Indutny2012-07-201-2/+5
| | | | And fix last failing tests
* tls: revert accidental API changeFedor Indutny2012-07-201-1/+3
| | | | | socket.authorizationError should always be string. Also make sni test pass.
* tls: localhost is valid against identity-checkFedor Indutny2012-07-201-0/+7
|
* tls: veryify server's identityFedor Indutny2012-07-201-0/+189
|
* net: ignore socket.setTimeout(Infinity) (and NaN)Fedor Indutny2012-07-201-14/+20
|
* domain: Fix stack leak on errorisaacs2012-07-161-0/+46
|
* Revert "events: don't delete the listeners array in removeListener()"Nathan Rajlich2012-07-121-9/+0
| | | | | | | | | | This reverts commit 928ea564d16da47e615ddac627e0b4d4a40d8196. 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.
* net: fix net.Server.listen({fd:x}) error reportingBen Noordhuis2012-07-121-0/+38
| | | | | | | | | * 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.
* Merge branch 'v0.8.2-release' into v0.8isaacs2012-07-091-3/+4
|\ | | | | | | | | Conflicts: AUTHORS
| * Fix test-require-json on Windowsisaacs2012-07-071-3/+4
| |
* | domain: Remove first arg from intercepted fnToshihiro Nakamura2012-07-091-0/+9
| | | | | | | | | | Fix to remove the first-arg, in case arguments length is more than 2 Add domain.intercept() test about first-arg removal
* | process: throw a TypeError when anything but an Array is passed to hrtime()Nathan Rajlich2012-07-081-0/+46
|/ | | | Fixes #3664.
* module: add filename to require() json errorsTJ Holowaychuk2012-07-061-0/+29
| | | | | | Otherwise it can be quite difficult to figure out which file is busted. Closes #3580.
* timers: fix handling of large timeoutsBen Noordhuis2012-07-051-1/+2
| | | | | | | | | 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
* repl: fix passing an empty line inserting "undefined" into the bufferNathan Rajlich2012-07-041-1/+3
| | | | | There was a possiblity of insering the string "undefined" into the repl's command buffer, which would cause interesting results while evaluating.
* repl: fix crashes when buffering commandMaciej Małecki2012-07-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* windows: make fs.realpath(Sync) work with UNC pathsBert Belder2012-06-271-0/+54
| | | | Closes #3542
* realpath: No sync cb() calling allowed.isaacs2012-06-261-0/+3
|
* Fix #3503: stdin: resume() on pipe(dest)isaacs2012-06-211-0/+48
|
* Add --no-deprecation and --trace-deprecation flagsisaacs2012-06-211-0/+57
|
* Use parent SlowBuffer, if any, when Buffer is slicedKarl Skomski2012-06-211-0/+3
| | | | | Closes #3416 Closes #3477