- Aug 19, 2013
-
-
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.
-
Ben Noordhuis authored
And build/include, build/include_alpha and readability/streams probably too, though those are currently unused and therefore untested.
-
Ben Noordhuis authored
Seems to have escaped the Eye of Sauron^WFedor in commit 8e29ce9f.
-
Fedor Indutny authored
Fix sudden uncatchable ECONNRESETs, when using https server.
-
Ben Noordhuis authored
Use array indices rather than named properties to store callbacks on the HTTPParser object. Speeds up the http benchmarks by a few percent.
-
Ben Noordhuis authored
Don't lazy-init the oncomplete symbol string in the After() function, it has already been created at module init time.
-
- Aug 13, 2013
-
-
Ben Noordhuis authored
Move the 'free FSReqWrap data?' logic into the class itself.
-