- Aug 20, 2013
-
-
isaacs authored
-
Trevor Norris authored
This and b80d11d4 are my fault. An unrelated test was failing, which prevents {js,cpp}lint from running automatically.
-
Fedor Indutny authored
-
Fedor Indutny authored
`ssl_` is a property of SSLWrap class, don't touch it, and definitely don't zero it in constructor.
-
isaacs authored
In this situation: writable.on('error', handler); readable.pipe(writable); writable.removeListener('error', handler); writable.emit('error', new Error('boom')); there is actually no error handler, but it doesn't throw, because of the fix for stream.once('error', handler), in 23d92ec8. Note that simply reverting that change is not valid either, because otherwise this will emit twice, being handled the first time, and then throwing the second: writable.once('error', handler); readable.pipe(writable); writable.emit('error', new Error('boom')); Fix this with a horrible hack to make the stream pipe onerror handler added before any other userland handlers, so that our handler is not affected by adding or removing any userland handlers. Closes #6007.
-
- Aug 19, 2013
-
-
Fedor Indutny authored
Commit 03e008dd introduced src/tls_wrap.cc and src/tls_wrap.h but said files copied on the order of 1 kLoC from src/node_crypto.cc and src/node_crypto.h. This commit undoes some of the duplication. Fixes #6024.
-
Ben Noordhuis authored
Having the includes in src/node_buffer.h outside of the include guard is not really harmful but it's inconsistent with other header files.
-
- Aug 18, 2013
-
-
isaacs authored
Conflicts: AUTHORS ChangeLog lib/dgram.js lib/http.js src/node_crypto.cc src/node_version.h
-
- Aug 17, 2013
-
-
Ben Noordhuis authored
Add range checks for the offset, length and port arguments to dgram.Socket#send(). Fixes the following assertion: node: ../../src/udp_wrap.cc:264: static v8::Handle<v8::Value> node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion `offset < Buffer::Length(buffer_obj)' failed. And: node: ../../src/udp_wrap.cc:265: static v8::Handle<v8::Value> node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion `length <= Buffer::Length(buffer_obj) - offset' failed. Interestingly enough, a negative port number was accepted until now but silently ignored. (In other words, it would send the datagram to a random port.) This commit exposed a bug in the simple/test-dgram-close test which has also been fixed. This is a back-port of commit 41ec6d05 from the master branch. Fixes #6025. -
Daniel Chatfield authored
On windows, libuv will immediately make a `ReadConsole` call (in the thread pool) when a 'flowing' `uv_tty_t` handle is switched to line-buffered mode. That causes an immediate issue for some users, since libuv can't cancel the `ReadConsole` operation on Windows 8 / Server 2012 and up if the program switches back to raw mode later. But even if this will be fixed in libuv at some point, it's better to avoid the overhead of starting work in the thread pool and immediately cancelling it afther that. See also f34f1e30, where the same change is made for the opposite flow, e.g. move `resume()` after `_setRawMode(true)`. Fixes #5927 This is a backport of dfb0461c (see #5930) to the v0.10 branch.
-
Daniel Chatfield authored
On windows, libuv will immediately make a `ReadConsole` call (in the thread pool) when a 'flowing' `uv_tty_t` handle is switched to line-buffered mode. That causes an immediate issue for some users, since libuv can't cancel the `ReadConsole` operation on Windows 8 / Server 2012 and up if the program switches back to raw mode later. But even if this will be fixed in libuv at some point, it's better to avoid the overhead of starting work in the thread pool and immediately cancelling it afther that. See also f34f1e30, where the same change is made for the opposite flow, e.g. move `resume()` after `_setRawMode(true)`. Fixes #5927 Closes #5930
-
isaacs authored
-
isaacs authored
-
isaacs authored
-
Trevor Norris authored
For several encodings the byte length is simple arithmetic. Don't call into C++ in those cases.
-
- Aug 16, 2013
-
-
isaacs authored
* v8: back-port fix for CVE-2013-2882 * npm: Upgrade to 1.3.8 * crypto: fix assert() on malformed hex input (Ben Noordhuis) * crypto: fix memory leak in randomBytes() error path (Ben Noordhuis) * events: fix memory leak, don't leak event names (Ben Noordhuis) * http: Handle hex/base64 encodings properly (isaacs) * http: improve chunked res.write(buf) performance (Ben Noordhuis) * stream: Fix double pipe error emit (Eran Hammer)
-
isaacs authored
-
Ben Noordhuis authored
This is the conceptual back-port of commit ec548734 from the master branch.
-
Ben Noordhuis authored
-
Ben Noordhuis authored
RandomBytes() allocated memory with new[] which was then handed off to Buffer::Use() which eventually releases it again with free(). Mixing the two is technically a violation of the spec and besides, it's generally frowned upon.
-
isaacs authored
-
Brian White authored
-
Brian White authored
-
Brian White authored
-
isaacs authored
It's faster, because it doesn't have to check that each char is in the ASCII plane.
-
isaacs authored
-
isaacs authored
In other Writable streams, the 'finish' event means that all of the data was written, and flushed to the underlying system. The 'prefinish' event means that end() was called, and all of the data was processed, but not necessarily completely flushed. This change brings the http OutgoingMessage classes more in sync with the other Writable classes throughout Node. Unfortunately, this change highlights an issue with http IncomingMessages, where the _dump() method will not actually pull the data off the wire. This is a minor issue that is typically only relevant in test cases, and will be addressed in the next commit.
-
isaacs authored
-
isaacs authored
-
isaacs authored
This removes a dubious performance "optimization" where strings body chunks were concatenated to one another (and to the headers) without any regard for their encoding.
-
isaacs authored
This is a backport of 6d3d60aced39d59eaa5e705b7d822c227d0d3dae for v0.10.
-
isaacs authored
-
isaacs authored
The format is [key,value,key,value,...] because that seems to have the lowest overhead. Close #4844
-
isaacs authored
Close #5839
-
isaacs authored
-
Ben Noordhuis authored
Commit 0aa13357 changes the way timeout events are dispatched. Update two tests that still used the old way.
-
Trevor Norris authored
These checks are now done in C++ and don't need to also be checked in JS. Also remove a couple unused variables.
-
Ben Noordhuis authored
Achieve a minor speed-up by looking up the timeout callback on the timer object by using an array index rather than a named property. Gives a performance boost of about 1% on the misc/timers benchmarks.
-
Ben Noordhuis authored
Internal helper function for dispatching by array index rather than named property.
-
- Aug 15, 2013
-
-
Ben Noordhuis authored
Don't check for the key first before retrieving it. Just fetch it and check that it has the type we expect.
-