0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

9547 Commits

Author SHA1 Message Date
Fedor Indutny
7f9b01509f lib: introduce .setMaxSendFragment(size)
fix #6889
2014-01-20 20:39:57 +04:00
Ben Noordhuis
023f0a3122 doc: tls: note that SSLv2 is disabled by default
As of commit 39aa894, SSLv2 support is disabled by default.  Update
the documentation to reflect that.
2014-01-20 19:33:18 +04:00
Ben Noordhuis
8c303115f5 doc: tls: clarify server cipher list
* Make it clear that ECDHE-RSA-AES128-SHA256 and AES128-GCM-SHA256 are
  TLS v1.2 ciphers.

* Note that RC4 is under suspicion.
2014-01-20 19:33:18 +04:00
Ben Noordhuis
cda41f8775 src: don't mark addon_register_func as dllimport
addon_register_func and its cousin addon_context_register_func are type
definitions, dllimport and dllexport are name mangling directives, i.e.
they're quite unrelated concepts.  MinGW complains about mixing them
when cross-compiling native add-ons.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Bert Belder <bertbelder@gmail.com>
2014-01-17 15:37:20 -08:00
Ben Noordhuis
db5abd726f tls: make cert/pfx optional in tls.createServer()
Not all ciphers require the presence of a certificate.  Remove the
check in lib/_tls_wrap.js.

Fixes #6887.
2014-01-17 18:55:33 +00:00
Ben Noordhuis
262a752c29 tls: show human-readable error messages
Before this commit, verification exceptions had err.message set to the
OpenSSL error code (e.g. 'UNABLE_TO_VERIFY_LEAF_SIGNATURE').

This commit moves the error code to err.code and replaces err.message
with a human-readable error.  Example:

    // before
    {
      message: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
    }

    // after
    {
      code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
      message: 'unable to verify the first certificate'
    }

UNABLE_TO_VERIFY_LEAF_SIGNATURE is a good example of why you want this:
the error code suggests that it's the last certificate that fails to
validate while it's actually the first certificate in the chain.

Going by the number of mailing list posts and StackOverflow questions,
it's a source of confusion to many people.
2014-01-17 18:51:25 +00:00
Trevor Norris
24856f04b2 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	lib/domain.js
2014-01-15 13:49:55 -08:00
Ryan Graham
7f81ca2c47 domains: exit() only affects active domains
domain.create().exit() should not clear the domain stack if the domain
instance does not exist within the stack.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-01-15 12:27:10 -08:00
isaacs
e7f7e2aeca blog: TJ is the new node core project lead 2014-01-15 09:03:45 -08:00
Fedor Indutny
a05dae2ced gyp: fix build with python 2.6
fix #6859
2014-01-13 22:03:40 -08:00
Fedor Indutny
346b59e4a3 deps: update gyp to 1eae492b 2014-01-13 22:03:40 -08:00
Alexis Campailla
2e3da9be84 test: terminate gracefully in cluster-net-send
Killing the worker without ensuring the socket was closed
was causing intermittent ECONNRESET errors.
2014-01-13 15:15:10 -08:00
Timothy J Fontaine
fc52ed85f6 Merge remote-tracking branch 'upstream/v0.10' 2014-01-13 14:56:41 -08:00
Timothy J Fontaine
429b58701a Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	deps/uv/ChangeLog
	deps/uv/build.mk
	deps/uv/src/version.c
	deps/uv/test/test-ipc.c
	deps/v8/src/objects.cc
	src/node.cc
	src/node_os.cc
2014-01-13 14:56:12 -08:00
Sam Roberts
7bd6e33318 doc: streams must be open to be passed to child
spawn stdio options can be a 'stream', but the following code
fails with "Incorrect value for stdio stream: [object Object]",
despite being a stream. The problem is the test isn't really
for a stream, its for an object with a numeric `.fd` property,
and streams do not have an fd until their async 'open' event
has occurred. This is reasonable, but was not documented.

    child_process.spawn('date', [], {stdio: [
      'ignore',
      fs.createWriteStream('out.txt',{flags:'a'}),
      'ignore']})
2014-01-13 21:36:56 +00:00
Alexis Campailla
1b74892807 test: close debug client in test-debugger-client
Killing the debuggee without first closing the socket can result
in an ECONNRESET error.
2014-01-13 13:16:25 -08:00
Alex Kocharin
ec57ecc982 http: concatenate duplicate headers by default 2014-01-13 17:29:58 +00:00
Timothy J Fontaine
8753bb3859 src: return empty set on ENOSYS for interfaces
If node was compiled with --no-ifaddrs to support older operating
systems, don't throw instead simply return an empty object

Fixes #6846
2014-01-12 10:04:21 -08:00
svenpanne@chromium.org
196184d332 v8: backport codereview.chromium.org/11362182
Keep the number of descriptors below
DescriptorArray::kMaxNumberOfDescriptors even for accessors

Review URL: https://codereview.chromium.org/11362182
2014-01-10 23:32:08 +00:00
Tom Gallacher
38a07a929b util: handle escaped forward slashes correctly
Fixes #6835
2014-01-10 21:13:46 +00:00
gluxon
56913d2cde doc: Fix argument typo in SimpleProtocol example 2014-01-10 08:42:34 -08:00
Ryan Graham
5106cadffb domain: fix off-by-one in Domain.exit()
We want to clear the found domain and the domains after it.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-01-09 15:25:58 -08:00
Trevor Norris
2eddd74112 http: use writev on chunked encoding
Now will process all write() that were done on a single tick in a single
writev().
2014-01-09 15:07:14 -08:00
Jeff Barczewski
82c2084b4e test: check RR scheduler has necessary methods
The RR cluster scheduler replaces the normal StreamWrap handle. Because
of this the AsyncListener method failed to be in place when domains were
in use.

The issue was resolved in 828f145 by reverting having domains use
AsyncListeners.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-01-09 14:17:13 -08:00
Timothy J Fontaine
270c2deb84 src: OnFatalError handler must abort()
We are in an unrecoverable state if v8 throws a FatalError, actually
ask the operating system to dump core in this case.

Fixes #6836
2014-01-09 14:01:53 -08:00
Trevor Norris
646ac18d79 node: AsyncListener use separate storage mechanism
Before when an AsyncListener object was created and the "create"
callback returned a value, it was necessary to construct a new Object
with the same callbacks but add a place for the new storage value.

Now, instead, a separate storage array is kept on the context which is
used for any return value of the "create" callback. This significantly
reduces the number of Objects that need to be created.

Also added a flags property to the context to quickly check if a
specific callback was available either on the context or on the
AsyncListener instance itself.

Few other minor changes for readability that were difficult to separate
into their own commit.

This has not been optimized yet.
2014-01-09 13:47:03 -08:00
Trevor Norris
828f14556e src: revert domain using AsyncListeners
This is a slightly modified revert of bc39bdd.

Getting domains to use AsyncListeners became too much of a challenge
with many edge cases. While this is still a goal, it will have to be
deferred for now until more test coverage can be provided.
2014-01-09 13:25:20 -08:00
Fedor Indutny
0afdfae0eb configure: always set arm_float_abi
When not specified as a configure flag, and not derived from system
configuration, `arm_float_abi` should be set to `'default'`.

fix #6789
2014-01-09 01:08:29 +04:00
Fedor Indutny
730e511b35 child_process: better error reporting for exec
Report path to executable and argv on error, stderr is not enough in
many cases.

fix #6796
2014-01-09 00:00:30 +04:00
Fedor Indutny
4800310f6a deps: fix openssl assembly error on ia32 win32
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .
2014-01-08 23:40:24 +04:00
Lorenz Leutgeb
fc7e217a30 doc: fix typo in cluster page 2014-01-08 23:39:02 +04:00
Fedor Indutny
390598608c deps: update openssl to 1.0.1f 2014-01-08 02:43:17 +04:00
Timothy J Fontaine
30b3bc2f7c uv: Upgrade to v0.10.22 2014-01-07 14:05:58 -08:00
Ben Noordhuis
f057c7049e build: unconditionally disable -Werror
Forcibly disable -Werror, the old { 'werror': '' } hack in node.gyp
no longer works with newer versions of V8.

We support a wide range of compilers, it's simply not feasible to
squelch all warnings, never mind that the libraries in deps/ are
not under our control.

Fixes #6817.
2014-01-07 23:35:04 +04:00
isaacs
1be9365930 npm: Upgrade to 1.3.23 2014-01-06 17:02:07 -08:00
ayanamist
b922b5e90d stream: writes may return false but forget to emit drain
If a write is above the highWaterMark, _write still manages to
fully send it synchronously, _writableState.length will be adjusted down
to 0 synchronously with the write returning false, but 'drain' will
not be emitted until process.nextTick.

If another small write which is below highWaterMark is issued before
process.nextTick happens, _writableState.needDrain will be reset to false,
and the drain event will never be fired.

So we should check needDrain before setting it up, which prevents it
from inproperly resetting to false.
2014-01-05 19:44:45 +04:00
Lorenz Leutgeb
e1f4f6aa28 doc: Add forward secrecy section to TLS docs
This fixes confusion connected to comparison of ECDH
with RSA and wrong information on forward secrecy.
2014-01-05 17:15:08 +04:00
Fedor Indutny
92b6417098 crypto: introduce .setEngine(engine, [flags]) 2014-01-05 16:42:33 +04:00
Trevor Norris
a40b463674 node: properly check uid when adding AsyncListener
Instead of checking the uid on the array index of the queue, instead the
object property "uid" was checked on the queue iteself. Because this
will always evaluate to "undefined" the same listener could be added
multiple times to the same context.
2014-01-03 16:48:11 -08:00
Trevor Norris
d9fc6af32a node: change AsyncListener API
There was a flaw in the old API that has been fixed. Now the
asyncListener callback is now the "create" object property in the
callback object, and is optional.
2014-01-03 13:20:23 -08:00
Timothy J Fontaine
13eb17f412 Merge remote-tracking branch 'upstream/v0.10' 2013-12-31 16:28:49 -08:00
Timothy J Fontaine
aa56d9d354 blog: Post for v0.11.10 2013-12-31 16:24:58 -08:00
Timothy J Fontaine
c3e26d64f8 Now working on 0.11.11 2013-12-31 16:21:08 -08:00
Timothy J Fontaine
c039bc3a0e Merge branch 'v0.11.10-release' 2013-12-31 16:20:58 -08:00
Timothy J Fontaine
66931791f0 2013.12.31, Version 0.11.10 (Unstable)
* http_parser: update to 2.2

* uv: Upgrade to v0.11.17

* v8: Upgrade to 3.22.24.10

* buffer: optimize writeInt* methods (Paul Loyd)

* child_process: better error handling (Alexis Campailla)

* cluster: do not synchronously emit 'setup' event (Sam Roberts)

* cluster: restore backwards compatibility and various fixes (Sam Roberts)

* crypto: remove unnecessary OpenSSL_add_all_digests (Yorkie)

* crypto: support GCM authenticated encryption mode. (Ingmar Runge)

* dns: add resolveSoa and 'SOA' rrtype (Tuğrul Topuz)

* events: move EE c'tor guts to EventEmitter.init (Bert Belder)

* http: DELETE shouldn't default to chunked encoding (Lalit Kapoor)

* http: parse the status message in a http response. (Cam Swords)

* node: fix removing AsyncListener in callback (Vladimir Kurchatkin)

* node: follow specification, zero-fill ArrayBuffers (Trevor Norris)

* openssl: use ASM optimized routines (Fedor Indutny)

* process: allow nextTick infinite recursion (Trevor Norris)

* querystring: remove `name` from `stringify()` (Yorkie)

* timers: setImmediate v8 optimization fix (pflannery)

* tls: add serialNumber to getPeerCertificate() (Ben Noordhuis)

* tls: reintroduce socket.encrypted (Fedor Indutny)

* tls: fix handling of asterisk in SNI context (Fedor Indutny)

* util: Format negative zero as '-0' (David Chan)

* vm: fix race condition in timeout (Alexis Campailla)

* windows: fix dns lookup of localhost with ipv6 (Alexis Campailla)
2013-12-31 15:37:12 -08:00
Timothy J Fontaine
5ce4f3ec3d v8: Upgrade to 3.22.24.10 2013-12-31 15:02:38 -08:00
Timothy J Fontaine
08c83bb172 Merge remote-tracking branch 'upstream/v0.10' 2013-12-31 14:57:46 -08:00
Maciej Małecki
5a8de857f0 doc: document that process.send is synchronous
Ref #2598
2013-12-31 14:52:43 -08:00
Timothy J Fontaine
ffb718b5a3 doc: clarify process on exit safe usage 2013-12-31 14:48:20 -08:00
Ron Korving
3917232030 docs: process.on('exit') receives exit code
The fact that the "exit" event passes the exit code as an argument
as omitted from the documentation. This adds the explanation and
augments the example code to show that.
2013-12-31 14:38:09 -08:00