platform/upstream/nodejs.git
11 years agoNow working on 0.11.2
isaacs [Fri, 19 Apr 2013 16:14:44 +0000 (09:14 -0700)]
Now working on 0.11.2

11 years agoMerge branch 'v0.11.1-release'
isaacs [Fri, 19 Apr 2013 16:14:24 +0000 (09:14 -0700)]
Merge branch 'v0.11.1-release'

11 years ago2013.04.19, Version 0.11.1 (Unstable) v0.11.1
isaacs [Fri, 19 Apr 2013 14:39:44 +0000 (07:39 -0700)]
2013.04.19, Version 0.11.1 (Unstable)

* V8: upgrade to 3.18.0

* uv: Upgrade to v0.11.1

* http: split into multiple separate modules (Timothy J Fontaine)

* http: escape unsafe characters in request path (Ben Noordhuis)

* url: Escape all unwise characters (isaacs)

* build: depend on v8 postmortem-metadata if enabled (Paddy Byers)

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

* buffer: change output of Buffer.prototype.toJSON() (David Braun)

* dtrace: actually use the _handle.fd value (Timothy J Fontaine)

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

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

* zlib: allow passing options to convenience methods (Kyle Robinson Young)

11 years agotest: fix dgram-bind-default-address on osx
isaacs [Fri, 19 Apr 2013 15:32:24 +0000 (08:32 -0700)]
test: fix dgram-bind-default-address on osx

Allow the IPv4-mapped-as-IPv6 style address.

11 years agosrc: replace Holder() with This()
Trevor Norris [Thu, 18 Apr 2013 23:52:07 +0000 (16:52 -0700)]
src: replace Holder() with This()

Switch to always use args.This() to retrieve object instance.

11 years agobuild: fix arm build after v8 upgrade
Ben Noordhuis [Fri, 19 Apr 2013 12:54:21 +0000 (14:54 +0200)]
build: fix arm build after v8 upgrade

V8 was upgraded to 3.18 in commit 9f68226. The knobs that control the
ARM build have changed in a number of ways. This commit patches the
configure script to reflect that. Should fix the Raspberry Pi build.

Fixes #5329.

11 years agoMerge remote-tracking branch 'ry/v0.10'
isaacs [Thu, 18 Apr 2013 23:21:24 +0000 (16:21 -0700)]
Merge remote-tracking branch 'ry/v0.10'

11 years agoassert: put info in err.message, not err.name
Ryan Doenges [Sun, 14 Apr 2013 01:48:00 +0000 (18:48 -0700)]
assert: put info in err.message, not err.name

4716dc6 made assert.equal() and related functions work better by
generating a better toString() from the expected, actual, and operator
values passed to fail(). Unfortunately, this was accomplished by putting
the generated message into the error's `name` property. When you passed
in a custom error message, the error would put the custom error into
`name` *and* `message`, resulting in helpful string representations like
"AssertionError: Oh no: Oh no".

This commit resolves that issue by storing the generated message in the
`message` property while leaving the error's name alone and adding
a regression test so that this doesn't pop back up later.

Closes #5292.

11 years agowebsite: add link to nightlies on download page
Ben Noordhuis [Thu, 18 Apr 2013 20:06:03 +0000 (22:06 +0200)]
website: add link to nightlies on download page

11 years agoMerge remote-tracking branch 'origin/v0.10'
Ben Noordhuis [Thu, 18 Apr 2013 10:14:30 +0000 (12:14 +0200)]
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
src/node_os.cc

11 years agocrypto: fix return Local Handle w/o scope.Close()
Trevor Norris [Wed, 17 Apr 2013 18:45:13 +0000 (11:45 -0700)]
crypto: fix return Local Handle w/o scope.Close()

A new String was being created and returned, but was not sent through
the scope.Close(), which caused it to be cleaned up before being
returned.

11 years agobuild: libv8_base.a is now libv8_base.<arch>.a
Timothy J Fontaine [Wed, 17 Apr 2013 22:37:22 +0000 (15:37 -0700)]
build: libv8_base.a is now libv8_base.<arch>.a

This fixes generating the v8 contstants for dtrace on smartos

11 years agodgram: fix no address bind()
Ben Noordhuis [Wed, 17 Apr 2013 22:44:53 +0000 (00:44 +0200)]
dgram: fix no address bind()

I broke dgram.Socket#bind(port, cb) almost a year ago in 332fea5a but
it wasn't until today that someone complained and none of the tests
caught it because they all either specify the address or omit the
callback.

Anyway, now it works again and does what you expect: it binds the
socket to the "any" address ("0.0.0.0" for IPv4 and "::" for IPv6.)

11 years agotest: make stdout-close-unref work in test runner
Ben Noordhuis [Wed, 17 Apr 2013 21:59:49 +0000 (23:59 +0200)]
test: make stdout-close-unref work in test runner

process.stdout isn't fully initialized yet by the time the test starts
when invoked with `python tools/test.py`. Use process.stdin instead and
force initialization with process.stdin.resume().

11 years agobuffer: upgrade to new V8 profiler API
Ben Noordhuis [Wed, 17 Apr 2013 14:59:19 +0000 (16:59 +0200)]
buffer: upgrade to new V8 profiler API

11 years agov8: reapply floating patches
Ben Noordhuis [Mon, 8 Apr 2013 18:34:11 +0000 (20:34 +0200)]
v8: reapply floating patches

11 years agodeps: upgrade v8 to 3.18.0
Ben Noordhuis [Wed, 17 Apr 2013 14:10:37 +0000 (16:10 +0200)]
deps: upgrade v8 to 3.18.0

11 years agohttp: split Client into _http_client.js
Timothy J Fontaine [Thu, 11 Apr 2013 23:11:12 +0000 (16:11 -0700)]
http: split Client into _http_client.js

11 years agohttp: move Server and ServerResponse out
Timothy J Fontaine [Thu, 11 Apr 2013 23:00:19 +0000 (16:00 -0700)]
http: move Server and ServerResponse out

11 years agohttp: move OutgoingMessage into it's own file
Timothy J Fontaine [Thu, 11 Apr 2013 22:37:14 +0000 (15:37 -0700)]
http: move OutgoingMessage into it's own file

11 years agohttp: move parsers into _http_common.js
Timothy J Fontaine [Thu, 11 Apr 2013 22:15:41 +0000 (15:15 -0700)]
http: move parsers into _http_common.js

11 years agohttp: move IncomingMessage into its own file
Timothy J Fontaine [Thu, 11 Apr 2013 22:00:45 +0000 (15:00 -0700)]
http: move IncomingMessage into its own file

11 years agohttp: split Agent into its own file
Timothy J Fontaine [Thu, 11 Apr 2013 21:47:15 +0000 (14:47 -0700)]
http: split Agent into its own file

11 years agodocs: update path.join() example for v0.10
Kelly Gerber [Tue, 9 Apr 2013 20:36:34 +0000 (13:36 -0700)]
docs: update path.join() example for v0.10

The current example shows the behavior of v0.8. In v0.10 arguments
to path.join() must be strings; otherwise, an exception is thrown.

11 years agodoc: note a gotcha with http.Server sockets
Ryan Graham [Tue, 16 Apr 2013 20:52:52 +0000 (13:52 -0700)]
doc: note a gotcha with http.Server sockets

11 years agohandle_wrap: fix NULL pointer dereference
Ben Noordhuis [Tue, 16 Apr 2013 20:59:35 +0000 (22:59 +0200)]
handle_wrap: fix NULL pointer dereference

Fix a NULL pointer dereference in src/handle_wrap.cc which is really a
use-after-close bug.

The test checks that unref() after close() works on process.stdout but
this bug affects everything that derives from HandleWrap. I discovered
it because child processes would sometimes quit for no reason (that is,
no reason until I turned on core dumps.)

11 years agotest: preserve process.env after test-init exec
Stanislav Ochotnicky [Tue, 16 Apr 2013 07:51:56 +0000 (09:51 +0200)]
test: preserve process.env after test-init exec

When LD_LIBRARY_PATH is overriden for custom builds we need to preserve
it for child processes. To be sure we preserve whole environment of
parent process and just add TEST_INIT variable to it.

11 years agotest: preserve process.env in forked child_process
Stanislav Ochotnicky [Wed, 10 Apr 2013 13:38:02 +0000 (15:38 +0200)]
test: preserve process.env in forked child_process

When LD_LIBRARY_PATH is overriden for custom builds we need to preserve
it for forked process. There are possibly other environment variables
that could cause test failures so we preserve whole environment of
parent process.

11 years agoos: unbreak windows build
Ben Noordhuis [Mon, 15 Apr 2013 20:36:49 +0000 (22:36 +0200)]
os: unbreak windows build

Windows doesn't have MAXHOSTNAMELEN. Introduced in afbadde.

11 years agoos: handle 256 character hostnames
Ben Noordhuis [Mon, 15 Apr 2013 19:05:20 +0000 (21:05 +0200)]
os: handle 256 character hostnames

Fix a (rather academic) buffer overflow. MAXHOSTNAMELEN is 256 on most
platforms, which means the buffer wasn't big enough to hold the
trailing nul byte on a system with a maximum length hostname.

11 years agoos: fix unlikely buffer overflow in os.type()
Ben Noordhuis [Mon, 15 Apr 2013 18:51:28 +0000 (20:51 +0200)]
os: fix unlikely buffer overflow in os.type()

* Fix a buffer overflow that happens iff strlen(info.sysname) > 255.
* Check the return value of uname().

11 years agotest: add extra checks
Ben Noordhuis [Fri, 12 Apr 2013 14:16:18 +0000 (16:16 +0200)]
test: add extra checks

11 years agohttp: escape unsafe characters in request path
Ben Noordhuis [Fri, 12 Apr 2013 13:54:31 +0000 (15:54 +0200)]
http: escape unsafe characters in request path

Make http.request() and friends escape unsafe characters in the request
path. That is, a request for '/foo bar' is now escaped as '/foo%20bar'.

Before this commit, the path was used as-is in the request status line,
creating an invalid HTTP request ("GET /foo bar HTTP/1.1").

Fixes #4381.

11 years agourl: ~ is not actually an unwise char
isaacs [Fri, 12 Apr 2013 23:27:42 +0000 (16:27 -0700)]
url: ~ is not actually an unwise char

11 years agourl: Escape all unwise characters
isaacs [Fri, 12 Apr 2013 18:39:28 +0000 (11:39 -0700)]
url: Escape all unwise characters

This makes node's http URL handling logic identical to Chrome's

Re #5284

11 years agouv: Upgrade to v0.11.1
Fedor Indutny [Fri, 12 Apr 2013 15:43:05 +0000 (11:43 -0400)]
uv: Upgrade to v0.11.1

11 years agoMerge branch 'v0.10'
Fedor Indutny [Fri, 12 Apr 2013 15:30:11 +0000 (11:30 -0400)]
Merge branch 'v0.10'

Conflicts:
ChangeLog
deps/uv/src/version.c
src/node.h
src/node_crypto.cc
src/node_crypto_bio.cc
src/node_crypto_bio.h
src/node_object_wrap.h
src/node_version.h

11 years agobuild: Typo in tools/msvs/msi/product.wxs
isaacs [Fri, 12 Apr 2013 03:40:05 +0000 (20:40 -0700)]
build: Typo in tools/msvs/msi/product.wxs

11 years agostream: Fix unshift() race conditions
isaacs [Thu, 11 Apr 2013 22:01:26 +0000 (15:01 -0700)]
stream: Fix unshift() race conditions

Fix #5272

The consumption of a readable stream is a dance with 3 partners.

1. The specific stream Author (A)
2. The Stream Base class (B), and
3. The Consumer of the stream (C)

When B calls the _read() method that A implements, it sets a 'reading'
flag, so that parallel calls to _read() can be avoided.  When A calls
stream.push(), B knows that it's safe to start calling _read() again.

If the consumer C is some kind of parser that wants in some cases to
pass the source stream off to some other party, but not before "putting
back" some bit of previously consumed data (as in the case of Node's
websocket http upgrade implementation).  So, stream.unshift() will
generally *never* be called by A, but *only* called by C.

Prior to this patch, stream.unshift() *also* unset the state.reading
flag, meaning that C could indicate the end of a read, and B would
dutifully fire off another _read() call to A.  This is inappropriate.
In the case of fs streams, and other variably-laggy streams that don't
tolerate overlapped _read() calls, this causes big problems.

Also, calling stream.shift() after the 'end' event did not raise any
kind of error, but would cause very strange behavior indeed.  Calling it
after the EOF chunk was seen, but before the 'end' event was fired would
also cause weird behavior, and could lead to data being lost, since it
would not emit another 'readable' event.

This change makes it so that:

1. stream.unshift() does *not* set state.reading = false
2. stream.unshift() is allowed up until the 'end' event.
3. unshifting onto a EOF-encountered and zero-length (but not yet
end-emitted) stream will defer the 'end' event until the new data is
consumed.
4. pushing onto a EOF-encountered stream is now an error.

So, if you read(), you have that single tick to safely unshift() data
back into the stream, even if the null chunk was pushed, and the length
was 0.

11 years agoNow working on v0.10.5
isaacs [Thu, 11 Apr 2013 18:07:08 +0000 (11:07 -0700)]
Now working on v0.10.5

11 years agoMerge branch 'v0.10.4-release' into v0.10
isaacs [Thu, 11 Apr 2013 18:06:37 +0000 (11:06 -0700)]
Merge branch 'v0.10.4-release' into v0.10

11 years agolint
isaacs [Thu, 11 Apr 2013 18:06:07 +0000 (11:06 -0700)]
lint

11 years agoblog: Fix title for v0.8.23 release
isaacs [Thu, 11 Apr 2013 18:05:53 +0000 (11:05 -0700)]
blog: Fix title for v0.8.23 release

11 years ago2013.04.11, Version 0.10.4 (Stable) v0.10.4
isaacs [Thu, 11 Apr 2013 16:39:16 +0000 (09:39 -0700)]
2013.04.11, Version 0.10.4 (Stable)

* uv: Upgrade to 0.10.4

* npm: Upgrade to 1.2.18

* v8: Avoid excessive memory growth in JSON.parse (Fedor Indutny)

* child_process, cluster: fix O(n*m) scan of cmd string (Ben Noordhuis)

* net: fix socket.bytesWritten Buffers support (Fedor Indutny)

* buffer: fix offset checks (Łukasz Walukiewicz)

* stream: call write cb before finish event (isaacs)

* http: Support write(data, 'hex') (isaacs)

* crypto: dh secret should be left-padded (Fedor Indutny)

* process: expose NODE_MODULE_VERSION in process.versions (Rod Vagg)

* crypto: fix constructor call in crypto streams (Andreas Madsen)

* net: account for encoding in .byteLength (Fedor Indutny)

* net: fix buffer iteration in bytesWritten (Fedor Indutny)

* crypto: zero is not an error if writing 0 bytes (Fedor Indutny)

* tls: Re-enable check of CN-ID in cert verification (Tobias Müllerleile)

11 years agonpm: Upgrade to 1.2.18
isaacs [Thu, 11 Apr 2013 16:16:47 +0000 (09:16 -0700)]
npm: Upgrade to 1.2.18

11 years agouv: Upgrade to v0.10.4
isaacs [Thu, 11 Apr 2013 16:07:22 +0000 (09:07 -0700)]
uv: Upgrade to v0.10.4

11 years agochild_process: fix O(n*m) scan of cmd string
Ben Noordhuis [Thu, 11 Apr 2013 11:50:45 +0000 (13:50 +0200)]
child_process: fix O(n*m) scan of cmd string

Don't scan the whole string for a "NODE_" substring, just check that
the string starts with the expected prefix.

This is a reprise of dbbfbe7 but this time for the child_process
module.

11 years agocluster: fix O(n*m) scan of cmd string
Ben Noordhuis [Thu, 11 Apr 2013 11:18:02 +0000 (13:18 +0200)]
cluster: fix O(n*m) scan of cmd string

Don't scan the whole string for a "NODE_CLUSTER_" substring, just check
that the string starts with the expected prefix. The linear scan was
causing a noticeable (but unsurprising) slowdown on messages with a
large .cmd string property.

11 years agosrc: get rid of compiler warning
Trevor Norris [Tue, 9 Apr 2013 23:17:34 +0000 (16:17 -0700)]
src: get rid of compiler warning

Removed the following compiler warning from clang:

warning: adding 'int' to a string does not append to the string
[-Wstring-plus-int]

11 years agoreq_wrap: only grab domain object if in use
Trevor Norris [Tue, 9 Apr 2013 22:31:22 +0000 (15:31 -0700)]
req_wrap: only grab domain object if in use

11 years agosrc: add using_domains to node_internals
Trevor Norris [Tue, 9 Apr 2013 23:36:38 +0000 (16:36 -0700)]
src: add using_domains to node_internals

Make it easy to check if domains are in use

11 years agodomain: change name for domain setup
Trevor Norris [Tue, 9 Apr 2013 22:29:03 +0000 (15:29 -0700)]
domain: change name for domain setup

The name UsingDomains is misleading for a function that initializes
domains for use.

11 years agosrc: add node_isolate to remaining scopes
Trevor Norris [Tue, 9 Apr 2013 22:19:47 +0000 (15:19 -0700)]
src: add node_isolate to remaining scopes

11 years agosrc: don't SetInternalField() in ObjectWrap dtor
Ben Noordhuis [Wed, 10 Apr 2013 13:25:40 +0000 (15:25 +0200)]
src: don't SetInternalField() in ObjectWrap dtor

Call SetPointerInInternalField(0, NULL) rather than
SetInternalField(0, Undefined()).

Fixes the following spurious NULL pointer dereference in debug builds:

  #0  0x03ad2821 in v8::internal::FixedArrayBase::length ()
  #1  0x03ad1dfc in v8::internal::FixedArray::get ()
  #2  0x03ae05dd in v8::internal::Context::global_object ()
  #3  0x03b6b87d in v8::internal::Context::builtins ()
  #4  0x03ae1871 in v8::internal::Isolate::js_builtins_object ()
  #5  0x03ab4fab in v8::CallV8HeapFunction ()
  #6  0x03ab4d4a in v8::Value::Equals ()
  #7  0x03b4f38b in CheckEqualsHelper ()
  #8  0x03ac0f4b in v8::Object::SetInternalField ()
  #9  0x06a99ddd in node::ObjectWrap::~ObjectWrap ()
  #10 0x06a8b051 in node::Buffer::~Buffer ()
  #11 0x06a8afbb in node::Buffer::~Buffer ()
  #12 0x06a8af5e in node::Buffer::~Buffer ()
  #13 0x06a9e569 in node::ObjectWrap::WeakCallback ()

11 years agocrypto: move write_head in bio's Reset() method
Fedor Indutny [Sat, 6 Apr 2013 19:26:24 +0000 (23:26 +0400)]
crypto: move write_head in bio's Reset() method

11 years agocrypto: fix changing buffers in bio
Fedor Indutny [Sat, 6 Apr 2013 19:26:00 +0000 (23:26 +0400)]
crypto: fix changing buffers in bio

We should go to next buffer if *current* one is full, not the next one.
Otherwise we may hop through buffers and written data will become
interleaved, which will lead to failure.

11 years agocrypto: fix style issues in bio
Fedor Indutny [Sat, 6 Apr 2013 18:47:53 +0000 (22:47 +0400)]
crypto: fix style issues in bio

Stop changing arguments, use local variables for things that change.

11 years agoRevert "crypto: use better memory BIO implementation"
Ben Noordhuis [Wed, 10 Apr 2013 11:50:59 +0000 (13:50 +0200)]
Revert "crypto: use better memory BIO implementation"

This change shouldn't have landed in the stable branch. It's a feature,
not a bug fix.

This reverts commit 58f93ffc4a23aa7240808288acf8cf9f3022abea.
This reverts commit 8c8ebe49b62c47b0ac87d697d0bc3515604667c3.
This reverts commit ba0f7b8066cb4dc8cb3cd4931e52aa94af40a709.
This reverts commit 21f3c5c3670861436392f30da2033cccbc137309.

11 years agonet: fix socket.bytesWritten Buffers support
Fedor Indutny [Wed, 10 Apr 2013 10:21:41 +0000 (14:21 +0400)]
net: fix socket.bytesWritten Buffers support

Buffer.byteLength() works only for string inputs. Thus, when connection
has pending Buffer to write, it should just use it's length instead of
throwing exception.

11 years agocrypto: remove unused ClientHelloParser field
Ben Noordhuis [Tue, 9 Apr 2013 23:38:59 +0000 (01:38 +0200)]
crypto: remove unused ClientHelloParser field

11 years agodocs: uncaughtException is here to stay
Felix Geisendörfer [Tue, 9 Apr 2013 10:39:17 +0000 (13:39 +0300)]
docs: uncaughtException is here to stay

Brings docs in line with decision made here:

https://github.com/joyent/node/issues/2582#issuecomment-9971225

11 years agoblog: Post for v0.8.23
isaacs [Tue, 9 Apr 2013 00:41:49 +0000 (17:41 -0700)]
blog: Post for v0.8.23

11 years agobuffer: fix offset checks
Łukasz Walukiewicz [Fri, 5 Apr 2013 14:48:18 +0000 (16:48 +0200)]
buffer: fix offset checks

Fixed offset checks in Buffer.readInt32LE() and Buffer.readInt32BE()
functions.

11 years agostream: call write cb before finish event
isaacs [Mon, 8 Apr 2013 18:00:26 +0000 (11:00 -0700)]
stream: call write cb before finish event

Since 049903e, an end callback could be called before a write
callback if end() is called before the write is done. This patch
resolves the issue.

In collaboration with @gne

Fixes felixge/node-formidable#209
Fixes #5215

11 years agov8: reapply floating patches
Ben Noordhuis [Mon, 8 Apr 2013 18:34:11 +0000 (20:34 +0200)]
v8: reapply floating patches

11 years agov8: upgrade to 3.17.16
Ben Noordhuis [Mon, 8 Apr 2013 18:25:29 +0000 (20:25 +0200)]
v8: upgrade to 3.17.16

11 years agohttp: Support write(data, 'hex')
isaacs [Mon, 8 Apr 2013 15:46:51 +0000 (08:46 -0700)]
http: Support write(data, 'hex')

We were assuming that any string can be concatenated safely to
CRLF.  However, for hex, base64, or binary encoded writes, this
is not the case, and results in sending the incorrect response.

An unusual edge case, but certainly a bug.

11 years agocrypto: dh secret should be left-padded
Fedor Indutny [Mon, 8 Apr 2013 14:00:18 +0000 (18:00 +0400)]
crypto: dh secret should be left-padded

DH_compute_secret() may return key that is smaller than input buffer,
in such cases key should be left-padded because it is a BN (big number).

fix #5239

11 years agoprocess: expose NODE_MODULE_VERSION in process.versions
Rod Vagg [Mon, 8 Apr 2013 05:13:23 +0000 (15:13 +1000)]
process: expose NODE_MODULE_VERSION in process.versions

11 years agocrypto: move write_head in bio's Reset() method
Fedor Indutny [Sat, 6 Apr 2013 19:26:24 +0000 (23:26 +0400)]
crypto: move write_head in bio's Reset() method

11 years agocrypto: fix changing buffers in bio
Fedor Indutny [Sat, 6 Apr 2013 19:26:00 +0000 (23:26 +0400)]
crypto: fix changing buffers in bio

We should go to next buffer if *current* one is full, not the next one.
Otherwise we may hop through buffers and written data will become
interleaved, which will lead to failure.

11 years agocrypto: fix style issues in bio
Fedor Indutny [Sat, 6 Apr 2013 18:47:53 +0000 (22:47 +0400)]
crypto: fix style issues in bio

Stop changing arguments, use local variables for things that change.

11 years agocrypto: fix constructor call in crypto streams
Andreas Madsen [Mon, 8 Apr 2013 08:32:53 +0000 (10:32 +0200)]
crypto: fix constructor call in crypto streams

When using some stream method on a lazy crypto stream, the transform
constructor wasn't called. This caused the internal state object to
be undefined.

11 years agonet: account encoding in .byteLength
Fedor Indutny [Mon, 8 Apr 2013 07:48:46 +0000 (11:48 +0400)]
net: account encoding in .byteLength

11 years agodoc: document linux pwrite() bug
Ben Noordhuis [Sun, 7 Apr 2013 22:41:33 +0000 (00:41 +0200)]
doc: document linux pwrite() bug

On Linux, positional writes don't work when the file is opened in
append mode. The kernel ignores the position argument and always
appends the data to the end of the file.

To quote the man page:

  POSIX requires that opening a file with the O_APPEND flag should have
  no affect on the location at which pwrite() writes data.  However, on
  Linux, if a file is opened with O_APPEND, pwrite() appends data to the
  end of the file, regardless of the value of offset.

11 years agonet: fix buffer iteration in bytesWritten
Fedor Indutny [Sun, 7 Apr 2013 20:50:40 +0000 (00:50 +0400)]
net: fix buffer iteration in bytesWritten

11 years agocrypto: zero is not an error if writing 0 bytes
Fedor Indutny [Sun, 7 Apr 2013 14:03:27 +0000 (18:03 +0400)]
crypto: zero is not an error if writing 0 bytes

fix #5128

11 years agotls: Re-enable check of CN-ID in cert verification
Tobias Müllerleile [Thu, 4 Apr 2013 19:10:53 +0000 (22:10 +0300)]
tls: Re-enable check of CN-ID in cert verification

RFC 6125 explicitly states that a client "MUST NOT seek a match
for a reference identifier of CN-ID if the presented identifiers
include a DNS-ID, SRV-ID, URI-ID, or any application-specific
identifier types supported by the client", but it MAY do so if
none of the mentioned identifier types (but others) are present.

11 years agostream: unused variable
Rafael Garcia [Thu, 4 Apr 2013 19:54:57 +0000 (12:54 -0700)]
stream: unused variable

11 years agostream: remove vestiges of previous _transform API
Rafael Garcia [Thu, 4 Apr 2013 19:18:21 +0000 (12:18 -0700)]
stream: remove vestiges of previous _transform API

11 years agotest: Fix message/error_exit
isaacs [Fri, 5 Apr 2013 18:32:33 +0000 (11:32 -0700)]
test: Fix message/error_exit

11 years agodoc: Correct caveats for http Readables
isaacs [Fri, 5 Apr 2013 18:07:53 +0000 (11:07 -0700)]
doc: Correct caveats for http Readables

11 years agoMerge remote-tracking branch 'ry/v0.10'
isaacs [Fri, 5 Apr 2013 16:02:48 +0000 (09:02 -0700)]
Merge remote-tracking branch 'ry/v0.10'

Conflicts:
AUTHORS
ChangeLog
deps/v8/src/json-parser.h
lib/crypto.js
src/node_version.h

11 years agocrypto: use better memory BIO implementation
Fedor Indutny [Wed, 3 Apr 2013 12:58:10 +0000 (16:58 +0400)]
crypto: use better memory BIO implementation

11 years agobuild: fix windows build, disable postmortem
Ben Noordhuis [Wed, 3 Apr 2013 23:59:36 +0000 (01:59 +0200)]
build: fix windows build, disable postmortem

Always define v8_postmortem_support, even if the platform does not
support it. Commit d8852aa adds a rule that references it in node.gyp.

Fixes the Windows build.

11 years agobuild: depend on v8 postmortem-metadata if enabled
Paddy Byers [Wed, 3 Apr 2013 07:35:39 +0000 (08:35 +0100)]
build: depend on v8 postmortem-metadata if enabled

11 years agoblog: Post about 0.10.3
isaacs [Wed, 3 Apr 2013 18:27:04 +0000 (11:27 -0700)]
blog: Post about 0.10.3

11 years agoNow working on 0.10.4
isaacs [Wed, 3 Apr 2013 18:26:54 +0000 (11:26 -0700)]
Now working on 0.10.4

11 years agoMerge branch 'v0.10.3-release' into v0.10
isaacs [Wed, 3 Apr 2013 18:27:55 +0000 (11:27 -0700)]
Merge branch 'v0.10.3-release' into v0.10

11 years agov8: cherry-pick 75311294 from upstream
Fedor Indutny [Wed, 3 Apr 2013 18:11:32 +0000 (22:11 +0400)]
v8: cherry-pick 75311294 from upstream

Quote from commit message:

    Create a new HandleScope for each JSON-parsed object to avoid
    excessive growth.

11 years ago2013.04.03, Version 0.10.3 (Stable) v0.10.3
isaacs [Wed, 3 Apr 2013 17:30:57 +0000 (10:30 -0700)]
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)

11 years agohttp: Remove legacy ECONNRESET workaround code
isaacs [Mon, 1 Apr 2013 22:46:51 +0000 (15:46 -0700)]
http: Remove legacy ECONNRESET workaround code

Fix #5179

11 years agonpm: Upgrade to 1.2.17
isaacs [Wed, 3 Apr 2013 17:17:04 +0000 (10:17 -0700)]
npm: Upgrade to 1.2.17

11 years agotest: fork-getconnections stricter, less chatty
isaacs [Wed, 3 Apr 2013 17:01:50 +0000 (10:01 -0700)]
test: fork-getconnections stricter, less chatty

11 years agochild_process: acknowledge sent handles
Fedor Indutny [Mon, 1 Apr 2013 20:07:24 +0000 (00:07 +0400)]
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

11 years agoassert: Simplify AssertError creation
isaacs [Wed, 3 Apr 2013 16:43:17 +0000 (09:43 -0700)]
assert: Simplify AssertError creation

11 years agoetw: update prototypes to match dtrace provider
Timothy J Fontaine [Sat, 30 Mar 2013 03:46:36 +0000 (20:46 -0700)]
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.

11 years agodtrace: check if _handle property is set
Ben Noordhuis [Sat, 30 Mar 2013 00:49:19 +0000 (01:49 +0100)]
dtrace: check if _handle property is set

Check that _handle is an object before trying to read its `fd`
property, avoids bogus values.

11 years agodtrace: actually use the _handle.fd value
Timothy J Fontaine [Thu, 28 Mar 2013 23:51:52 +0000 (16:51 -0700)]
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.

11 years agodtrace: pass more arguments to probes
Dave Pacheco [Thu, 28 Mar 2013 20:52:43 +0000 (13:52 -0700)]
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.