platform/upstream/nodejs.git
12 years agodebugger: fix --debug-brk
tasogarepg [Fri, 7 Sep 2012 18:18:39 +0000 (03:18 +0900)]
debugger: fix --debug-brk

12 years agoNow working on v0.9.3
isaacs [Tue, 18 Sep 2012 01:34:48 +0000 (18:34 -0700)]
Now working on v0.9.3

12 years agoMerge branch 'v0.9.2-release'
isaacs [Tue, 18 Sep 2012 01:34:31 +0000 (18:34 -0700)]
Merge branch 'v0.9.2-release'

12 years ago2012.09.17, Version 0.9.2 (Unstable) v0.9.2
isaacs [Mon, 17 Sep 2012 04:51:47 +0000 (21:51 -0700)]
2012.09.17, Version 0.9.2 (Unstable)

* http_parser: upgrade to ad3b631

* openssl: upgrade 1.0.1c

* darwin: use FSEvents to watch directory changes (Fedor Indutny)

* unix: support missing API on NetBSD (Shigeki Ohtsu)

* unix: fix EMFILE busy loop (Ben Noordhuis)

* windows: un-break writable tty handles (Bert Belder)

* windows: map WSAESHUTDOWN to UV_EPIPE (Bert Belder)

* windows: make spawn with custom environment work again (Bert Belder)

* windows: map ERROR_DIRECTORY to UV_ENOENT (Bert Belder)

* tls, https: validate server certificate by default (Ben Noordhuis)

* tls, https: throw exception on missing key/cert (Ben Noordhuis)

* tls: async session storage (Fedor Indutny)

* installer: don't install header files (Ben Noordhuis)

* buffer: implement Buffer.prototype.toJSON() (Nathan Rajlich)

* buffer: added support for writing NaN and Infinity (koichik)

* http: make http.ServerResponse emit 'end' (Ben Noordhuis)

* build: ./configure --ninja (Ben Noordhuis, Timothy J Fontaine)

* installer: fix --without-npm (Ben Noordhuis)

* cli: make -p equivalent to -pe (Ben Noordhuis)

* url: Go much faster by using Url class (isaacs)

12 years agoopenssl: fix the Windows x64 build
Bert Belder [Tue, 18 Sep 2012 00:13:29 +0000 (02:13 +0200)]
openssl: fix the Windows x64 build

12 years agoopenssl: Set flags to properly build on sunos
isaacs [Mon, 17 Sep 2012 23:54:36 +0000 (16:54 -0700)]
openssl: Set flags to properly build on sunos

12 years agoopenssl: fix the Windows x64 build
Bert Belder [Tue, 18 Sep 2012 00:13:29 +0000 (02:13 +0200)]
openssl: fix the Windows x64 build

12 years agotest: fs.watch filename support on Darwin
isaacs [Mon, 17 Sep 2012 22:45:37 +0000 (15:45 -0700)]
test: fs.watch filename support on Darwin

12 years agouv: Upgrade to 778144f0
isaacs [Mon, 17 Sep 2012 22:36:05 +0000 (15:36 -0700)]
uv: Upgrade to 778144f0

joyent/libuv@778144f0b5bc14fe55d79854d0a67124ceaa4b22

12 years agoconfigure: always use shlex instead of split
Alex Xu [Sat, 15 Sep 2012 01:06:25 +0000 (21:06 -0400)]
configure: always use shlex instead of split

Use shlex module instead of builtin string split to parse CC.

12 years agourl: Go much faster by using Url class
isaacs [Thu, 13 Sep 2012 18:09:54 +0000 (11:09 -0700)]
url: Go much faster by using Url class

V8 loves it when JavaScript pretends to be a Classic inheritance
type of language.

Before:

$ ./node benchmark/url.js
benchmarking parse() ... 1.868 sec
benchmarking format() ... 1.906 sec
benchmarking resolve("../foo/bar?baz=boom") ... 7.800 sec
benchmarking resolve("foo/bar") ... 7.099 sec
benchmarking resolve("http://nodejs.org") ... 8.403 sec
benchmarking resolve("./foo/bar?baz") ... 7.974 sec

After:

$ ./node benchmark/url.js
benchmarking parse() ... 1.769 sec
benchmarking format() ... 1.793 sec
benchmarking resolve("../foo/bar?baz=boom") ... 4.254 sec
benchmarking resolve("foo/bar") ... 3.932 sec
benchmarking resolve("http://nodejs.org") ... 4.382 sec
benchmarking resolve("./foo/bar?baz") ... 4.293 sec

12 years agotest: set rejectUnauthorized in tls/https tests
Ben Noordhuis [Thu, 30 Aug 2012 14:43:20 +0000 (16:43 +0200)]
test: set rejectUnauthorized in tls/https tests

Update the tls and https tests to explicitly set rejectUnauthorized instead of
relying on the NODE_TLS_REJECT_UNAUTHORIZED environment variable getting set.

12 years agotls, https: validate server certificate by default
Ben Noordhuis [Thu, 30 Aug 2012 13:14:37 +0000 (15:14 +0200)]
tls, https: validate server certificate by default

This commit changes the default value of the rejectUnauthorized option from
false to true.

What that means is that tls.connect(), https.get() and https.request() will
reject invalid server certificates from now on, including self-signed
certificates.

There is an escape hatch: if you set the NODE_TLS_REJECT_UNAUTHORIZED
environment variable to the literal string "0", node.js reverts to its
old behavior.

Fixes #3949.

12 years agouv: upgrade to 3d9de13
Bert Belder [Fri, 14 Sep 2012 02:00:30 +0000 (04:00 +0200)]
uv: upgrade to 3d9de13

12 years agouv: upgrade to a28f145
Bert Belder [Fri, 14 Sep 2012 00:56:41 +0000 (02:56 +0200)]
uv: upgrade to a28f145

12 years agobuffer: update constructor prototype
Pavel Lang [Thu, 13 Sep 2012 06:31:50 +0000 (08:31 +0200)]
buffer: update constructor prototype

Change Buffer::New(char*, size_t) to Buffer::New(const char*, size_t).

12 years agocrypto: use uv_thread_self()
Ben Noordhuis [Thu, 13 Sep 2012 14:19:36 +0000 (16:19 +0200)]
crypto: use uv_thread_self()

12 years agodeps: upgrade libuv to 1f9bd99
Ben Noordhuis [Thu, 13 Sep 2012 14:18:54 +0000 (16:18 +0200)]
deps: upgrade libuv to 1f9bd99

12 years agobench: correct time calculation in url.js
Ben Noordhuis [Thu, 13 Sep 2012 12:02:22 +0000 (14:02 +0200)]
bench: correct time calculation in url.js

12 years agoopenssl: disable EC_NISTP_64_GCC_128 on ia32
Shigeki Ohtsu [Thu, 13 Sep 2012 02:28:59 +0000 (11:28 +0900)]
openssl: disable EC_NISTP_64_GCC_128 on ia32

uint128_t won't work on 32-bit platform

Closes #4008.

12 years agobench: improve url parser benchmark
Ben Noordhuis [Wed, 12 Sep 2012 23:18:09 +0000 (01:18 +0200)]
bench: improve url parser benchmark

12 years agobench: add url parser benchmark
Felix Böhm [Sun, 20 May 2012 19:54:48 +0000 (22:54 +0300)]
bench: add url parser benchmark

12 years agoMerge remote-tracking branch 'ry/v0.8' into master
isaacs [Wed, 12 Sep 2012 22:13:07 +0000 (15:13 -0700)]
Merge remote-tracking branch 'ry/v0.8' into master

Conflicts:
ChangeLog
src/node_version.h
test/simple/test-util-inspect.js

12 years agohttp: Remove timeout handler when data arrives
Frédéric Germain [Sun, 9 Sep 2012 12:32:40 +0000 (14:32 +0200)]
http: Remove timeout handler when data arrives

12 years agoopenssl: disable harmless compiler warnings
Ben Noordhuis [Wed, 12 Sep 2012 15:57:15 +0000 (17:57 +0200)]
openssl: disable harmless compiler warnings

Compile with -Wno-missing-field-initializers and -Wno-old-style-declaration.
The warnings are harmless but they clutter the build output a great deal.

12 years agodoc: fs: clarfify fs.watch() documentation
Ben Noordhuis [Wed, 12 Sep 2012 15:04:31 +0000 (17:04 +0200)]
doc: fs: clarfify fs.watch() documentation

fs.watch() is implemented on all supported platforms but, depending on the
object being watched, doesn't always work reliably (or at all).

Fixes #4005.

12 years agoopenssl: remove obsolete patch files
Bert Belder [Tue, 11 Sep 2012 22:52:50 +0000 (00:52 +0200)]
openssl: remove obsolete patch files

These patches were provided by Android and Chromium. In this form they
are not useful. The ones that we need are landed as separate commits.

As of openssl 1.0.1c, three of them made it upstream:
  * npn.patch (Next Protocol Negotiation support)
  * tls_exporter.patch (RFC 5705 Keying Material Exporters for TLS)
  * openssl_no_dtls1.patch (minor bugfix)

12 years agoopenssl: update the GYP build to work with openssl 1.0.1c
Bert Belder [Tue, 11 Sep 2012 17:00:05 +0000 (19:00 +0200)]
openssl: update the GYP build to work with openssl 1.0.1c

12 years agoopenssl: replace symlinks by #include shims
Bert Belder [Tue, 11 Sep 2012 21:19:40 +0000 (23:19 +0200)]
openssl: replace symlinks by #include shims

Git for Windows can't create symlinks. This works too.

12 years agoopenssl: use dummy OPENSSL_cpuid_setup function
Bert Belder [Tue, 11 Sep 2012 16:57:47 +0000 (18:57 +0200)]
openssl: use dummy OPENSSL_cpuid_setup function

Use a empty implementation for function OPENSSL_cpuid_setup to resolve link
error. We should figure out how to geenrate platform specific implementation
of OPENSSL_cpuid_setup by leveraging crypto/*cpuid.pl.

This patch is taken from Chromium.

12 years agoopenssl: don't read user input from the TTY
Bert Belder [Wed, 11 Apr 2012 16:20:54 +0000 (18:20 +0200)]
openssl: don't read user input from the TTY

12 years agoopenssl: fix uninitialized memory access
Ben Noordhuis [Wed, 15 Aug 2012 00:10:02 +0000 (02:10 +0200)]
openssl: fix uninitialized memory access

ASN1_STRING_to_UTF8() passes an ASN1_STRING to ASN1_STRING_set() but
forgot to initialize the `length` field.

Fixes the following valgrind error:

  $ valgrind -q --track-origins=yes --num-callers=19 \
      out/Debug/node test/simple/test-tls-client-abort.js
  ==2690== Conditional jump or move depends on uninitialised value(s)
  ==2690==    at 0x784B69: ASN1_STRING_set (asn1_lib.c:382)
  ==2690==    by 0x809564: ASN1_mbstring_ncopy (a_mbstr.c:204)
  ==2690==    by 0x8090F0: ASN1_mbstring_copy (a_mbstr.c:86)
  ==2690==    by 0x782F1F: ASN1_STRING_to_UTF8 (a_strex.c:570)
  ==2690==    by 0x78F090: asn1_string_canon (x_name.c:409)
  ==2690==    by 0x78EF17: x509_name_canon (x_name.c:354)
  ==2690==    by 0x78EA7D: x509_name_ex_d2i (x_name.c:210)
  ==2690==    by 0x788058: ASN1_item_ex_d2i (tasn_dec.c:239)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x787C93: ASN1_item_d2i (tasn_dec.c:136)
  ==2690==    by 0x78F5E4: d2i_X509 (x_x509.c:141)
  ==2690==    by 0x7C9B91: PEM_ASN1_read_bio (pem_oth.c:81)
  ==2690==    by 0x7CA506: PEM_read_bio_X509 (pem_x509.c:67)
  ==2690==    by 0x703C9A: node::crypto::SecureContext::AddRootCerts(v8::Arguments const&) (node_crypto.cc:497)
  ==2690==  Uninitialised value was created by a stack allocation
  ==2690==    at 0x782E89: ASN1_STRING_to_UTF8 (a_strex.c:560)

12 years agoopenssl: backward compatibility after x509 hash function change
Bert Belder [Tue, 11 Sep 2012 17:06:07 +0000 (19:06 +0200)]
openssl: backward compatibility after x509 hash function change

There are many symbolic links under /etc/ssl/certs created by using hash of
the pem certificates in order for OpenSSL to find those certificate.
Openssl has a tool to help you create hash symbolic links. (See tools/c_rehash)
However the new openssl changed the hash algorithm, Unless you compile/install
the latest openssl library and re-create all related symbolic links, the new
openssl can not find some certificates because the links of those certificates
were created by using old hash algorithm, which causes some tests failed.

This patch gives a way to find a certificate according to its hash by using both
new algorithm and old algorithm.

crbug.com/111045 is used to track this issue.

This patch is taken from the Chromium project.

12 years agoopenssl: apply upstream sha1-armv4-large.pl patch
Ben Noordhuis [Wed, 12 Sep 2012 02:22:02 +0000 (04:22 +0200)]
openssl: apply upstream sha1-armv4-large.pl patch

This is a back-port of r22768: sha1-armv4-large.pl: comply with ABI.

12 years agoopenssl: support handshake cut-through
Bert Belder [Tue, 11 Sep 2012 19:33:23 +0000 (21:33 +0200)]
openssl: support handshake cut-through

Enables SSL3+ clients to send application data immediately following the
Finished message even when negotiating full-handshakes.  With this patch,
clients can negotiate SSL connections in 1-RTT even when performing
full-handshakes.

This patch is taken from the Android Open Source Project.

12 years agoopenssl: reduce memory consumption
Bert Belder [Tue, 11 Sep 2012 19:33:15 +0000 (21:33 +0200)]
openssl: reduce memory consumption

SSL records may be as large as 16K, but are typically < 2K.  In
addition, a historic bug in Windows allowed records to be as large
32K.  OpenSSL statically allocates read and write buffers (34K and
18K respectively) used for processing records.

With this patch, OpenSSL statically allocates 4K + 4K buffers, with
the option of dynamically growing buffers to 34K + 4K, which is a
saving of 44K per connection for the typical case.

This patch is taken from the Android Open Source Project.

12 years agodoc: http: expand request.headers documentation
Ben Noordhuis [Wed, 12 Sep 2012 00:46:45 +0000 (02:46 +0200)]
doc: http: expand request.headers documentation

12 years agoopenssl: upgrade to vanilla openssl 1.0.1c
Bert Belder [Tue, 11 Sep 2012 12:56:42 +0000 (14:56 +0200)]
openssl: upgrade to vanilla openssl 1.0.1c

12 years agoNow working on 0.8.10
isaacs [Tue, 11 Sep 2012 18:59:37 +0000 (11:59 -0700)]
Now working on 0.8.10

12 years agoblog: Post for 0.8.9
isaacs [Tue, 11 Sep 2012 18:57:57 +0000 (11:57 -0700)]
blog: Post for 0.8.9

12 years agoMerge branch 'v0.8.9-release' into v0.8
isaacs [Tue, 11 Sep 2012 18:58:35 +0000 (11:58 -0700)]
Merge branch 'v0.8.9-release' into v0.8

12 years ago2012.09.11, Version 0.8.9 (Stable) v0.8.9
isaacs [Tue, 11 Sep 2012 15:19:12 +0000 (08:19 -0700)]
2012.09.11, Version 0.8.9 (Stable)

* v8: upgrade to 3.11.10.22

* GYP: upgrade to r1477

* npm: Upgrade to 1.1.61

* npm: Don't create world-writable files (isaacs)

* windows: fix single-accept mode for shared server sockets (Bert Belder)

* windows: fix uninitialized memory access in uv_update_time() (Bert Belder)

* windows: don't throw when a signal handler is attached (Bert Belder)

* unix: fix memory leak in udp (Ben Noordhuis)

* unix: map errno ESPIPE (Ben Noordhuis)

* unix, windows: fix memory corruption in fs-poll.c (Ben Noordhuis)

* sunos: fix os.cpus() on x86_64 (Ben Noordhuis)

* child process: fix processes with IPC channel don't emit 'close' (Bert Belder)

* build: add a "--dest-os" option to force a gyp "flavor" (Nathan Rajlich)

* build: set `process.platform` to "sunos" on SunOS (Nathan Rajlich)

* build: fix `make -j` fails after `make clean` (Bearice Ren)

* build: fix openssl configuration for "arm" builds (Nathan Rajlich)

* tls: support unix domain socket/named pipe in tls.connect (Shigeki Ohtsu)

* https: make https.get() accept a URL (koichik)

* http: respect HTTP/1.0 TE header (Ben Noordhuis)

* crypto, tls: Domainify setSNICallback, pbkdf2, randomBytes (Ben Noordhuis)

* stream.pipe: Don't call destroy() unless it's a function (isaacs)

12 years agoUpdate doc and test for sunos/solaris switch
isaacs [Tue, 11 Sep 2012 17:57:16 +0000 (10:57 -0700)]
Update doc and test for sunos/solaris switch

12 years agobuffer: change prototype of Data() and Length()
Ben Noordhuis [Tue, 11 Sep 2012 16:33:28 +0000 (18:33 +0200)]
buffer: change prototype of Data() and Length()

Make Buffer:Data() and Buffer::Length() accept a Value instead of an Object.

12 years agodoc: Fork me image should be full url
isaacs [Tue, 11 Sep 2012 15:45:18 +0000 (08:45 -0700)]
doc: Fork me image should be full url

12 years agodoc: Put current version on homepage
isaacs [Tue, 11 Sep 2012 15:43:20 +0000 (08:43 -0700)]
doc: Put current version on homepage

12 years agodoc: Add Node Dublin to community page
isaacs [Tue, 11 Sep 2012 15:40:17 +0000 (08:40 -0700)]
doc: Add Node Dublin to community page

12 years agocrypto: remove legacy openssl compatibility code
Ben Noordhuis [Tue, 11 Sep 2012 13:42:02 +0000 (15:42 +0200)]
crypto: remove legacy openssl compatibility code

Remove code that works around a padding bug in older versions of openssl, the
bundled version of openssl contains the bug fix.

12 years agotest: add AES-256 padding crypto test
Ben Noordhuis [Tue, 11 Sep 2012 13:40:39 +0000 (15:40 +0200)]
test: add AES-256 padding crypto test

12 years agostream.pipe: Don't call destroy() unless it's a function
isaacs [Mon, 10 Sep 2012 22:58:30 +0000 (15:58 -0700)]
stream.pipe: Don't call destroy() unless it's a function

12 years agonpm: Upgrade to 1.1.61
isaacs [Mon, 10 Sep 2012 16:11:54 +0000 (09:11 -0700)]
npm: Upgrade to 1.1.61

12 years agoinstaller: don't install header files
Ben Noordhuis [Sun, 9 Sep 2012 23:31:11 +0000 (01:31 +0200)]
installer: don't install header files

They are no longer necessary now that node-waf has been removed. People need to
switch to node-gyp.

12 years agoconfigure: add a "--dest-os" option to force a gyp "flavor"
Nathan Rajlich [Sun, 9 Sep 2012 18:41:05 +0000 (11:41 -0700)]
configure: add a "--dest-os" option to force a gyp "flavor"

This makes cross-compiling easier. i.e. from my mac:

    ./configure --dest-cpu=arm --dest-os=linux

12 years agodocs: fix typo in Buffer#toJSON() docs
Nathan Rajlich [Sun, 9 Sep 2012 18:15:45 +0000 (11:15 -0700)]
docs: fix typo in Buffer#toJSON() docs

12 years agobuffer: implement Buffer.prototype.toJSON()
Nathan Rajlich [Sat, 8 Sep 2012 23:10:00 +0000 (16:10 -0700)]
buffer: implement Buffer.prototype.toJSON()

Returns an Array-representation of the Buffer.
Closes #3905.

12 years agoutil: make util.inspect() work when "hasOwnProperty" is overwritten
Nathan Rajlich [Sat, 8 Sep 2012 22:09:59 +0000 (15:09 -0700)]
util: make util.inspect() work when "hasOwnProperty" is overwritten

12 years agohttp: respect HTTP/1.0 TE header
Ben Noordhuis [Sat, 8 Sep 2012 19:43:55 +0000 (21:43 +0200)]
http: respect HTTP/1.0 TE header

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.

12 years agocluster.worker description and examples ere missing from the top level of docs
Pooya Karimian [Fri, 17 Aug 2012 20:57:23 +0000 (13:57 -0700)]
cluster.worker description and examples ere missing from the top level of docs

12 years agov8: fix semaphore on MacOS
Fedor Indutny [Thu, 6 Sep 2012 14:06:15 +0000 (16:06 +0200)]
v8: fix semaphore on MacOS

Landed upstream: https://chromiumcodereview.appspot.com/10867009/

12 years agov8: reapply floating patches
Bert Belder [Tue, 21 Aug 2012 01:05:25 +0000 (03:05 +0200)]
v8: reapply floating patches

12 years agov8: upgrade to 3.11.10.22
Bert Belder [Thu, 6 Sep 2012 13:58:09 +0000 (15:58 +0200)]
v8: upgrade to 3.11.10.22

12 years agotls: async session storage
Fedor Indutny [Sat, 7 Jul 2012 20:20:23 +0000 (16:20 -0400)]
tls: async session storage

12 years agohttp: make http.ServerResponse emit 'end'
Ben Noordhuis [Tue, 4 Sep 2012 19:54:40 +0000 (21:54 +0200)]
http: make http.ServerResponse emit 'end'

This used to be the internal 'finish' event. Make it public so API users will
know when the response has been sent completely.

Fixes #3855.

12 years agodoc: don't use &apos;
Bert Belder [Tue, 4 Sep 2012 14:24:20 +0000 (16:24 +0200)]
doc: don't use &apos;

Ref: #3964

12 years agobuild: add ninja support to Makefile
Ben Noordhuis [Tue, 4 Sep 2012 14:03:01 +0000 (16:03 +0200)]
build: add ninja support to Makefile

12 years agobuild: add configure option to build with ninja
Timothy J Fontaine [Wed, 22 Aug 2012 20:36:04 +0000 (16:36 -0400)]
build: add configure option to build with ninja

12 years agoinstaller: reapply b21c8e0b, honor --without-npm
Ben Noordhuis [Tue, 4 Sep 2012 13:08:29 +0000 (15:08 +0200)]
installer: reapply b21c8e0b, honor --without-npm

This bug was already fixed in the v0.8 branch but git skips the patch when
merging v0.8 into master. Reapply it manually.

Fixes #3961.

12 years agoMerge remote-tracking branch 'origin/v0.8'
Ben Noordhuis [Tue, 4 Sep 2012 13:02:20 +0000 (15:02 +0200)]
Merge remote-tracking branch 'origin/v0.8'

Conflicts:
deps/uv/include/uv.h
src/node_crypto.cc

12 years agotest: add extra checks in simple/test-cli-eval
Ben Noordhuis [Tue, 4 Sep 2012 12:40:59 +0000 (14:40 +0200)]
test: add extra checks in simple/test-cli-eval

12 years agocli: make argument to -p optional
Ben Noordhuis [Tue, 4 Sep 2012 12:19:59 +0000 (14:19 +0200)]
cli: make argument to -p optional

12 years agodoc: fix typo in api/cluster
Atsuya Takagi [Mon, 3 Sep 2012 10:09:50 +0000 (03:09 -0700)]
doc: fix typo in api/cluster

12 years agocrypto, tls: make setSNICallback() compatible with domains
Ben Noordhuis [Mon, 3 Sep 2012 21:26:19 +0000 (23:26 +0200)]
crypto, tls: make setSNICallback() compatible with domains

12 years agocrypto: make pbkdf2() compatible with domains
Ben Noordhuis [Mon, 3 Sep 2012 21:15:30 +0000 (23:15 +0200)]
crypto: make pbkdf2() compatible with domains

12 years agocrypto: make randomBytes() compatible with domains
Ben Noordhuis [Mon, 3 Sep 2012 21:09:17 +0000 (23:09 +0200)]
crypto: make randomBytes() compatible with domains

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.

12 years agowindows: don't blow when a signal handler is attached
Bert Belder [Mon, 3 Sep 2012 17:05:40 +0000 (19:05 +0200)]
windows: don't blow when a signal handler is attached

Blowing up when the user attaches a signal handler makes no sense. Also,
in Node 0.10 signals will be supported, so allow people to get used to
it.

12 years agocli: make -p equivalent to -pe
Ben Noordhuis [Mon, 3 Sep 2012 14:42:18 +0000 (16:42 +0200)]
cli: make -p equivalent to -pe

Fixes #3938.

12 years agobuffer: added support for writing NaN and Infinity
koichik [Sat, 1 Sep 2012 15:14:18 +0000 (00:14 +0900)]
buffer: added support for writing NaN and Infinity

to writeDoubleBE(), writeDoubleLE(), writeFloatBE() and writeFloatLE().
Fixes #3934.

12 years agoRevert "buffer: added support for writing NaN and Infinity"
koichik [Sun, 2 Sep 2012 11:59:50 +0000 (20:59 +0900)]
Revert "buffer: added support for writing NaN and Infinity"

This reverts commit 6b9425fe3783193cf95cb04cbcbcbb97f5a77d31.

12 years agocrypto: fix build error on OS X
Ben Noordhuis [Sun, 2 Sep 2012 11:45:56 +0000 (13:45 +0200)]
crypto: fix build error on OS X

pthread_t is a pointer type on OS X but an unsigned long on most other
platforms. Use a C style cast because reinterpret_cast nor static_cast
work in all cases.

12 years agodoc: document prerequisites in README
Ben Noordhuis [Sun, 2 Sep 2012 11:32:57 +0000 (13:32 +0200)]
doc: document prerequisites in README

12 years agobuffer: added support for writing NaN and Infinity
koichik [Sat, 1 Sep 2012 15:14:18 +0000 (00:14 +0900)]
buffer: added support for writing NaN and Infinity

to writeDoubleBE(), writeDoubleLE(), writeFloatBE() and writeFloatLE().
Fixes #3934.

12 years agocrypto: use CRYPTO_THREADID_set_callback()
Ben Noordhuis [Thu, 30 Aug 2012 22:37:45 +0000 (00:37 +0200)]
crypto: use CRYPTO_THREADID_set_callback()

Don't use CRYPTO_set_id_callback(), it's deprecated.

12 years agotls: support unix domain socket/named pipe in tls.connect
Shigeki Ohtsu [Thu, 30 Aug 2012 15:11:05 +0000 (00:11 +0900)]
tls: support unix domain socket/named pipe in tls.connect

12 years agouv: upgrade to 5eb1d19
Bert Belder [Thu, 30 Aug 2012 15:29:47 +0000 (17:29 +0200)]
uv: upgrade to 5eb1d19

12 years agouv: upgrade to 24c062c
Bert Belder [Thu, 30 Aug 2012 15:28:02 +0000 (17:28 +0200)]
uv: upgrade to 24c062c

12 years agochild process: fix processes with IPC channel don't emit 'close'
Bert Belder [Thu, 30 Aug 2012 14:13:27 +0000 (16:13 +0200)]
child process: fix processes with IPC channel don't emit 'close'

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.

12 years agobuild: set `process.platform` to "sunos" on SunOS
Nathan Rajlich [Wed, 29 Aug 2012 21:57:25 +0000 (14:57 -0700)]
build: set `process.platform` to "sunos" on SunOS

gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.

12 years agobuild: set `process.platform` to "sunos" on SunOS
Nathan Rajlich [Wed, 29 Aug 2012 21:57:25 +0000 (14:57 -0700)]
build: set `process.platform` to "sunos" on SunOS

gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.

12 years agodoc: fix grammar errors
Ankur Oberoi [Wed, 29 Aug 2012 16:52:55 +0000 (13:52 -0300)]
doc: fix grammar errors

12 years agodeps: upgrade http_parser to ad3b631
Ben Noordhuis [Wed, 29 Aug 2012 22:06:47 +0000 (00:06 +0200)]
deps: upgrade http_parser to ad3b631

12 years agotls, https: throw exception on missing key/cert
Ben Noordhuis [Wed, 29 Aug 2012 20:53:00 +0000 (22:53 +0200)]
tls, https: throw exception on missing key/cert

Throw an exception in the tls.Server constructor when the options object
doesn't contain either a PFX or a key/certificate combo.

Said change exposed a bug in simple/test-tls-junk-closes-server. Addressed.

Fixes #3941.

12 years agoTest client renegotiation attacks on HTTPS
isaacs [Wed, 29 Aug 2012 19:26:28 +0000 (12:26 -0700)]
Test client renegotiation attacks on HTTPS

This test should output roughly the same results as the tls ci-reneg attack
pummel test.  However, it does not.

12 years agodoc: update assert.doesNotThrow() docs
Ben Noordhuis [Wed, 29 Aug 2012 00:30:15 +0000 (02:30 +0200)]
doc: update assert.doesNotThrow() docs

It takes an optional "expected exception" argument that is not used meaningfully
but is nevertheless documented. Undocument it, it confuses casual readers of the
documentation.

Fixes #3935.

12 years agoblog: Post for 0.9.1 release
isaacs [Tue, 28 Aug 2012 22:34:08 +0000 (15:34 -0700)]
blog: Post for 0.9.1 release

12 years agoNow working on 0.9.2
isaacs [Tue, 28 Aug 2012 22:32:01 +0000 (15:32 -0700)]
Now working on 0.9.2

12 years agoMerge branch 'v0.9.1-release'
isaacs [Tue, 28 Aug 2012 22:31:40 +0000 (15:31 -0700)]
Merge branch 'v0.9.1-release'

12 years ago2012.08.28, Version 0.9.1 (Unstable) v0.9.1
isaacs [Tue, 28 Aug 2012 15:46:29 +0000 (08:46 -0700)]
2012.08.28, Version 0.9.1 (Unstable)

* buffer: Add Buffer.isEncoding(enc) to test for valid encoding values (isaacs)

* Raise UV_ECANCELED on premature close. (Ben Noordhuis)

* Remove c-ares from libuv, move to a top-level node dependency (Bert Belder)

* ref/unref for all HandleWraps, timers, servers, and sockets (Timothy J Fontaine)

* addon: remove node-waf, superseded by node-gyp (Ben Noordhuis)

* child_process: emit error on exec failure (Ben Noordhuis)

* cluster: do not use internal server API (Andreas Madsen)

* constants: add O_DIRECT (Ian Babrou)

* crypto: add sync interface to crypto.pbkdf2() (Ben Noordhuis)

* darwin: emulate fdatasync() (Fedor Indutny)

* dgram: make .bind() always asynchronous (Ben Noordhuis)

* events: Make emitter.listeners() side-effect free (isaacs, Joe Andaverde)

* fs: Throw early on invalid encoding args (isaacs)

* fs: fix naming of truncate/ftruncate functions (isaacs)

* http: bubble up parser errors to ClientRequest (Brian White)

* linux: improve cpuinfo parser on ARM and MIPS (Ben Noordhuis)

* net: add support for IPv6 addresses ending in :: (Josh Erickson)

* net: support Server.listen(Pipe) (Andreas Madsen)

* node: don't scan add-on for "init" symbol (Ben Noordhuis)

* remove process.uvCounters() (Ben Noordhuis)

* repl: console writes to repl rather than process stdio (Nathan Rajlich)

* timers: implement setImmediate (Timothy J Fontaine)

* tls: fix segfault in pummel/test-tls-ci-reneg-attack (Ben Noordhuis)

* tools: Move gyp addon tools to node-gyp (Nathan Rajlich)

* unix: preliminary signal handler support (Ben Noordhuis)

* unix: remove dependency on ev_child (Ben Noordhuis)

* unix: work around darwin bug, don't poll() on pipe (Fedor Indutny)

* util: Formally deprecate util.pump() (Ben Noordhuis)

* windows: make active and closing handle state independent (Bert Belder)

* windows: report spawn errors to the exit callback (Bert Belder)

* windows: signal handling support with uv_signal_t (Bert Belder)

12 years agotest: make test-fs-truncate pass on windows
Bert Belder [Tue, 28 Aug 2012 22:16:53 +0000 (00:16 +0200)]
test: make test-fs-truncate pass on windows

12 years agouv: upgrade to abc945b
Bert Belder [Tue, 28 Aug 2012 20:49:34 +0000 (22:49 +0200)]
uv: upgrade to abc945b

12 years agobuild: fix `make -j' fails after `make clean'
Bearice Ren [Sun, 26 Aug 2012 03:20:42 +0000 (11:20 +0800)]
build: fix `make -j' fails after `make clean'

make fails if:
    ./configure && make clean && make -j6

as out/Makefile has not yet be made when entering sub dirs