Commit Graph

9416 Commits (f9f9239fa2f1c33e17ed3b0e830099f64a70bd37)

Author SHA1 Message Date
Timothy J Fontaine f9f9239fa2 build: older pythons don't support ternary if 2013-12-07 11:49:49 -08:00
Timothy J Fontaine fcca3585fe Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	lib/tls.js
	src/node.js
2013-12-06 21:27:18 -08:00
Timothy J Fontaine 2905884b63 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
2013-12-06 21:07:46 -08:00
Timothy J Fontaine b5e161989c 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
2013-12-06 21:07:00 -08:00
Steven Kabbes f4f4a2b9f8 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
2013-12-06 16:48:45 -08:00
Lalit Kapoor aef09601b4 http: DELETE shouldn't default to chunked encoding 2013-12-06 16:25:42 -08:00
Alexis Campailla 0da4e0e843 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.
2013-12-06 16:17:52 -08:00
Fedor Indutny 06b1945298 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`.
2013-12-07 03:48:43 +04:00
Fedor Indutny 03747f69fb tls_wrap: use writev when possible
Try writing multiple chunks from NodeBIO if possible.
2013-12-07 03:47:57 +04:00
Fedor Indutny f5ab3e4c5c benchmark: fixate `ciphers` in tls benchmarks
Benchmark should always use the same cipher in order to be truthful.
2013-12-07 02:32:03 +04:00
Yazhong Liu 5cfee927cd doc: mention execArgv in setupMaster 2013-12-06 10:45:40 -08:00
Fedor Indutny 796834bf18 doc: document 'error' event for stream.Writable
fix #5255
2013-12-06 10:26:49 -08:00
Fedor Indutny 1903240f2a openssl: add assembly for aes and gcm 2013-12-06 11:10:24 +04:00
Fedor Indutny f572b91c3e 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
2013-12-05 19:45:19 -08:00
Ben Noordhuis 9e32a7daaa 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.
2013-12-05 16:15:21 -08:00
Alexis Campailla 9ba0d905b0 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.
2013-12-05 11:59:22 -08:00
Kai Groner 98be8df571 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.
2013-12-04 19:52:15 +04:00
isaacs b371d4ae8f blog: bnoordhuis departure 2013-12-04 01:00:07 -08:00
Fedor Indutny 60f777d343 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.
2013-12-02 15:18:04 -08:00
Yazhong Liu bd7fa92de4 doc: list execArgv option for child_process.fork() 2013-12-02 13:41:30 -08:00
Gabriel Falkenberg 94c4ba9dd3 doc: change constant to consistent 2013-12-02 13:31:23 -08:00
Sam Roberts 8aac118b69 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().
2013-12-02 10:41:37 -08:00
Fedor Indutny 4bd5f35889 Merge branch 'v0.10'
Conflicts:
	src/node_crypto.cc
	src/node_crypto.h
2013-12-02 15:04:47 +04:00
Fedor Indutny 9b8fcff435 tls: reset NPN callbacks after SNI
SNI callback selects a new SSL_CTX for the connection, which doesn't
have NPN callbacks set up.
2013-12-02 14:48:14 +04:00
Timothy J Fontaine 001f9b46e7 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	src/stream_wrap.cc
2013-12-01 19:43:34 -08:00
Timothy J Fontaine 6877e64fa8 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.
2013-12-01 18:57:43 -08:00
Yazhong Liu fcfaa392ae doc: net: fix typo in example code 2013-11-30 14:05:45 +01:00
Michael Ridgway a32b8787a4 doc: http: document ServerResponse 'finish' event 2013-11-28 22:35:25 +01:00
Nikolai Vavilov 207a3e10f8 doc: http: properly document callback argument 2013-11-28 22:31:11 +01:00
Fedor Indutny 5ce4eed54d 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
2013-11-27 15:37:56 -08:00
Alexis Campailla c749a841cd test: use os.EOL when checking output 2013-11-27 10:56:24 -08:00
Fedor Indutny 04b92632bd openssl: more asm 2013-11-27 20:39:57 +04:00
Ben Noordhuis 658aeb2ca0 stream_wrap: don't call Number::New()
Replace call to Number::New() with a call to Integer::NewFromUnsigned().

Profiling a Real World(TM) application with perf(1) suggests that the
conversion of its argument from integer to double is disproportionally
costly: over 60% of CPU cycles accountable to WriteStringImpl() are
attributable to the conversion.

After changing it to Integer::NewFromUnsigned(), WriteStringImpl()
has dropped from the 'most costly functions' top ten altogether.
2013-11-27 03:53:45 +01:00
Timothy J Fontaine 85c19175ed Merge remote-tracking branch 'upstream/v0.10' 2013-11-26 08:41:09 -08:00
isaacs 90655a998e blog: npm outage postmortem 2013-11-26 07:27:59 -08:00
Ben Noordhuis 84c03a984a tls: add serialNumber to getPeerCertificate()
Add a 'serialNumber' property to the object that is returned by
tls.CryptoStream#getPeerCertificate().  Contains the certificate's
serial number encoded as a hex string.  The format is identical to
`openssl x509 -serial -in path/to/certificate`.

Fixes #6583.
2013-11-26 14:24:37 +01:00
David Chan b3e4fc6a48 util: Format negative zero as '-0'
Format negative zero as '-0' instead of as '0', as it does not behave
identically to positive zero. ((-0).toString() still returns '0' as
required by ES5 9.8.1.2).

Fixes joyent/node#6548.
Closes joyent/node#6550.
2013-11-25 11:28:30 -08:00
Ben Noordhuis de8c0a51a7 v8: unbreak freebsd build
Pending review of https://codereview.appspot.com/31500043/

Fixes #6576.
2013-11-23 23:07:41 +01:00
Vladimir Kurchatkin 16a402c0b5 node: fix removing AsyncListener in callback
context._asyncQueue shouldn't be exposed as asyncQueue, as it allows
modification of queues already attached to an event. Which is not
supposed to happend. Instead context._asyncQueue should be copied.
2013-11-23 11:16:16 -08:00
Linus Unnebäck 953d7184ec doc: clarify child_process error behaviour
Clarify that an 'error' event may or may not be followed by an 'exit'
event and that it's not safe to make assumptions either way.
2013-11-23 15:46:50 +01:00
Jeremy Martin 71aabedad4 events: fix TypeError in removeAllListeners
Check that `listeners` is actually an array before trying to manipulate it
because it won't be if no regular event listeners have been registered yet
but there are 'removeListener' event listeners.
2013-11-22 17:42:34 +01:00
Trevor Norris 5757642e91 node: allow nextTick infinite recursion
Removing the depth counter while processing the nextTickQueue made it
possible to run out of memory if in an infinite recursive loop using
nextTick(). There was also an edge case where too many callbacks were
pushed onto the nextTickQueue, while not actually being recursive.

This is being done to prevent possible cryptic FATAL ERROR messages from
popping up, and issues being posted about them.
2013-11-21 15:01:53 -08:00
Timothy J Fontaine a34bbaf31b blog: Post for v0.11.9 2013-11-20 16:45:27 -08:00
Timothy J Fontaine 1a7d3e2b72 Now working on 0.11.10 2013-11-20 16:40:47 -08:00
Timothy J Fontaine 9b985e58a9 Merge branch 'v0.11.9-release' 2013-11-20 16:40:36 -08:00
Timothy J Fontaine dcfd032bdd 2013.11.20, Version 0.11.9 (Unstable)
* uv: upgrade to v0.11.15 (Timothy J Fontaine)

* v8: upgrade to 3.22.24.5 (Timothy J Fontaine)

* buffer: remove warning when no encoding is passed (Trevor Norris)

* build: make v8 use random seed for hash tables (Ben Noordhuis)

* crypto: build with shared openssl without NPN (Ben Noordhuis)

* crypto: update root certificates (Ben Noordhuis)

* debugger: pass on v8 debug switches (Ben Noordhuis)

* domain: use AsyncListener API (Trevor Norris)

* fs: add recursive subdirectory support to fs.watch (Nick Simmons)

* fs: make fs.watch() non-recursive by default (Ben Noordhuis)

* http: cleanup freeSockets when socket destroyed (fengmk2)

* http: force socket encoding to be null (isaacs)

* http: make DELETE requests set `req.method` (Nathan Rajlich)

* node: add AsyncListener support (Trevor Norris)

* src: remove global HandleScope that hid memory leaks (Ben Noordhuis)

* tls: add ECDH ciphers support (Erik Dubbelboer)

* tls: do not default to 'localhost' servername (Fedor Indutny)

* tls: more accurate wrapping of connecting socket (Fedor Indutny)
2013-11-20 16:03:31 -08:00
Timothy J Fontaine eaba9417b1 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	lib/events.js
	src/udp_wrap.cc
2013-11-20 15:45:50 -08:00
isaacs c1452f4c6f npm: Upgrade to v1.3.15 2013-11-20 11:08:52 -08:00
Timothy J Fontaine 40d5e9074a child_process: deliver ENOENT on nextTick
After the uv upgrade, uv_spawn will now fail faster for certain
failures like ENOENT. However, our tests and other people may be
depending on that error being passed to the callback instead of a
throw.
2013-11-20 09:35:08 -08:00
Timothy J Fontaine 1fef66ffd4 uv: upgrade to v0.11.15 2013-11-20 09:35:08 -08:00