Commit Graph

8284 Commits (56e90dacb39f36a02c2b7b4e473ada6bc913c8bf)

Author SHA1 Message Date
isaacs 734a19060c Now working on 0.10.4 2013-04-03 11:28:04 -07:00
isaacs d1c9c93ef0 Merge branch 'v0.10.3-release' into v0.10 2013-04-03 11:27:55 -07:00
Fedor Indutny 55d058e624 v8: cherry-pick 75311294 from upstream
Quote from commit message:

    Create a new HandleScope for each JSON-parsed object to avoid
    excessive growth.
2013-04-03 22:11:32 +04:00
isaacs d4982f6f5e 2013.04.03, Version 0.10.3 (Stable)
* npm: Upgrade to 1.2.17

* child_process: acknowledge sent handles (Fedor Indutny)

* etw: update prototypes to match dtrace provider (Timothy J Fontaine)

* dtrace: pass more arguments to probes (Dave Pacheco)

* build: allow building with dtrace on osx (Dave Pacheco)

* http: Remove legacy ECONNRESET workaround code (isaacs)

* http: Ensure socket cleanup on client response end (isaacs)

* tls: Destroy socket when encrypted side closes (isaacs)

* repl: isSyntaxError() catches "strict mode" errors (Nathan Rajlich)

* crypto: Pass options to ctor calls (isaacs)

* src: tie process.versions.uv to uv_version_string() (Ben Noordhuis)
2013-04-03 10:30:57 -07:00
isaacs 88686aa410 http: Remove legacy ECONNRESET workaround code
Fix #5179
2013-04-03 10:18:42 -07:00
isaacs d46ebffb66 npm: Upgrade to 1.2.17 2013-04-03 10:17:04 -07:00
isaacs b319264d84 test: fork-getconnections stricter, less chatty 2013-04-03 10:01:50 -07:00
Fedor Indutny 5902bc45c5 child_process: acknowledge sent handles
Fix race-condition when multiple handles are sent and SCM_RIGHTS
messages are gets merged by OS by avoiding sending multiple handles at
once!

fix #4885
2013-04-03 09:56:48 -07:00
isaacs 4716dc662d assert: Simplify AssertError creation 2013-04-03 09:52:56 -07:00
Timothy J Fontaine 9f65b1edf7 etw: update prototypes to match dtrace provider
The DTrace probes were updated to accomodate platforms that can't
handle structs, update the prototypes for ETW but it's not necessary
to do anything with the new arguments as it's redundant information.
2013-04-03 09:52:56 -07:00
Ben Noordhuis 75463899c8 dtrace: check if _handle property is set
Check that _handle is an object before trying to read its `fd`
property, avoids bogus values.
2013-04-03 09:52:56 -07:00
Timothy J Fontaine aca31e37f7 dtrace: actually use the _handle.fd value
When using the DTrace/systemtap subsystems it would be helpful to
actually have an fd associated with the requests and responses.
2013-04-03 09:52:56 -07:00
Dave Pacheco bf22f99f3a dtrace: pass more arguments to probes
OSX and other DTrace implementations don't support dereferencing
structs in probes. To accomodate that pass members from the struct as
arguments so that DTrace is useful on those systems.
2013-04-03 09:52:56 -07:00
Dave Pacheco ec69fcf425 build: allow building with dtrace on osx 2013-04-03 09:52:56 -07:00
Brian White 38106da7cd src: remove unused variables 2013-04-02 18:44:14 +02:00
isaacs 234fb122bb http client: Ensure socket cleanup on response end
If an http response has an 'end' handler that throws, then the socket
will never be released back into the pool.

Granted, we do NOT guarantee that throwing will never have adverse
effects on Node internal state.  Such a guarantee cannot be reasonably
made in a shared-global mutable-state side-effecty language like
JavaScript.  However, in this case, it's a rather trivial patch to
increase our resilience a little bit, so it seems like a win.

There is no semantic change in this case, except that some event
listeners are removed, and the `'free'` event is emitted on nextTick, so
that you can schedule another request which will re-use the same socket.
From the user's point of view, there should be no detectable difference.

Closes #5107
2013-04-02 20:34:08 +04:00
Andrew Hart db8ce89fe4 test: test intended code-paths
The tests did not agree with the test comments. Tests first and second
were both testing the !state.reading case. Now second tests the
state.reading && state.length case.

Fixes joyent/node#5183
2013-04-01 15:09:33 -07:00
isaacs 164d5b3465 tls: Destroy socket when encrypted side closes
The v0.8 Stream.pipe() method automatically destroyed the destination
stream whenever the src stream closed.  However, this caused a lot of
problems, and was removed by popular demand.  (Many userland modules
still have a no-op destroy() method just because of this.) It was also
very hazardous because this would be done even if { end: false } was
passed in the pipe options.

In v0.10, we decided that the 'close' event and destroy() method are
application-specific, and pipe() doesn't automatically call destroy().
However, TLS actually depended (silently) on this behavior.  So, in this
case, we should just go ahead and destroy the thing when close happens.

Closes #5145
2013-04-01 10:53:49 -07:00
Michael Hart 440dcae987 Ensure BAD domain example actually uses domain 2013-04-01 10:09:27 -07:00
Mitar e5b90a14b8 querystring: Removing unnecessary binding
Binding of `http_parser` in querystring isn't used anywhere and should
be removed.
2013-04-01 14:30:34 +04:00
Nathan Rajlich 55ea7ccf70 repl: use more readable RegExp syntax for spaces
This is just a cosmetic change really, nothing major.
2013-03-30 13:35:36 -07:00
Nathan Rajlich 085f9d636b repl: isSyntaxError() catches "strict mode" errors
Closes #5178.
2013-03-30 13:10:30 -07:00
isaacs 7af075ee30 crypto: Pass options to ctor calls 2013-03-29 09:39:51 -07:00
isaacs 1d17ced200 blog: v0.11.0 release 2013-03-28 14:53:29 -07:00
isaacs f1fa756681 blog: Update linux binary tarball shasums
I just accidentally the binary release.
2013-03-28 14:39:52 -07:00
isaacs 708e8589ea blog: Post about v0.10.2 2013-03-28 13:06:24 -07:00
isaacs 61d254ebdc Node working on 0.10.3 2013-03-28 13:06:24 -07:00
isaacs 8106dc3624 Merge branch 'v0.10.2-release' into v0.10 2013-03-28 13:05:37 -07:00
Ben Noordhuis 902d6cb6d7 src: tie process.versions.uv to uv_version_string() 2013-03-28 20:12:05 +01:00
isaacs 1e0de9c426 2013.03.28, Version 0.10.2 (Stable)
* npm: Upgrade to 1.2.15

* uv: Upgrade to 0.10.3

* tls: handle SSL_ERROR_ZERO_RETURN (Fedor Indutny)

* tls: handle errors before calling C++ methods (Fedor Indutny)

* tls: remove harmful unnecessary bounds checking (Marcel Laverdet)

* crypto: make getCiphers() return non-SSL ciphers (Ben Noordhuis)

* crypto: check randomBytes() size argument (Ben Noordhuis)

* timers: do not calculate Timeout._when property (Alexey Kupershtokh)

* timers: fix off-by-one ms error (Alexey Kupershtokh)

* timers: handle signed int32 overflow in enroll() (Fedor Indutny)

* stream: Fix stall in Transform under very specific conditions (Gil Pedersen)

* stream: Handle late 'readable' event listeners (isaacs)

* stream: Fix early end in Writables on zero-length writes (isaacs)

* domain: fix domain callback from MakeCallback (Trevor Norris)

* child_process: don't emit same handle twice (Ben Noordhuis)

* child_process: fix sending utf-8 to child process (Ben Noordhuis)
2013-03-28 12:07:52 -07:00
Bert Belder 1b5ec033ee deps: upgrade libuv to v0.10.3 2013-03-28 20:05:33 +01:00
isaacs dea0634f60 npm: Upgrade to v1.2.15 2013-03-28 11:35:12 -07:00
Fedor Indutny 4580be0882 tls: handle SSL_ERROR_ZERO_RETURN
see #5004
2013-03-28 21:59:19 +04:00
wicked 39058bef07 setTimeout: do not calculate Timeout._when property
Dramatically improves Timer performance.
2013-03-28 10:40:15 -07:00
isaacs 929e4d9c9a stream: Emit readable on ended streams via read(0)
cc: @mjijackson
2013-03-28 10:27:18 -07:00
isaacs eafa902632 stream: Handle late 'readable' event listeners
In cases where a stream may have data added to the read queue before the
user adds a 'readable' event, there is never any indication that it's
time to start reading.

True, there's already data there, which the user would get if they
checked However, as we use 'readable' event listening as the signal to
start the flow of data with a read(0) call internally, we ought to
trigger the same effect (ie, emitting a 'readable' event) even if the
'readable' listener is added after the first emission.

To avoid confusing weirdness, only the *first* 'readable' event listener
is granted this privileged status.  After we've started the flow (or,
alerted the consumer that the flow has started) we don't need to start
it again.  At that point, it's the consumer's responsibility to consume
the stream.

Closes #5141
2013-03-28 10:27:18 -07:00
isaacs 5ae26f3750 doc: Add 'don't ignore errors' section to domain
Also, an example program of using cluster and domain to handle errors
safely, with zero downtime, using process isolation.
2013-03-28 09:53:59 -07:00
Benjamin Ruston 024a8b0cb4 doc: debugger, dns, http: fix grammar 2013-03-28 16:50:37 +01:00
Ben Noordhuis 982877ec85 deps: upgrade libuv to 7514149 2013-03-28 00:28:45 +01:00
isaacs 61935bc167 test: Accept either kind of NaN
A llvm/clang bug on Darwin ia32 makes these tests fail 100% of
the time.  Since no one really seems to mind overly much, and we
can't reasonably fix this in node anyway, just accept both types
of NaN for now.
2013-03-27 09:47:16 -07:00
Fedor Indutny ae86fa84fe tls: handle errors before calling C++ methods
Calling `this.pair.encrypted._internallyPendingBytes()` before
handling/resetting error will result in assertion failure:

../src/node_crypto.cc:962: void node::crypto::Connection::ClearError():
Assertion `handle_->Get(String::New("error"))->BooleanValue() == false'
failed.

see #5058
2013-03-27 16:26:24 +04:00
Benjamin Ruston 372911ffc7 doc: addon: fix grammar 2013-03-27 12:37:54 +01:00
Fedor Indutny 28c6e42ee7 openssl: disable HEARTBEAT TLS extension
Microsoft's IIS doesn't support it, and is not replying with ServerHello
after receiving ClientHello which contains it.

The good way might be allowing to opt-out this at runtime from
javascript-land, but unfortunately OpenSSL doesn't support it right now.

see #5119
2013-03-27 11:41:23 +04:00
Trevor Norris f0b68892d4 domain: fix domain callback from MakeCallback
Since _tickCallback and _tickDomainCallback were both called from
MakeCallback, it was possible for a callback to be called that required
a domain directly to _tickCallback.

The fix was to implement process.usingDomains(). This will set all
applicable functions to their domain counterparts, and set a flag in cc
to let MakeCallback know domain callbacks always need to be checked.

Added test in own file. It's important that the test remains isolated.
2013-03-26 21:26:17 -07:00
Ben Noordhuis a80a132b38 doc: child_process: document 'error' event
Fixes #5130.
2013-03-26 16:34:43 +01:00
Ben Noordhuis 0e08e147c7 doc: fix formatting in tty.markdown
Fixes #5135.
2013-03-26 16:09:51 +01:00
Timothy J Fontaine fb6dd0c0b5 test: test name is the last elem, not second
When a test requires node to have parameters passed (--expose-gc) the
test name will be the last element in the command array, not the second.
2013-03-26 00:21:41 +01:00
Ben Noordhuis 9352c19885 child_process: don't emit same handle twice
It's possible to read multiple messages off the parent/child channel.
When that happens, make sure that recvHandle is cleared after emitting
the first message so it doesn't get emitted twice.
2013-03-25 23:07:30 +01:00
Ben Noordhuis cfd0dca9ae crypto: make getCiphers() return non-SSL ciphers
Commit f53441a added crypto.getCiphers() as a function that returns the
names of SSL ciphers.

Commit 14a6c4e then added crypto.getHashes(), which returns the names of
digest algorithms, but that creates a subtle inconsistency: the return
values of crypto.getHashes() are valid arguments to crypto.createHash()
but that is not true for crypto.getCiphers() - the returned values are
only valid for SSL/TLS functions.

Rectify that by adding tls.getCiphers() and making crypto.getCiphers()
return proper cipher names.
2013-03-25 18:42:07 +01:00
Mathias Bynens 488b74d68b doc: mention `process.*.isTTY` under `process` 2013-03-25 13:54:32 +01:00