Commit Graph

1878 Commits (252f034b30b3bf9b0c38d683725868d899209870)

Author SHA1 Message Date
isaacs 1df222f179 Fix breakage introduced in de65ba7 2012-06-18 16:04:36 -07: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
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
Maciej Małecki 3db2e034c4 events: cache `domain` module locally
It's faster than calling `require` every time we create an
`EventEmitter`.
2012-06-17 13:07:20 -07:00
Reid Burke 71a2a2caa6 net: Prevent property access throws during close
Fix #3455.

The remoteAddress and remotePort properties are
dynamically retrieved from _getpeername().

While _getpeername() checks if the _handle is
null, it is also possible for the tcp_wrapped
_handle.getpeername() to return null on error.

Such a condition happens when the remote closes
and one of these properties is accessed before
_handle is set to null.
2012-06-17 13:00:00 -07:00
isaacs 41421ff9da Make listenFD just DTRT after warning 2012-06-16 16:26:16 -07:00
isaacs a90bc78534 Revert "DNS: Support NAPTR queries"
This reverts commit 91bf18fcc5.
2012-06-16 11:02:49 -07:00
ssuda 91bf18fcc5 DNS: Support NAPTR queries
Adding support for NAPTR records
fixes #3170
2012-06-16 10:56:49 -07:00
Felix Böhm 3a5798b097 querystring: improved speed and code cleanup 2012-06-16 10:43:17 -07:00
isaacs 1f93aa5d5d 2012.06.15, Version 0.7.11 (unstable)
* V8: Upgrade to v3.11.10

* npm: Upgrade to 1.1.26

* doc: Improve cross-linking in API docs markdown (Ben Kelly)

* Fix #3425: removeAllListeners should delete array (Reid Burke)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* Add Buffer.concat method (isaacs)

* windows: make symlinks tolerant to forward slashes (Bert Belder)

* build: Add node.d and node.1 to installer (isaacs)

* cluster: rename worker.unqiueID to worker.id (Andreas Madsen)

* Windows: Enable ETW events on Windows for existing DTrace probes. (Igor Zinkovsky)

* test: bundle node-weak in test/gc so that it doesn't need to be downloaded (Nathan Rajlich)

* Make many tests pass on Windows (Bert Belder)

* Fix #3388 Support listening on file descriptors (isaacs)

* Fix #3407 Add os.tmpDir() (isaacs)

* Unbreak the snapshotted build on Windows (Bert Belder)

* Clean up child_process.kill throws (Bert Belder)

* crypto: make cipher/decipher accept buffer args (Ben Noordhuis)
2012-06-15 12:10:43 -07:00
Andreas Madsen 1e0ce5d1bd domain: the EventEmitter constructor is now always called in nodecore 2012-06-15 09:49:05 -07:00
isaacs a111390c56 zlib: use Buffer.concat() 2012-06-15 09:44:37 -07:00
Nathan Rajlich 032fc42e64 readline: don't cache the "keypress" listeners
it's not safe to since `removeAllListeners()` will detach the returned
Array from the stream instance if that's ever called by the user.
2012-06-14 17:26:50 -07:00
Reid Burke c9a1b5d162 Fix #3425: removeAllListeners should delete array
When removeAllListeners is called, the listeners array
is deleted to maintain compatibility with v0.6.

Reverts "events: don't delete the listeners array"

This reverts commit 78dc13fbf9.

Conflicts:

	test/simple/test-event-emitter-remove-all-listeners.js
2012-06-14 17:26:50 -07:00
Bert Belder 13400e3e58 windows: make symlinks tolerant to forward slashes
Closes #3440
2012-06-15 01:37:24 +02:00
isaacs 412c1ab5bc Fix test-fs-realpath on Windows
Also, in the process, fix a bug in fs.realpath on Windows.

If the user has permission to create symlinks, then use symlinks.  If
not, then skip over all the tests that cannot be run using Junctions
instead.
2012-06-14 16:15:12 -07:00
Andreas Madsen c2c08196d8 cluster: rename worker.unqiueID to worker.id 2012-06-14 09:32:56 -07:00
isaacs e733dc3bc3 Fix #3388 Support listening on file descriptors
This implements server.listen({ fd: <filedescriptor> }).  The fd should
refer to an underlying resource that is already bound and listening, and
causes the new server to also accept connections on it.

Not supported on Windows.  Raises ENOTSUP.
2012-06-13 12:24:45 -07:00
isaacs a11bf99ce0 Fix #3407 os.tmpDir() 2012-06-12 19:08:47 -07:00
Bert Belder 10f85fadfe Fix child_process.kill oddities
* When the process is already dead, but the `exit` signal wasn't raised
  yet, the ESRCH error should be ignored.

* When an invalid signal is specified, kill() should throw.

* Like process.kill(), child_process.kill() now preserves a `0` signal
  which can be used to check the liveliness of the child process.

* process.kill() and child_process.kill() will now return true if the
  signal was actually delivered, and false otherwise.

* When an `exec`-ed process is automatically killed because a time or
  buffer limit is exceeded, and the kill() fails, this error should be
  reported through the `exec` callback.

Fixes: #3409
2012-06-12 23:30:56 +02:00
Ben Noordhuis 0385b17ce0 fs: fix infinite loop in fs.readFileSync()
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFileSync() was busy reading in the file.
2012-06-12 16:31:49 +02:00
Ben Noordhuis 408bfece51 fs: fix infinite loop in fs.readFile()
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFile() was busy reading in the file.
2012-06-12 16:31:44 +02:00
Shigeki Ohtsu e3a2dd1b13 fs: fix fs.readFileSync to work on real empty file 2012-06-12 15:02:39 +02:00
Shigeki Ohtsu 4eb2804db9 fs: fix typo in fs.readFile of lying size=0 stat 2012-06-12 15:02:39 +02:00
isaacs 6ce013dd4b fix fs.readFile with lying size=0 stat results 2012-06-11 15:54:28 -07:00
isaacs d53cdc5378 Add Buffer.concat method
We write out this loop a lot of places throughout node.
It clearly needs to be an API method.
2012-06-11 15:51:23 -07:00
Bert Belder cfa28690db cluster: don't silently drop messages when the write queue gets big 2012-06-11 23:46:17 +02:00
isaacs 1358632e67 Remove auto-unref
cc: @AvianFlu @AndreasMadsen
2012-06-11 09:07:42 -07:00
isaacs 54a4f99c4e lint 2012-06-11 08:13:36 -07:00
isaacs 131a67e7ef Fix #3394 fs.realpath: Properly cache symlink targets 2012-06-09 09:43:47 -07:00
isaacs 424bca15c8 Fix fs.realpath to work on Windows
1. Make the isRoot check valid
2. Don't cache results based on dev/ino, since those are alwasy 0 on
windows.
2012-06-09 09:43:46 -07:00
isaacs 6332a4cf00 Expose posix realpath on windows as well 2012-06-09 09:43:46 -07:00
Andreas Madsen 535e109a3a domain: run now return callback result
both domain.bind and domain.intercept act this way
2012-06-09 18:15:38 +02:00
Andreas Madsen 77cfbd9f2d domain: dry decorate using util._extend 2012-06-09 18:15:38 +02:00
Marc Harter 569acea0ee Fix #3379 prevent domain.intercept passing 1st arg to cb 2012-06-08 23:32:13 -07:00
Charlie McConnell 4b021a3541 child_process: expose UV_PROCESS_DETACHED as options.detached 2012-06-08 22:57:22 -07:00
Fedor Indutny 3116522e7c child_process: spawn().ref() and spawn().unref() 2012-06-07 23:20:56 +04:00
Ben Noordhuis 463d6bac8b fs: make callbacks run in global context
Callbacks that were passed to the binding layer ran in the context of the
(internal) binding object. Make sure they run in the global context.

Before:

  fs.symlink('a', 'b', function() {
    console.log(this); // prints "{ oncomplete: [Function] }"
  });

After:

  fs.symlink('a', 'b', function() {
    console.log(this); // prints "{ <global object> }"
  });
2012-06-06 21:49:39 +02:00
Ben Noordhuis c381662cac fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
2012-06-06 21:08:38 +02:00
isaacs 28e851c169 Warn about running npm in the repl 2012-06-05 12:35:49 -07:00
Ben Noordhuis f0a561fe67 net: rename flag FLAG_SHUTDOWNQUED 2012-06-04 15:02:09 +02:00
Simon Sturmer 9a998d5e24 http: don't lowercase http req header until later
Don't lowercase the request header until we're in the _addHeaderLine method,
makes it easier to intercept the raw request headers.
2012-06-02 03:07:43 +02:00
Fedor Indutny af98fc9d5f child_process: new stdio API for .spawn() method 2012-06-01 20:52:13 +04:00
Ben Noordhuis fa9aa1c961 net: fix 'close' event emit order
The server 'close' event was emitted before the last client 'close' event. Not
exactly fatal but potentially confusing.

Before this commit the order looked something like [client, server, client],
now it looks like [client, client, server].

See #3340 for more details.
2012-05-29 13:05:51 +02:00
Shigeki Ohtsu f721d02c8a http: fix duplicated variable declaration 2012-05-28 23:26:02 +02:00
Maciej Małecki c96df0e37a stream: don't call `cleanup` twice on `end` and `close` 2012-05-28 01:35:36 +02:00
Andreas Madsen 1f3e4a76f9 fs: no end emit after createReadStream.pause()
In case a fd option is given to fs.createReadStream a read will instantly
happen. But in the edge case where fd point to an empty file and .pause()
was executed instantly, the end event would emit since no async wait was
between fs.createReadStream and the file read there emits end.
2012-05-27 20:00:19 +02:00
Igor Zinkovsky 39e25528eb windows: enable creating directory junctions with fs.symlink 2012-05-24 01:15:15 -07:00
Ben Noordhuis 039fac633e deps: upgrade libuv to a478847
The event loop's reference counting scheme in this version of libuv has changed.
Update the libuv bindings to reflect that fact.
2012-05-22 16:14:24 +02:00