Commit Graph

7326 Commits (0506d294dc5a51556e935a50a754aa7cbd7a7977)

Author SHA1 Message Date
Ryunosuke SATO 0506d294dc events: fix typos in code comment
- newListeners -> newListener
2012-12-10 13:08:26 +01:00
Ryunosuke SATO eb502205d5 events: setMaxListeners() should not have side effects
This object initialization has been unnecessary since 12cf730b.

Ref #3803.
2012-12-10 13:07:35 +01:00
Ryunosuke SATO 1c7acd2c84 events: use assigned variable instead of arguments
Always `arguments[0]` is used when `EventEmitter#emit` called.
Using assigned variable is faster than `arguments[0]`.
2012-12-10 13:04:46 +01:00
Ryunosuke SATO 0397223ab4 events: use null assignment instead of deleting property 2012-12-10 08:59:14 +01:00
Bert Belder 3c293ba272 http: protect against response splitting attacks 2012-12-07 17:13:51 -08:00
isaacs 0e95ea42ce lint
introduced in 5b65638.
2012-12-07 16:58:16 -08:00
isaacs 33fa740577 fs: Raise error when null bytes detected in paths
Reworking of @bnoordhuis's more aggressive approach.
2012-12-07 16:52:46 -08:00
Ben Noordhuis 5b65638124 tls, https: add tls handshake timeout
Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.

Adds a new tls.Server and https.Server configuration option, handshakeTimeout.

Fixes #4355.
2012-12-06 17:39:24 +01:00
Ben Noordhuis 3ece130ea2 process: add getgroups(), setgroups(), initgroups()
DRY the getuid(), getgid(), etc. functions while we're at it.
2012-12-06 17:14:58 +01:00
Ben Noordhuis c08e947fbd buffer: remove unused #includes 2012-12-06 04:45:11 +01:00
Ben Noordhuis c81dec70e6 test: remove simple/test-child-process-fork2
The test assumes the parent and the child are scheduled fairly. Probably true
most of the time but not always, making it fail spuriously.

Bad test, remove it.
2012-12-05 05:46:20 +01:00
Shigeki Ohtsu 1c8a5269c5 test: fix simple/test-debug-brk-file race condition
V8 debug agent needs some time to be ready and no longer sends the first event
break response to a debug client. We wait some time to connect the agent and
check its break status by obtaining breakpoint list and seeing if it exists on
line 0.
2012-12-05 04:31:22 +01:00
Ben Noordhuis 1f76a2eddc fs: add long stacktrace debugging facility
Enable long stacktraces if NODE_DEBUG=fs is set in the environment. Only
applies to the default rethrow callback; it's to help you find places where
you forgot to pass in a callback.
2012-12-04 08:12:12 +01:00
Ben Noordhuis a80434736b fs: fix 'object is not a function' callback errors
Use a default callback if the user omitted one. Avoids errors like the one
below:

  fs.js:777
      if (err) return callback(err);
                      ^
  TypeError: object is not a function
          at fs.appendFile (fs.js:777:21)
          at Object.oncomplete (fs.js:297:15)

This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile()
when the callback is omitted. Before, they silently swallowed errors.

Fixes #4352.
2012-12-04 08:05:55 +01:00
Bert Belder 03b00dcca9 os: throw when os.networkInterfaces() fails 2012-12-03 22:35:01 +01:00
Fedor Indutny 51d5655efa crypto: fix leak in GetPeerCertificate 2012-12-03 20:30:41 +04:00
Ben Noordhuis 9d02bfbc25 test: fix simple/test-setproctitle on freebsd 2012-12-03 03:08:19 +01:00
Ben Noordhuis f8999da514 build: avoid -Wno-old-style-declaration with gcc 4.2
Fixes the build on FreeBSD <= 9 with the default compiler.

Fixes #4186.
2012-12-03 02:21:32 +01:00
isaacs 4de274cbee test: TTY only has writeBuffer(), not write()
This test is only passing because it's skipped normally.
2012-12-01 11:17:51 -08:00
isaacs 3149d2f7dc benchmark: Add net-pipe benchmark
Just sends a buffer to a server, which echoes it back, and then measures
the Gbits/second.  Very similar to throughput.js, but using a single
process, so that it's possible to dtrace and get the jsstack frames for
profile comparison.
2012-11-30 18:26:18 -08:00
Chad Rhyner 8fc578b631 test: disable eio-race tests
Disabled the following unit tests:

* test-eio-race.js
* test-eio-race2.js
* test-eio-race4.js

These tests are known to fail on busy boxes due to being timing sensitive,
and are deemed not meaningful tests.

See https://github.com/joyent/node/issues/4272

Fixes #4272.
2012-11-27 07:18:00 +01:00
Adam Malcontenti-Wilson 0c9bee49fb build: support ARM in makefile target 'binary' 2012-11-27 07:14:21 +01:00
Michael Axiak ffb4c173a4 build: add $(PYTHON) when calling configure 2012-11-27 05:44:11 +01:00
Ben Noordhuis aa3441ae45 js2c: raise proper Exception, not a string
Fixes the following error message:

  TypeError: exceptions must be old-style classes or derived
  from BaseException, not str

Fixes #4303.
2012-11-24 01:14:09 +01:00
Ben Noordhuis 335f20896a crypto: allow negative numbers in setOptions()
OR'ing together two large values, like `SSL_OP_ALL | SSL_OP_NO_TICKET`,
produces a negative number. To wit:

  assert((0x80000000 | 0x4000) === -0x7fffc000); // true
  assert((0x80000000 | 0x4000) ===  0x80004000); // false!

It's easy to work around by doing a logical shift, like this:

  assert((0x80000000 | 0x4000) >>> 0 ===  0x80004000); // true

But that's not very intuitive. Let's be more lenient in what we accept.
2012-11-24 00:10:25 +01:00
Ben Noordhuis 8d2753c141 constants: fix wrapping of large constants
Use Number::New() instead of Integer::New(). The latter wraps large values,
e.g. 0x80000000 becomes -2147483648 instead of 2147483648.
2012-11-22 16:10:36 +01:00
Shigeki Ohtsu 11a5119e72 build: disable use of thin archive
Thin archive needs binutils >= 2.19, disable it for supporting old ar
even if static libraries are linked within a local build.
2012-11-21 14:06:37 +01:00
Scott Blomquist f657ce685d windows: add tracing with performance counters
Patch by Henry Rawas and Scott Blomquist.
2012-11-21 01:21:53 +01:00
Bert Belder bc9388342f windows: fix normalization of UNC paths 2012-11-21 01:21:25 +01:00
Ben Noordhuis a25ebb1997 v8: fix dragonflybsd build
* fix gyp build
* don't require libexecinfo, it's not there
* libpthread doesn't implement sem_timedwait(), fall back to sem_wait()

Upstreamed in https://codereview.chromium.org/11421013/
2012-11-20 22:48:26 +01:00
Ben Noordhuis 1e738c5ef2 build: make python executable configurable
Upstreamed in https://codereview.chromium.org/11418101/

Fixes #4287.
2012-11-20 22:47:45 +01:00
Ben Noordhuis 815a181d03 deps: upgrade cares to 213f2b7 2012-11-20 22:44:23 +01:00
Ben Noordhuis 8ba1bec47d deps: upgrade libuv to fc5984f 2012-11-20 22:44:23 +01:00
Tim Kuijsten 6f9ed28fac doc: fix typo in setPrivateKey function signature 2012-11-20 18:02:56 +01:00
Ben Noordhuis 38c52a0575 tools: update gyp to r1535
This commit contains one additional patch that makes gyp work on DragonFlyBSD,
see https://codereview.chromium.org/11348152/ for details.
2012-11-20 16:40:51 +01:00
Sergey Kholodilov 019ad346e0 crypto: fix ssl error handling
Make HandleSSLError() correctly process a zero status code: sometimes it
indicates an error and sometimes it doesn't.
2012-11-17 00:52:58 +01:00
Ben Noordhuis 71ba7bc2a0 node: remove eio-emul.h
The purpose of this file was to remap the old libeio API to the new one.
We dropped libeio in ee77a6a and this file has been broken ever since.

Ergo, remove it.
2012-11-16 23:44:44 +01:00
Stephen Gallagher 38809e3985 build: allow linking against system libuv 2012-11-16 23:34:13 +01:00
Ben Noordhuis b6a3b0a629 deps: upgrade libuv to 665a316 2012-11-16 17:58:42 +01:00
isaacs e2bcff9aa7 bench: Use hrtime in throughput benchmark 2012-11-11 10:02:33 -08:00
Ben Noordhuis b6e989759b repl: don't interpret floating point numbers
Don't interpret floating point numbers, e.g. ".1234", as REPL commands.

Fixes #4268.
2012-11-10 18:21:17 +01:00
Trevor Norris 13c5db9771 buffer: remove duplicate assertion tests
Many assertion tests are duplicated in buffer.js. These few could be easily
removed and still have all tests pass.
2012-11-10 02:11:04 +01:00
Nathan Rajlich 5e4e87ade5 os: add os.endianness() function 2012-11-08 12:31:45 -08:00
Nathan Rajlich 3c91a7ae10 readline: use a "string_decoder" to parse "keypress" events
While updating the readline test cases to test both "terimal: false" and
"terminal: true" mode, it turned out that the test case testing utf8 chars
being sent over multiple write() calls was failing. The solution is to use
a string_decoder instance when parsing the "keypress" events.
2012-11-06 16:28:30 -08:00
Nathan Rajlich e95e095289 readline: don't emit "line" events with a trailing '\n' char
Before this commit, readline was inconsistent in whether or not it would emit
"line" events with or without the trailing "\n" included. When "terminal"
mode was true, then there would be no "\n", when it was false, then the "\n"
would be present. However, the trailing "\n" doesn't add much, and most of the
time people just end up stripping it manually.

Part of #4243.
2012-11-06 16:28:24 -08:00
Joshua Erickson fb6377ebd0 net: More accurate IP address validation and IPv6 dotted notation.
* Added isIP method to make use of inet_pton to cares_wrap.cc
* Modified net.isIP() to make use of new C++ isIP method.
* Added new tests to test-net-isip.js.
2012-11-06 16:49:21 +01:00
Shigeki Ohtsu f36bfd1590 build: remove jslint test/ on Windows
See 605927fbd9
2012-11-06 00:25:21 +01:00
Timothy J Fontaine 02dffb063e build: enable DEAD_CODE_STRIPPING on OS X 2012-11-06 00:18:36 +01:00
Timothy J Fontaine 0f3ddad0fc build: let xcode pick proper compiler 2012-11-06 00:18:36 +01:00
Timothy J Fontaine ac047166f6 build: add configure option to generate xcode build files 2012-11-06 00:18:36 +01:00