platform/upstream/nodejs.git
10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Mon, 30 Dec 2013 23:55:47 +0000 (15:55 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

10 years agodeps: update gyp to 828ce09
Fedor Indutny [Wed, 18 Dec 2013 14:58:47 +0000 (18:58 +0400)]
deps: update gyp to 828ce09

10 years agotimers: setImmediate v8 optimization fix
pflannery [Tue, 10 Dec 2013 05:01:25 +0000 (05:01 +0000)]
timers: setImmediate v8 optimization fix

Prevent v8 disabling optimization for scenario "bad value context for
arguments value".

Solves #6631

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agodoc: Fix missing backtick in debugger doc
Dav Glass [Wed, 24 Jul 2013 18:17:28 +0000 (13:17 -0500)]
doc: Fix missing backtick in debugger doc

10 years agoquerystring: remove `name` from `stringify()`
Yorkie [Sat, 28 Dec 2013 12:59:57 +0000 (20:59 +0800)]
querystring: remove `name` from `stringify()`

QueryString.stringify() allowed a fourth argument that was used as a
conditional in the return value, but was undocumented, not used by core
and always was always false/undefiend. So the argument and conditional
have been removed.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agobuild: add settings for VS 2013 to vcbuild.bat
Lev Gimelfarb [Fri, 27 Dec 2013 19:39:55 +0000 (14:39 -0500)]
build: add settings for VS 2013 to vcbuild.bat

Search for VS2013 compiler 1st, before falling back to older ones. This
allows compiling using the latest VS2013.

10 years agodeps: update gyp to 828ce09
Fedor Indutny [Wed, 18 Dec 2013 14:58:47 +0000 (18:58 +0400)]
deps: update gyp to 828ce09

10 years agodoc: Missing word 'are' in documentation
Benjamin Waters [Thu, 26 Dec 2013 03:08:10 +0000 (22:08 -0500)]
doc: Missing word 'are' in documentation

Fix simple spelling mistake in documentation.

fix #5808

10 years agonpm: Upgrade to v1.3.22
isaacs [Thu, 26 Dec 2013 03:15:23 +0000 (19:15 -0800)]
npm: Upgrade to v1.3.22

10 years agosrc: only access stack of non-null errors
Vladimir Kurchatkin [Mon, 23 Dec 2013 06:18:08 +0000 (10:18 +0400)]
src: only access stack of non-null errors

Avoid segmentation fault when `null` is thrown

10 years agoutil: introduce CHECK_EQ/CHECK_NE
Fedor Indutny [Thu, 19 Dec 2013 06:02:19 +0000 (10:02 +0400)]
util: introduce CHECK_EQ/CHECK_NE

10 years agoRevert "util: more strict check for bool/number/string"
Trevor Norris [Fri, 20 Dec 2013 21:44:56 +0000 (13:44 -0800)]
Revert "util: more strict check for bool/number/string"

This reverts commit 95ee84fabe0b028ef964cc1032cd56a6cf89cb0e.

10 years agotls: reintroduce socket.encrypted
Fedor Indutny [Thu, 19 Dec 2013 09:04:34 +0000 (13:04 +0400)]
tls: reintroduce socket.encrypted

Just a property that is always `true` for TLS sockets.

fix #6735

10 years agobuffer: optimize writeInt* methods
Paul Loyd [Thu, 12 Dec 2013 21:16:08 +0000 (01:16 +0400)]
buffer: optimize writeInt* methods

Remove unnecessary encoding within writeInt*

10 years agoevents: move EE c'tor guts to EventEmitter.init
Bert Belder [Thu, 12 Dec 2013 22:59:40 +0000 (14:59 -0800)]
events: move EE c'tor guts to EventEmitter.init

After landing 6ed861d it is no longer possible to reliably monkey-patch
the EventEmitter constructor. However there's valid use cases for that,
and makes for easier debugging. Therefore, move the guts of the
constructor to a separate function which is monkey-patchable.

Closes #6693

10 years agobuild: install common.gypi along with headers
T.C. Hollingsworth [Fri, 20 Dec 2013 08:29:06 +0000 (01:29 -0700)]
build: install common.gypi along with headers

node-gyp requires this file

10 years agotest: fix flaky unit test test-fs-realpath.js
Alexis Campailla [Thu, 19 Dec 2013 15:55:06 +0000 (07:55 -0800)]
test: fix flaky unit test test-fs-realpath.js

The test was not performing proper cleanup and so it would
fail if run more than one time on the same machine.

10 years agotest: case insensitve path comparison on Windows
Alexis Campailla [Thu, 19 Dec 2013 16:44:33 +0000 (08:44 -0800)]
test: case insensitve path comparison on Windows

Windows needs case insensitive comparison when it comes to
path strings.

10 years agohttp: parse the status message in a http response.
Cam Swords [Sun, 22 Sep 2013 14:06:58 +0000 (00:06 +1000)]
http: parse the status message in a http response.

10 years agodeps: update http_parser to 2.2
Fedor Indutny [Fri, 20 Dec 2013 13:33:29 +0000 (17:33 +0400)]
deps: update http_parser to 2.2

Main changes:

* Added support for http statusMessage

10 years agodoc: describe the local domain path on Windows
Sam Roberts [Thu, 19 Dec 2013 22:57:30 +0000 (14:57 -0800)]
doc: describe the local domain path on Windows

The UNIX domain is also known as the LOCAL domain (AF_LOCAL), and
node/libuv implements it on Windows using named pipes. The API
documentation did not describe the naming rules for named pipes, and
also repeatedly described `listen(path)` as being UNIX, which it is not
on Windows.

Closes #6743

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Thu, 19 Dec 2013 17:33:46 +0000 (09:33 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
ChangeLog
deps/uv/AUTHORS
deps/uv/ChangeLog
deps/uv/src/version.c
deps/v8/src/log-utils.cc
src/node_version.h

10 years agoblog: Post for v0.10.24
Timothy J Fontaine [Thu, 19 Dec 2013 17:05:14 +0000 (09:05 -0800)]
blog: Post for v0.10.24

10 years agoNow working on 0.10.25
Timothy J Fontaine [Thu, 19 Dec 2013 17:05:14 +0000 (09:05 -0800)]
Now working on 0.10.25

10 years agoMerge branch 'v0.10.24-release' into v0.10
Timothy J Fontaine [Thu, 19 Dec 2013 17:03:45 +0000 (09:03 -0800)]
Merge branch 'v0.10.24-release' into v0.10

10 years agocrypto: remove unnecessary OpenSSL_add_all_digests
Yorkie [Thu, 19 Dec 2013 11:11:19 +0000 (19:11 +0800)]
crypto: remove unnecessary OpenSSL_add_all_digests

`OpenSSL_add_all_algorithms` implicitly adds both digests and
ciphers. No need in calling `OpenSSL_add_all_digests` after it.

10 years agodeps: v8 apply temporary fix until backport
Fedor Indutny [Thu, 19 Dec 2013 08:51:34 +0000 (12:51 +0400)]
deps: v8 apply temporary fix until backport

Fix node.js debug build with a temporary v8 fix until the v8 team will
backport the fix from the more recent version of v8.

see https://code.google.com/p/v8/issues/detail?id=3062

10 years agowindows: fix dns lookup of localhost with ipv6
Alexis Campailla [Wed, 18 Dec 2013 18:08:33 +0000 (10:08 -0800)]
windows: fix dns lookup of localhost with ipv6

Removing a hack intended to shortcut the resolution of 'localhost'
but which doesn't work for ipv6.
This was introduced in 2876141c4292791bc12c0b8701dbcc366dde7297.
However it seems that the problems that this was trying to
circumvent has gone away ages ago, when dns resolution on
Windows started relying on Win32 GetAddrInfoW, which was
probably with be2320d408de89054b254a0c812280054d946490.

Fixes test-net-connect-options-ipv6.js on Windows.

10 years ago2013.12.18, Version 0.10.24 (Stable) v0.10.24
Timothy J Fontaine [Wed, 18 Dec 2013 23:49:45 +0000 (15:49 -0800)]
2013.12.18, Version 0.10.24 (Stable)

* uv: Upgrade to v0.10.21

* npm: upgrade to 1.3.21

* v8: backport fix for CVE-2013-{6639|6640}

* build: unix install node and dep library headers (Timothy J Fontaine)

* cluster, v8: fix --logfile=%p.log (Ben Noordhuis)

* module: only cache package main (Wyatt Preul)

10 years agouv: Upgrade to v0.10.21
Timothy J Fontaine [Wed, 18 Dec 2013 23:42:46 +0000 (15:42 -0800)]
uv: Upgrade to v0.10.21

10 years agocluster, v8: fix --logfile=%p.log
Ben Noordhuis [Tue, 17 Dec 2013 22:35:18 +0000 (23:35 +0100)]
cluster, v8: fix --logfile=%p.log

The %p is replaced with the current PID.  This used to work in node.js
v0.9.7 but it seems to have been lost somewhere along the way.

This commit makes the fix from 6b713b52 ("cluster: make --prof work for
workers") work again.  Without it, all log data ends up in a single
file and is unusable because the addresses are all wrong.

10 years agovm: fix race condition in timeout
Alexis Campailla [Tue, 17 Dec 2013 15:43:38 +0000 (07:43 -0800)]
vm: fix race condition in timeout

Eliminate a race condition between uv_async_send and the closing of the
corresponding handle.

Also made errors in Watchdog constructor call abort()

Fixes #6088

10 years agobuild: unix install node and dep library headers
Timothy J Fontaine [Thu, 10 Oct 2013 21:42:41 +0000 (14:42 -0700)]
build: unix install node and dep library headers

Restores functionality from v0.8 where module authors may not be
relying on gyp for building their modules.

10 years agoutil: more strict check for bool/number/string
Yorkie [Sat, 14 Dec 2013 21:09:28 +0000 (05:09 +0800)]
util: more strict check for bool/number/string

10 years agonpm: upgrade to 1.3.21
isaacs [Tue, 17 Dec 2013 22:33:52 +0000 (14:33 -0800)]
npm: upgrade to 1.3.21

10 years agonpm: upgrade to 1.3.20
isaacs [Tue, 17 Dec 2013 17:04:19 +0000 (09:04 -0800)]
npm: upgrade to 1.3.20

The 1.3.19 release had a critical bug: any packages published with it
could not be installed, because the shasum would be incorrect.

Thankfully, 1.3.19 was published using 1.3.19, so could not be installed
by any users!  However, if it goes out as part of a Node.js release,
then obviously that would be a problem.

10 years agonpm: Upgrade to 1.3.19
isaacs [Tue, 17 Dec 2013 00:23:13 +0000 (16:23 -0800)]
npm: Upgrade to 1.3.19

10 years agocrypto: comment change on disabling compression
Ahamed Nafeez [Sat, 14 Dec 2013 22:47:00 +0000 (04:17 +0530)]
crypto: comment change on disabling compression

This is a comment change, where it originally says disabling TLS
Compression protects against BEAST attack. But in fact, it is the
CRIME attack(Compression Ratio Info-leak Made Easy) that makes use
of TLS Compression and not BEAST.

BEAST(Browser Exploit Against SSL/TLS) is an entirely another variant
making use of the chosen boundary attack against CBC mode in
encryption.

Just making sure, that the exact reason for disabling TLS compression
must be made clear and not be misleading with some other attack.

10 years agodeps: update v8 to 3.22.24.9
Fedor Indutny [Fri, 13 Dec 2013 23:16:52 +0000 (03:16 +0400)]
deps: update v8 to 3.22.24.9

10 years agoMerge branch 'v0.10'
Fedor Indutny [Fri, 13 Dec 2013 23:03:50 +0000 (03:03 +0400)]
Merge branch 'v0.10'

Conflicts:
deps/v8/src/elements-kind.cc
deps/v8/src/elements-kind.h
deps/v8/src/hydrogen-instructions.h
deps/v8/src/hydrogen.cc
deps/v8/src/lithium.cc
deps/v8/src/lithium.h

10 years agov8: backport fix for CVE-2013-{6639|6640}
jkummerow@chromium.org [Fri, 13 Dec 2013 21:21:10 +0000 (14:21 -0700)]
v8: backport fix for CVE-2013-{6639|6640}

Quoting CVE-2013-6639:

    The DehoistArrayIndex function in hydrogen-dehoist.cc in Google V8
    before 3.22.24.7, as used in Google Chrome before 31.0.1650.63,
    allows remote attackers to cause a denial of service (out-of-bounds
    write) or possibly have unspecified other impact via JavaScript code
    that sets the value of an array element with a crafted index.

Quoting CVE-2013-6640:

    The DehoistArrayIndex function in hydrogen-dehoist.cc in Google V8
    before 3.22.24.7, as used in Google Chrome before 31.0.1650.63,
    allows remote attackers to cause a denial of service (out-of-bounds
    read) via JavaScript code that sets a variable to the value of an
    array element with a crafted index.

Like 6b92a7, this is unlikely to affect node.js because it only runs
local, trusted code.  However, if there exists some module somewhere
that populates an array index with remotely provided data this could
very well be used to crash a remote server running node.  Defense in
depth and all.

This is a backport of upstream commit r17801. Original commit log:

    Limit size of dehoistable array indices

    LOG=Y
    BUG=chromium:319835,chromium:319860
    R=dslomov@chromium.org

    Review URL: https://codereview.chromium.org/74113002

10 years agouv: Upgrade to v0.11.16
Fedor Indutny [Fri, 13 Dec 2013 18:35:09 +0000 (22:35 +0400)]
uv: Upgrade to v0.11.16

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Thu, 12 Dec 2013 19:32:41 +0000 (11:32 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
AUTHORS
ChangeLog
deps/uv/.mailmap
deps/uv/ChangeLog
deps/uv/build.mk
deps/uv/src/unix/darwin.c
deps/uv/src/unix/udp.c
deps/uv/src/version.c
deps/uv/test/test-list.h
src/node_version.h

10 years agomodule: only cache package main
Wyatt Preul [Thu, 12 Dec 2013 16:16:48 +0000 (10:16 -0600)]
module: only cache package main

10 years agotest: use s_client instead of curl
Lalit Kapoor [Wed, 11 Dec 2013 03:10:10 +0000 (21:10 -0600)]
test: use s_client instead of curl

fixes #6647

10 years agoblog: Post for v0.10.23
Timothy J Fontaine [Thu, 12 Dec 2013 06:11:19 +0000 (22:11 -0800)]
blog: Post for v0.10.23

10 years agoNow working on 0.10.24
Timothy J Fontaine [Thu, 12 Dec 2013 06:11:19 +0000 (22:11 -0800)]
Now working on 0.10.24

10 years agoMerge branch 'v0.10.23-release' into v0.10
Timothy J Fontaine [Thu, 12 Dec 2013 06:11:06 +0000 (22:11 -0800)]
Merge branch 'v0.10.23-release' into v0.10

10 years ago2013.12.12, Version 0.10.23 (Stable) v0.10.23
Timothy J Fontaine [Thu, 12 Dec 2013 05:20:06 +0000 (21:20 -0800)]
2013.12.12, Version 0.10.23 (Stable)

* uv: Upgrade to v0.10.20 (Timothy J Fontaine)

* npm: Upgrade to 1.3.17 (isaacs)

* gyp: update to 78b26f7 (Timothy J Fontaine)

* build: include postmortem symbols on linux (Timothy J Fontaine)

* crypto: Make Decipher._flush() emit errors. (Kai Groner)

* dgram: fix abort when getting `fd` of closed dgram (Fedor Indutny)

* events: do not accept NaN in setMaxListeners (Fedor Indutny)

* events: avoid calling `once` functions twice (Tim Wood)

* events: fix TypeError in removeAllListeners (Jeremy Martin)

* fs: report correct path when EEXIST (Fedor Indutny)

* process: enforce allowed signals for kill (Sam Roberts)

* tls: emit 'end' on .receivedShutdown (Fedor Indutny)

* tls: fix potential data corruption (Fedor Indutny)

* tls: handle `ssl.start()` errors appropriately (Fedor Indutny)

* tls: reset NPN callbacks after SNI (Fedor Indutny)

10 years agodoc: fix typos in node.1
Nicolas Kaiser [Sat, 7 Dec 2013 21:33:26 +0000 (22:33 +0100)]
doc: fix typos in node.1

10 years agodoc: mention `binary` as deafult for Hash strings
Mathias Bynens [Thu, 12 Dec 2013 04:39:22 +0000 (20:39 -0800)]
doc: mention `binary` as deafult for Hash strings

10 years agodoc: "finish" event is on the writable stream
Gabriel Farrell [Wed, 11 Dec 2013 15:14:10 +0000 (10:14 -0500)]
doc: "finish" event is on the writable stream

10 years agouv: Upgrade v0.10.20
Timothy J Fontaine [Thu, 12 Dec 2013 04:24:36 +0000 (20:24 -0800)]
uv: Upgrade v0.10.20

10 years agogyp: update to 78b26f7
Timothy J Fontaine [Thu, 12 Dec 2013 04:06:11 +0000 (20:06 -0800)]
gyp: update to 78b26f7

10 years agonpm: Upgrade to 1.3.17
isaacs [Wed, 11 Dec 2013 18:20:26 +0000 (10:20 -0800)]
npm: Upgrade to 1.3.17

10 years agogyp: build openssl-cli tool and use it in tests
Fedor Indutny [Wed, 11 Dec 2013 17:20:17 +0000 (21:20 +0400)]
gyp: build openssl-cli tool and use it in tests

fix #6663

10 years agoopenssl: fix keypress requirement in apps on win32
Fedor Indutny [Wed, 11 Dec 2013 17:19:04 +0000 (21:19 +0400)]
openssl: fix keypress requirement in apps on win32

Original source:

http://openssl.6102.n7.nabble.com/PATCH-s-client-Fix-keypress-requirement-with-redirected-input-on-Windows-td46787.html

10 years agotest: test-os fix win32 localhost assumption
Alexis Campailla [Tue, 10 Dec 2013 19:32:29 +0000 (11:32 -0800)]
test: test-os fix win32 localhost assumption

The test is expecting an invalid result for the loopback
interface network mask, but this issue was fixed in
libuv commit 1d5c61a8b31257733c41fb507762d3eb56eecb2d

Closes #5262 #6673

10 years agotest: test-os win32 adhere standard tmp resolution
Alexis Campailla [Tue, 10 Dec 2013 14:52:27 +0000 (06:52 -0800)]
test: test-os win32 adhere standard tmp resolution

The test is making the wrong assumptions about the
value of os.tmpdir() on Windows

10 years agoMerge branch 'v0.10'
Fedor Indutny [Tue, 10 Dec 2013 19:36:41 +0000 (23:36 +0400)]
Merge branch 'v0.10'

Conflicts:
src/node_file.cc

10 years agofs: report correct path when EEXIST
Fedor Indutny [Sat, 16 Nov 2013 16:46:54 +0000 (20:46 +0400)]
fs: report correct path when EEXIST

When `symlink`, `link` or `rename` report EEXIST, ENOTEMPTY or EPERM -
the destination file name should be included in the error message,
instead of source file name.

fix #6510

10 years agoMerge branch 'v0.10'
Fedor Indutny [Tue, 10 Dec 2013 19:06:56 +0000 (23:06 +0400)]
Merge branch 'v0.10'

Conflicts:
lib/tls.js
src/node_crypto.cc
src/node_crypto.h

10 years agotls: emit 'end' on .receivedShutdown
Fedor Indutny [Mon, 9 Dec 2013 15:47:55 +0000 (19:47 +0400)]
tls: emit 'end' on .receivedShutdown

NOTE: Also removed `.receivedShutdown` method of `Connection` it wasn't
documented anywhere, and was rewritten with `true` after receiving
`close_notify`.

fix #6638

10 years agotls_wrap: bump kClearOutChunkSize to 16kb
Fedor Indutny [Tue, 10 Dec 2013 18:28:26 +0000 (22:28 +0400)]
tls_wrap: bump kClearOutChunkSize to 16kb

10 years agobuild: only whole archive on static v8 builds
Timothy J Fontaine [Tue, 10 Dec 2013 18:10:34 +0000 (10:10 -0800)]
build: only whole archive on static v8 builds

Closes #6629

10 years agotest: make fs-watch-recursive less racy
Fedor Indutny [Thu, 21 Nov 2013 17:06:29 +0000 (21:06 +0400)]
test: make fs-watch-recursive less racy

FSEventStream may emit events that happened right before it has started.
Ignore changes emitted for the directory itself, since they may come
from the stale events.

10 years agosrc: only access stack of defined errors
Vladimir Kurchatkin [Fri, 6 Dec 2013 11:56:37 +0000 (15:56 +0400)]
src: only access stack of defined errors

Avoid segmentation fault when `undefined` is thrown

10 years agotest: fix create-file test fixture
Alexis Campailla [Tue, 10 Dec 2013 13:25:27 +0000 (05:25 -0800)]
test: fix create-file test fixture

This was failing if the file didn't already exist.

Fixes unit tests on Windows:

* test\simple\test-http-curl-chunk-problem.js
* test\simple\test-pipe-file-to-http.js

10 years agonode: follow specification, zero-fill ArrayBuffers
Trevor Norris [Tue, 10 Dec 2013 01:11:38 +0000 (17:11 -0800)]
node: follow specification, zero-fill ArrayBuffers

Fixes #6664

10 years agocrypto: support GCM authenticated encryption mode.
Ingmar Runge [Tue, 19 Nov 2013 21:38:15 +0000 (22:38 +0100)]
crypto: support GCM authenticated encryption mode.

This adds two new member functions getAuthTag and setAuthTag that
are useful for AES-GCM encryption modes. Use getAuthTag after
Cipheriv.final, transmit the tag along with the data and use
Decipheriv.setAuthTag to have the encrypted data verified.

10 years agobuild: older pythons don't support ternary if
Timothy J Fontaine [Sat, 7 Dec 2013 19:49:49 +0000 (11:49 -0800)]
build: older pythons don't support ternary if

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Sat, 7 Dec 2013 05:27:18 +0000 (21:27 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
lib/tls.js
src/node.js

10 years agobuild: pass --no-parallel by default to gyp
Timothy J Fontaine [Sat, 7 Dec 2013 05:00:32 +0000 (21:00 -0800)]
build: pass --no-parallel by default to gyp

gyp by default now tries to process gyp files in parallel by using
python's multiprocessing module, but it has problems on oddball
platforms. We don't have many files or complex dependency chains that
would benefit from parallel processing so disable by deafult

fixes #6640

10 years agobuild: ./configure pass positional args to gyp
Timothy J Fontaine [Sat, 7 Dec 2013 04:58:00 +0000 (20:58 -0800)]
build: ./configure pass positional args to gyp

use `--` to specify the arguments you want to pass directly to gyp.

for example: `./configure -- --no-parallel -Dsome_define=foo`

fixes #6370

10 years agobuild: Ignore gyp-generated files on android
Steven Kabbes [Tue, 3 Dec 2013 04:59:34 +0000 (20:59 -0800)]
build: Ignore gyp-generated files on android

The android generator for gyp currently doesn't support
--generator-output - this makes embedding node.js as project dependency
difficult for android projects.

Note: the generated files in deps/uv should be ignored in libuv's
.gitignore

10 years agohttp: DELETE shouldn't default to chunked encoding
Lalit Kapoor [Fri, 22 Nov 2013 02:44:08 +0000 (20:44 -0600)]
http: DELETE shouldn't default to chunked encoding

10 years agochild_process: don't crash process on internal ops
Alexis Campailla [Fri, 22 Nov 2013 02:49:41 +0000 (18:49 -0800)]
child_process: don't crash process on internal ops

1. Swallow errors when sending internal NODE_HANDLE_ACK messages, so
   they don't crash the process.
2. Queue process.disconnect() if there are any pending queued messages.

Fixes test-child-process-fork-net2.js on win.

10 years agocrypto: fix moving read head
Fedor Indutny [Wed, 27 Nov 2013 20:11:17 +0000 (00:11 +0400)]
crypto: fix moving read head

Fix various possible stalls of read head (i.e. try moving it after every
write head update).

NOTE: This is actually backported from `bud`.

10 years agotls_wrap: use writev when possible
Fedor Indutny [Wed, 27 Nov 2013 22:49:30 +0000 (02:49 +0400)]
tls_wrap: use writev when possible

Try writing multiple chunks from NodeBIO if possible.

10 years agobenchmark: fixate `ciphers` in tls benchmarks
Fedor Indutny [Fri, 6 Dec 2013 10:30:13 +0000 (14:30 +0400)]
benchmark: fixate `ciphers` in tls benchmarks

Benchmark should always use the same cipher in order to be truthful.

10 years agodoc: mention execArgv in setupMaster
Yazhong Liu [Fri, 6 Dec 2013 18:28:39 +0000 (02:28 +0800)]
doc: mention execArgv in setupMaster

10 years agodoc: document 'error' event for stream.Writable
Fedor Indutny [Fri, 6 Dec 2013 15:36:43 +0000 (19:36 +0400)]
doc: document 'error' event for stream.Writable

fix #5255

10 years agoopenssl: add assembly for aes and gcm
Fedor Indutny [Wed, 27 Nov 2013 22:14:00 +0000 (02:14 +0400)]
openssl: add assembly for aes and gcm

10 years agotls: fix handling of asterisk in SNI context
Fedor Indutny [Thu, 5 Dec 2013 15:16:01 +0000 (19:16 +0400)]
tls: fix handling of asterisk in SNI context

Wildcard server names should not match subdomains.

Quote from RFC2818:

   ...Names may contain the wildcard
   character * which is considered to match any single domain name
   component or component fragment. E.g., *.a.com matches foo.a.com but
   not bar.foo.a.com. f*.com matches foo.com but not bar.com.

fix #6610

10 years agobuild: add libicu i18n support
Ben Noordhuis [Thu, 21 Nov 2013 16:13:58 +0000 (17:13 +0100)]
build: add libicu i18n support

Adds a --with-icu-path= switch to the configure script.  Requires that
the user checks out the copy of libicu that's bundled with chromium to
a fixed directory.  It's still a little rough around the edges but it
works.

Fixes #6371.

10 years agolib: child_process spawn handle ENOENT correctly
Alexis Campailla [Wed, 4 Dec 2013 19:04:47 +0000 (11:04 -0800)]
lib: child_process spawn handle ENOENT correctly

child_process spawn wasn't handlig ENOENT correctly on Windows.
This is half a fix for test-child-process-cwd.js.
The other half is going into libuv.

10 years agocrypto: Make Decipher._flush() emit errors.
Kai Groner [Thu, 18 Apr 2013 23:01:14 +0000 (19:01 -0400)]
crypto: Make Decipher._flush() emit errors.

When Decipher processes a stream using an incorrect key, the
DecipherFinal() method throws an unhandled exception at the end of the
stream.

10 years agoblog: bnoordhuis departure
isaacs [Wed, 4 Dec 2013 09:00:07 +0000 (01:00 -0800)]
blog: bnoordhuis departure

10 years agotls: fix pool usage race
Fedor Indutny [Fri, 29 Nov 2013 16:09:59 +0000 (20:09 +0400)]
tls: fix pool usage race

When calling `encOut` in loop, `maybeInitFinished()` may invoke
`clearOut`'s loop, leading to the writing of interleaved data
(encrypted and cleartext) into the one shared pool.

Move `maybeInitFinished()` out of the loop and add assertion for
future.

10 years agodoc: list execArgv option for child_process.fork()
Yazhong Liu [Mon, 2 Dec 2013 05:31:06 +0000 (13:31 +0800)]
doc: list execArgv option for child_process.fork()

10 years agodoc: change constant to consistent
Gabriel Falkenberg [Mon, 2 Dec 2013 10:18:37 +0000 (11:18 +0100)]
doc: change constant to consistent

10 years agoprocess: document kill(0), disallow kill(O_RDWR)
Sam Roberts [Fri, 11 Oct 2013 05:28:01 +0000 (22:28 -0700)]
process: document kill(0), disallow kill(O_RDWR)

The null signal test existed, but only tested the case where the target
process existed, not when it did not exist.

Also clarified that SIGUSR1 is reserved by Node.js only for receiveing,
its not at all reserved when sending a signal with kill().

kill(pid, 'O_RDWR'), or any other node constant, "worked". I fixed this
by also checking for 'SIG'. The same as done in the isSignal() function.
Now the signal names supported by process.kill() are the same as those
supported by process.on().

10 years agoMerge branch 'v0.10'
Fedor Indutny [Mon, 2 Dec 2013 11:04:47 +0000 (15:04 +0400)]
Merge branch 'v0.10'

Conflicts:
src/node_crypto.cc
src/node_crypto.h

10 years agotls: reset NPN callbacks after SNI
Fedor Indutny [Fri, 22 Nov 2013 14:33:50 +0000 (18:33 +0400)]
tls: reset NPN callbacks after SNI

SNI callback selects a new SSL_CTX for the connection, which doesn't
have NPN callbacks set up.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Mon, 2 Dec 2013 03:43:34 +0000 (19:43 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
src/stream_wrap.cc

10 years agobuild: include postmortem symbols on linux
Timothy J Fontaine [Mon, 2 Dec 2013 02:57:43 +0000 (18:57 -0800)]
build: include postmortem symbols on linux

Previously we were building the symbols, but the linker was garbage
collecting the symbols because they weren't used. Inform the linker
that we want to keep all symbols from v8 around.

10 years agodoc: net: fix typo in example code
Yazhong Liu [Fri, 29 Nov 2013 16:44:13 +0000 (00:44 +0800)]
doc: net: fix typo in example code

10 years agodoc: http: document ServerResponse 'finish' event
Michael Ridgway [Tue, 26 Nov 2013 20:49:28 +0000 (12:49 -0800)]
doc: http: document ServerResponse 'finish' event

10 years agodoc: http: properly document callback argument
Nikolai Vavilov [Thu, 28 Nov 2013 20:25:30 +0000 (22:25 +0200)]
doc: http: properly document callback argument

10 years agohttp: fix parser double-free in _http_client.js
Fedor Indutny [Wed, 27 Nov 2013 10:54:58 +0000 (14:54 +0400)]
http: fix parser double-free in _http_client.js

HTTP Parser instance was freed twice, leading to the reusal of it
in several different requests simultaneously.

The flow:

`socketCloseListener` is firing, which calls `socket.read()` to flush
any queued data, `socket.buffer` has data which emits and fires
`socketOnData` in sync, this triggers a parser error which frees the
parser, `socketCloseListener` resumes execution only to have the wrong
parser associated with the socket.

The fix is to only cache the parser after the flushing from the socket,
and to assert in `socketOnData` that `socket === parser.socket`

fix #6451