64bit constants are keyed for x64 platforms only, add PowerPC based
platform constants.
Node's "ucs2" encoding wants LE character data stored in the Buffer, so
we need to reorder on BE platforms. See
http://nodejs.org/api/buffer.html regarding Node's "ucs2" encoding
specification
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Storing it in SSL_CTX is incorrect as it may go away and get destructed
earlier, also it'll yield invalid results in SelectSNIContextCallback.
Use `SSL_get_app_data()` instead.
fix#7484
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
The spawnsync test was written wrong, the timeout can never fire before
the sync process has returned, the delta is immaterial and times when
it was succeeding are not reliable cases.
Instead verify that the timeout doesn't fire while the sync process is
happening.
When close() is called on a non-listening server, a synchronous
error is thrown. This commit causes the error to be passed to
the asynchronous callback function instead.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
stringToFlags() has fall throughs in a case statement.
However, they are not consistently implemented. This commit adds
consistency.
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
There was an underlying assumption in readline.emitKeypressEvents (and
by extension emitKey) that the given stream (usually process.stdin)
would emit 'data' once per keypress, which is not always the case.
This commit buffers the input stream and ensures a 'keypress' event is
triggered for every keypress (including escape codes).
Signed-off-by: Fedor Indutny <fedor@indutny.com>
This test is still in test/disabled because it requires a tty, however
when executed directly this test now passes.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
A recent change to v8's API now makes it impossible to memcpy to a
v8::ArrayBuffer without causing it to be externalized. This means that
the garbage collector will not automatically free the memory when the
object is collected.
When/If the necessary API is included to allow the above
Buffer#toArrayBuffer() will be reintroduced.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Not removing 'end' listeners for input and output on the 'close' event
resulted in an EventEmitter related memory leak.
This issue also might be reproduced at:
https://github.com/npm/npm/issues/5203
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
When process._setupNextTick() was introduced as the means to properly
initialize the mechanism behind process.nextTick() a chunk of code was
left behind that assigned memory to process._tickInfo. This code is no
longer needed.
See https://code.google.com/p/chromium/issues/detail?id=25916
Parse URLs with backslashes the same as web browsers, by replacing all
backslashes with forward slashes, except those that occur after the
first # character.
Manual rebase of 9520ade
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
On windows you can see ECONNABORTED instead of ECONNRESET in various
scenarios, and they are both applicable we're testing that Node is not
swallowing these errors which it was known to do prior to 0.10
As a comment in the test states: "This test should not be ported to
v0.10 and higher, because the problem is fixed by not ignoring
ECONNRESET in the first place."
The test is checking whether write returns false instead of whether an
ECONNRESET has been raised.
Replace with test-http-destroyed-socket-write2, this test verifies that
ECONNRESET is raised when writing to an http request where the server
has destroyed the socket.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
On Windows we cannot get the server address until a connection
is accepted.
From MSDN:
The getsockname function does not always return information about
the host address when the socket has been bound to an unspecified
address, unless the socket has been connected with connect or accept
(for example, using ADDR_ANY). A Windows Sockets application must not
assume that the address will be specified unless the socket is
connected.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
* Check SHA before using files from cache
* adduser: allow change of the saved password
* Make `npm install` respect `config.unicode`
* Fix lifecycle to pass `Infinity` for config env value
* Don't return 0 exit code on invalid command
* cache: Handle 404s and other HTTP errors as errors
* bump tap dep, make tests stderr a bit quieter
* Resolve ~ in path configs to env.HOME
* Include npm version in default user-agent conf
* npm init: Use ISC as default license, use save-prefix for deps
* Many test and doc fixes
Because of differences in memcmp() implementation, normalize output to
return -1, 0 or 1 only.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
This commit introduces `readableObjectMode` and
`writableObjectMode` options for Duplex streams.
This can be used mostly to make parsers and
serializers with Transform streams.
Also the docs section about stream state objects
is removed, because it is not relevant anymore.
The example from the section is remade to show
new options.
fixes#6284
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
When ExitCallback was not called with an error such as ENOENT in
uv_spawn, the process handle still remains refed and needs to be closed.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
1) ThrowCryptoTypeErrors was not actually used for
type-related errors. Removed it.
2) For AEAD modes, OpenSSL does not set any internal
error information if Final does not complete suc-
cessfully. Therefore, "TypeError:error:00000000:l
ib(0):func(0):reason(0)" would be the error mess-
age. Use a default message for these cases.
Signed-off-by: Fedor Indutny <fedor@indutny.com>