platform/upstream/nodejs.git
11 years agoutil: add a "customInspect" option to `util.inspect()`
Nathan Rajlich [Wed, 10 Oct 2012 20:52:56 +0000 (13:52 -0700)]
util: add a "customInspect" option to `util.inspect()`

For disabling calling the custom `inspect()` function when defined on an object
that is being inspected.

11 years agoUpdate AUTHORS and .mailmap
Ben Noordhuis [Wed, 10 Oct 2012 21:07:33 +0000 (23:07 +0200)]
Update AUTHORS and .mailmap

11 years agoutil: make `inspect()` accept an "options" argument
Nathan Rajlich [Wed, 10 Oct 2012 01:47:08 +0000 (18:47 -0700)]
util: make `inspect()` accept an "options" argument

Consolidates all the formatting options into an "options" object argument.
This is so that we don't have to be constantly remembering the order of
the arguments and so that we can add more formatting options easily.

Closes #4085.

11 years agodeps: upgrade libuv to cb03e3b
Ben Noordhuis [Wed, 10 Oct 2012 00:17:32 +0000 (02:17 +0200)]
deps: upgrade libuv to cb03e3b

11 years agohttps: fix renegotation attack protection
Ben Noordhuis [Sun, 7 Oct 2012 23:22:44 +0000 (01:22 +0200)]
https: fix renegotation attack protection

Listen for the 'clientError' event that is emitted when a renegotation attack
is detected and close the connection.

Fixes test/pummel/test-https-ci-reneg-attack.js

11 years agotls: remove dead code
Ben Noordhuis [Tue, 9 Oct 2012 14:32:49 +0000 (16:32 +0200)]
tls: remove dead code

Remove dead code. Forgotten in 76ddf06.

11 years agocluster: make 'listening' handler see actual port
Aaditya Bhatia [Tue, 9 Oct 2012 01:01:03 +0000 (18:01 -0700)]
cluster: make 'listening' handler see actual port

Make the 'listening' event handler in the master process see the actual port
that the worker bound to when the worker specified port 0, i.e. a random port.

11 years agobuffer: include encoding value in exception when invalid
Ricky Ng-Adam [Tue, 9 Oct 2012 08:14:00 +0000 (16:14 +0800)]
buffer: include encoding value in exception when invalid

Encoding failures can be somewhat confusing, especially when they are due to
control flow frameworks auto-filling parameters from the previous step output
values to functions (such as toString and write) that developers don't expect
to take an encoding parameter. By outputting the value as part of the message,
should make it easier to track down these sort of bugs.

11 years agowindows: use USERPROFILE to get the user's home dir
Bert Belder [Mon, 8 Oct 2012 22:47:38 +0000 (00:47 +0200)]
windows: use USERPROFILE to get the user's home dir

Fixes #3461
Close #3462
Close #4093

11 years agotls: don't use a timer to track renegotiations
Ben Noordhuis [Mon, 8 Oct 2012 00:18:30 +0000 (02:18 +0200)]
tls: don't use a timer to track renegotiations

It makes tls.createSecurePair(null, true) hang until the timer expires.

Using a timer here is silly. Use a timestamp instead.

11 years agodeps: upgrade libuv to 40134c3
Ben Noordhuis [Sun, 7 Oct 2012 22:44:47 +0000 (00:44 +0200)]
deps: upgrade libuv to 40134c3

11 years agotest: write to temp dir, not fixtures dir
Ben Noordhuis [Sun, 7 Oct 2012 22:25:07 +0000 (00:25 +0200)]
test: write to temp dir, not fixtures dir

11 years agorepl: dynamically lookup the require extensions for tab complete
Nathan Rajlich [Sun, 7 Oct 2012 18:27:14 +0000 (11:27 -0700)]
repl: dynamically lookup the require extensions for tab complete

Removes 2 TODO items

11 years agoUpdate LICENSE file.
Ben Noordhuis [Sat, 6 Oct 2012 22:46:35 +0000 (00:46 +0200)]
Update LICENSE file.

11 years agodeps: upgrade libuv to b9ed1a6
Ben Noordhuis [Sat, 6 Oct 2012 21:04:30 +0000 (23:04 +0200)]
deps: upgrade libuv to b9ed1a6

11 years agoRevert "http: make http.ServerResponse emit 'end'"
isaacs [Thu, 4 Oct 2012 00:40:14 +0000 (17:40 -0700)]
Revert "http: make http.ServerResponse emit 'end'"

This reverts commit 790d651f0dfae13f1e2b799820ab18ac09f251b7.

This makes Duplex streams unworkable, and would only ever be a special
case for HTTP responses, which is not ideal.

Intead, we're going to just bless the 'finish' event for all Writable
streams in 0.10

11 years agostreams: fix pipe is destructed by 'end' from destination
koichik [Thu, 12 Jan 2012 05:33:56 +0000 (14:33 +0900)]
streams: fix pipe is destructed by 'end' from destination

11 years agonode_http_parser: fix whitespace errors
Ben Noordhuis [Tue, 2 Oct 2012 12:49:43 +0000 (14:49 +0200)]
node_http_parser: fix whitespace errors

11 years agopath: add platform specific path delimiter
Paul Serby [Mon, 1 Oct 2012 20:10:32 +0000 (22:10 +0200)]
path: add platform specific path delimiter

Closes #3728
Closes #4071

11 years agotest: Fix stdin message tests
isaacs [Fri, 28 Sep 2012 17:42:52 +0000 (10:42 -0700)]
test: Fix stdin message tests

11 years agotest: Fix simple/test-http-client-timeout-agent
isaacs [Fri, 28 Sep 2012 16:55:29 +0000 (09:55 -0700)]
test: Fix simple/test-http-client-timeout-agent

Merge breakage.

11 years agoMerge remote-tracking branch 'ry/v0.8' into v0.8-merge
isaacs [Fri, 28 Sep 2012 16:47:48 +0000 (09:47 -0700)]
Merge remote-tracking branch 'ry/v0.8' into v0.8-merge

Conflicts:
AUTHORS
ChangeLog
deps/openssl/openssl.gyp
deps/uv/src/unix/linux/linux-core.c
deps/uv/src/unix/process.c
deps/uv/src/unix/stream.c
deps/v8/src/arm/builtins-arm.cc
deps/v8/src/arm/code-stubs-arm.cc
deps/v8/src/arm/full-codegen-arm.cc
lib/tls.js
src/node_version.h
test/simple/test-http-client-timeout-agent.js

11 years agodebugger: test repeating last command
Fedor Indutny [Fri, 28 Sep 2012 06:58:50 +0000 (10:58 +0400)]
debugger: test repeating last command

* debugger: Add NODE_FORCE_READLINE environment variable, handle
 `SIGINT`'s sent to process while in this mode.

11 years agoFixed a bug with last command repeating in debugger
Alex Kocharin [Sat, 25 Aug 2012 19:25:32 +0000 (23:25 +0400)]
Fixed a bug with last command repeating in debugger

11 years agohttp: add response.headersSent property
Pavel Lang [Tue, 18 Sep 2012 16:26:08 +0000 (18:26 +0200)]
http: add response.headersSent property

Boolean property getter. True if headers was sent, false otherwise.

11 years agohttp: handle multiple Proxy-Authenticate values
thewilli [Mon, 24 Sep 2012 08:18:05 +0000 (11:18 +0300)]
http: handle multiple Proxy-Authenticate values

Just as the 'WWW-Authenticate' HTTP header the 'Proxy-Authenticate' header might
be received several times as well. Currently only one value is preserved. This
change allows to receive multiple values concatenated by space and comma.

11 years agodoc: Make the CLA more simple/sane
isaacs [Thu, 27 Sep 2012 20:25:55 +0000 (13:25 -0700)]
doc: Make the CLA more simple/sane

1. Emails should go to @isaacs, not emily.
2. Ask for the electronic signature first, not the printed faxed thing.

11 years agoblog: Post about 0.8.11
isaacs [Thu, 27 Sep 2012 17:25:37 +0000 (10:25 -0700)]
blog: Post about 0.8.11

11 years agoNow working on 0.8.12
isaacs [Thu, 27 Sep 2012 17:25:12 +0000 (10:25 -0700)]
Now working on 0.8.12

11 years agoMerge branch 'v0.8.11-release' into v0.8
isaacs [Thu, 27 Sep 2012 17:24:32 +0000 (10:24 -0700)]
Merge branch 'v0.8.11-release' into v0.8

11 years ago2012.09.27, Version 0.8.11 (Stable) v0.8.11
isaacs [Thu, 27 Sep 2012 16:39:23 +0000 (09:39 -0700)]
2012.09.27, Version 0.8.11 (Stable)

* fs: Fix stat() size reporting for large files (Ben Noordhuis)

11 years agohttp: handle multiple Proxy-Authenticate values
thewilli [Mon, 24 Sep 2012 08:18:05 +0000 (11:18 +0300)]
http: handle multiple Proxy-Authenticate values

Just as the 'WWW-Authenticate' HTTP header the 'Proxy-Authenticate' header might
be received several times as well. Currently only one value is preserved. This
change allows to receive multiple values concatenated by space and comma.

11 years agotest: pick another CNAME record to test dns queries
Bert Belder [Tue, 25 Sep 2012 23:56:42 +0000 (01:56 +0200)]
test: pick another CNAME record to test dns queries

Google.com no longer has a CNAME record.

11 years agofs: fix stat() reporting for large files
Ben Noordhuis [Tue, 25 Sep 2012 23:20:08 +0000 (01:20 +0200)]
fs: fix stat() reporting for large files

Use Number::New(), not Integer::New(). Large values won't fit in an Integer.

Apply to the size, ino and blocks fields.

11 years agoblog: Post about v0.8.10
isaacs [Tue, 25 Sep 2012 22:37:53 +0000 (15:37 -0700)]
blog: Post about v0.8.10

11 years agoNow working on 0.8.11
isaacs [Tue, 25 Sep 2012 22:36:10 +0000 (15:36 -0700)]
Now working on 0.8.11

11 years agoMerge branch 'v0.8.10-release' into v0.8
isaacs [Tue, 25 Sep 2012 22:33:01 +0000 (15:33 -0700)]
Merge branch 'v0.8.10-release' into v0.8

11 years ago2012.09.25, Version 0.8.10 (Stable) v0.8.10
isaacs [Tue, 25 Sep 2012 15:09:30 +0000 (08:09 -0700)]
2012.09.25, Version 0.8.10 (Stable)

* npm: Upgrade to 1.1.62

* repl: make invalid RegExps throw in the REPL (Nathan Rajlich)

* v8: loosen artificial mmap constraint (Bryan Cantrill)

* process: fix setuid() and setgid() error reporting (Ben Noordhuis)

* domain: Properly exit() on domain disposal (isaacs)

* fs: fix watchFile() missing deletion events (Ben Noordhuis)

* fs: fix assert in fs.watch() (Ben Noordhuis)

* fs: don't segfault on deeply recursive stat() (Ben Noordhuis)

* http: Remove timeout handler when data arrives (Frédéric Germain)

* http: make the client "res" object gets the same domain as "req" (Nathan Rajlich)

* windows: don't blow up when an invalid FD is used (Bert Belder)

* unix: map EDQUOT to UV_ENOSPC (Charlie McConnell)

* linux: improve /proc/cpuinfo parser (Ben Noordhuis)

* win/tty: reset background brightness when color is set to default (Bert Belder)

* unix: put child process stdio fds in blocking mode (Ben Noordhuis)

* unix: fix EMFILE busy loop (Ben Noordhuis)

* sunos: don't set TCP_KEEPALIVE (Ben Noordhuis)

* tls: Use slab allocator for memory management (Fedor Indutny)

* openssl: Use optimized assembly code for x86 and x64 (Bert Belder)

11 years agoopenssl: fix compilation issues on SmartOS x64
Bert Belder [Tue, 25 Sep 2012 19:25:55 +0000 (21:25 +0200)]
openssl: fix compilation issues on SmartOS x64

the SunOS linker is more strict than usual, so we have to be more
correct.

11 years agotest: Fix premature close in test-http-client-timeout-agent
isaacs [Tue, 25 Sep 2012 18:15:44 +0000 (11:15 -0700)]
test: Fix premature close in test-http-client-timeout-agent

11 years agotls: lint
isaacs [Tue, 25 Sep 2012 18:09:34 +0000 (11:09 -0700)]
tls: lint

cc @indutny >_<

11 years agodomain: Remove stray console.log
isaacs [Tue, 25 Sep 2012 18:08:44 +0000 (11:08 -0700)]
domain: Remove stray console.log

11 years agoopenssl: use optimized asm code on x86 and x64
Bert Belder [Wed, 12 Sep 2012 23:50:38 +0000 (01:50 +0200)]
openssl: use optimized asm code on x86 and x64

11 years agoopenssl: add generated asm code
Bert Belder [Sat, 8 Sep 2012 00:43:18 +0000 (02:43 +0200)]
openssl: add generated asm code

11 years agoopenssl: add 'clean' target to asm Makefile
Bert Belder [Fri, 21 Sep 2012 16:03:28 +0000 (18:03 +0200)]
openssl: add 'clean' target to asm Makefile

11 years agoopenssl: generate asm code with a Makefile
Ben Noordhuis [Mon, 10 Sep 2012 16:35:58 +0000 (18:35 +0200)]
openssl: generate asm code with a Makefile

11 years agoopenssl: disable HT sidechannel attack mitigation
Bert Belder [Fri, 21 Sep 2012 16:07:08 +0000 (18:07 +0200)]
openssl: disable HT sidechannel attack mitigation

It used to be off before. It's extremely unlikely that such an attack
would be a viable attack against node. And it makes AES much slower.

11 years agoopenssl: revert empty_OPENSSL_cpuid_setup.patch
Bert Belder [Wed, 12 Sep 2012 23:11:06 +0000 (01:11 +0200)]
openssl: revert empty_OPENSSL_cpuid_setup.patch

11 years agoopenssl: fix perlasm issue
Bert Belder [Wed, 12 Sep 2012 23:03:50 +0000 (01:03 +0200)]
openssl: fix perlasm issue

When perlasm generates MASM code it sets the assembler target to 468.
In this mode MASM refuses to assemble the CPUID instruction. Bumping
the target to 586 solves this problem.

11 years agoopenssl: add optimized bignum x64 asm code for windows
Bert Belder [Sat, 8 Sep 2012 00:08:22 +0000 (02:08 +0200)]
openssl: add optimized bignum x64 asm code for windows

11 years agotls: use slab allocator
Fedor Indutny [Thu, 5 Jul 2012 19:50:21 +0000 (15:50 -0400)]
tls: use slab allocator

11 years agonpm: upgrade to 1.1.62
isaacs [Tue, 25 Sep 2012 15:28:55 +0000 (08:28 -0700)]
npm: upgrade to 1.1.62

11 years agotest: fix failing due to too early timeout
Shigeki Ohtsu [Tue, 25 Sep 2012 06:00:01 +0000 (15:00 +0900)]
test: fix failing due to too early timeout

11 years agodoc: put API table of contents in alphabetical order
Adam Blackburn [Sat, 22 Sep 2012 22:48:47 +0000 (16:48 -0600)]
doc: put API table of contents in alphabetical order

11 years agowindows: fix typo in node.gyp
Bert Belder [Mon, 24 Sep 2012 22:50:37 +0000 (00:50 +0200)]
windows: fix typo in node.gyp

11 years agohttp: make the client "res" object gets the same domain as "req"
Nathan Rajlich [Mon, 24 Sep 2012 18:30:26 +0000 (11:30 -0700)]
http: make the client "res" object gets the same domain as "req"

Fixes #4046.

11 years agorepl: make invalid RegExps throw in the REPL
Nathan Rajlich [Sat, 22 Sep 2012 01:46:16 +0000 (18:46 -0700)]
repl: make invalid RegExps throw in the REPL

Fixes #2746.

11 years agouv: upgrade to 39ca621
Bert Belder [Sat, 22 Sep 2012 01:53:16 +0000 (03:53 +0200)]
uv: upgrade to 39ca621

11 years agov8: loosen artificial mmap constraint
Bryan Cantrill [Tue, 18 Sep 2012 22:35:29 +0000 (15:35 -0700)]
v8: loosen artificial mmap constraint

Fixes #4010.

11 years agohandle_wrap: don't abort if wrap == NULL
Ben Noordhuis [Wed, 1 Aug 2012 12:21:39 +0000 (14:21 +0200)]
handle_wrap: don't abort if wrap == NULL

After a disconnect, the internal pointer of the parent/child channel is set to
NULL. That's not an error so don't abort().

11 years agotest: possible ipc.ref() regression
Andreas Madsen [Wed, 1 Aug 2012 11:39:14 +0000 (13:39 +0200)]
test: possible ipc.ref() regression

11 years agochild_process: don't die when disconnect event exists
Andreas Madsen [Wed, 1 Aug 2012 11:33:22 +0000 (13:33 +0200)]
child_process: don't die when disconnect event exists

11 years agochild_process: make .fork()'d child auto-exit
Ben Noordhuis [Tue, 31 Jul 2012 14:14:34 +0000 (16:14 +0200)]
child_process: make .fork()'d child auto-exit

A child process created with .fork() needed to call `process.exit()` explicitly
because the communication channel with the parent kept the event loop alive.

Fix that by only ref'ing the channel when there are 'message' event listeners.

Fixes #3799.

11 years agoevents: speed up .removeAllListeners()
Ben Noordhuis [Tue, 31 Jul 2012 23:29:10 +0000 (01:29 +0200)]
events: speed up .removeAllListeners()

11 years agoevents: speed up newListener/removeListener events
Ben Noordhuis [Tue, 31 Jul 2012 23:21:46 +0000 (01:21 +0200)]
events: speed up newListener/removeListener events

11 years agoevents: add 'removeListener' event
Ben Noordhuis [Tue, 31 Jul 2012 22:57:15 +0000 (00:57 +0200)]
events: add 'removeListener' event

11 years agotest: add common.mustCall function
Ben Noordhuis [Tue, 31 Jul 2012 15:47:53 +0000 (17:47 +0200)]
test: add common.mustCall function

Verifies that the callback gets invoked <n> times during the lifetime of the
test script.

11 years agov8: loosen artificial mmap constraint
Bryan Cantrill [Tue, 18 Sep 2012 22:35:29 +0000 (15:35 -0700)]
v8: loosen artificial mmap constraint

Fixes #4010.

11 years agodomain: Properly exit() on domain disposal
isaacs [Thu, 20 Sep 2012 22:13:36 +0000 (15:13 -0700)]
domain: Properly exit() on domain disposal

This addresses #4034.  There are two problems happening:

1. The domain is not exited automatically when calling dispose() on it.
Then, since the domain is disposed, attempting to exit it again will do
nothing.

2. The active domain is stored on process.domain.  Since thrown errors
call `process.emit('uncaughtException', er)`, and the process is an
event emitter with a `.domain` member, it re-enters the domain a second
time before calling the error handler, pushing it onto the stack again.

Thus, if the handler calls `domain.dispose()`, then the domain is now on
the stack twice, and cannot be exited properly.  Since the domain is
disposed, any subsequent IO will be no-op'ed, since we've declared that
this context is done and best forgotten.

The solution here is twofold:

1. In EventEmitter.emit, do not enter the domain if `this===process`.
2. Automatically exit the domain when calling `domain.dispose()`.

11 years agov8: fix postmortem metadata generation
Bryan Cantrill [Tue, 18 Sep 2012 23:56:34 +0000 (01:56 +0200)]
v8: fix postmortem metadata generation

11 years agoV8: reapply floating patches
isaacs [Tue, 18 Sep 2012 22:26:53 +0000 (15:26 -0700)]
V8: reapply floating patches

11 years agoV8: Upgrade to 3.13.7.1
isaacs [Tue, 18 Sep 2012 22:20:38 +0000 (15:20 -0700)]
V8: Upgrade to 3.13.7.1

11 years agotest: add tests for postmortem and DTrace support
Bryan Cantrill [Thu, 20 Sep 2012 23:48:55 +0000 (01:48 +0200)]
test: add tests for postmortem and DTrace support

11 years agoconfigure: turn on VFPv3 on ARMv7
Ben Noordhuis [Wed, 19 Sep 2012 12:37:08 +0000 (14:37 +0200)]
configure: turn on VFPv3 on ARMv7

Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.

11 years agodoc: zlib: document flush() and reset() methods
Ben Noordhuis [Wed, 19 Sep 2012 11:22:27 +0000 (13:22 +0200)]
doc: zlib: document flush() and reset() methods

11 years agocrypto: bring module into modern age
Fedor Indutny [Wed, 12 Sep 2012 20:35:59 +0000 (00:35 +0400)]
crypto: bring module into modern age

Introduce 'buffer' encoding, allow returning and giving buffers as
arguments of 'crypto' routines.

Fix #3278

11 years agoauthors: add @tasogarepg to AUTHORS
Fedor Indutny [Tue, 18 Sep 2012 06:57:59 +0000 (10:57 +0400)]
authors: add @tasogarepg to AUTHORS

11 years agodebugger: fix --debug-brk
tasogarepg [Fri, 7 Sep 2012 18:18:39 +0000 (03:18 +0900)]
debugger: fix --debug-brk

11 years agoNow working on v0.9.3
isaacs [Tue, 18 Sep 2012 01:34:48 +0000 (18:34 -0700)]
Now working on v0.9.3

11 years agoMerge branch 'v0.9.2-release'
isaacs [Tue, 18 Sep 2012 01:34:31 +0000 (18:34 -0700)]
Merge branch 'v0.9.2-release'

11 years agoblog: Post for 0.9.2
isaacs [Tue, 18 Sep 2012 01:33:36 +0000 (18:33 -0700)]
blog: Post for 0.9.2

11 years ago2012.09.17, Version 0.9.2 (Unstable) v0.9.2
isaacs [Mon, 17 Sep 2012 04:51:47 +0000 (21:51 -0700)]
2012.09.17, Version 0.9.2 (Unstable)

* http_parser: upgrade to ad3b631

* openssl: upgrade 1.0.1c

* darwin: use FSEvents to watch directory changes (Fedor Indutny)

* unix: support missing API on NetBSD (Shigeki Ohtsu)

* unix: fix EMFILE busy loop (Ben Noordhuis)

* windows: un-break writable tty handles (Bert Belder)

* windows: map WSAESHUTDOWN to UV_EPIPE (Bert Belder)

* windows: make spawn with custom environment work again (Bert Belder)

* windows: map ERROR_DIRECTORY to UV_ENOENT (Bert Belder)

* tls, https: validate server certificate by default (Ben Noordhuis)

* tls, https: throw exception on missing key/cert (Ben Noordhuis)

* tls: async session storage (Fedor Indutny)

* installer: don't install header files (Ben Noordhuis)

* buffer: implement Buffer.prototype.toJSON() (Nathan Rajlich)

* buffer: added support for writing NaN and Infinity (koichik)

* http: make http.ServerResponse emit 'end' (Ben Noordhuis)

* build: ./configure --ninja (Ben Noordhuis, Timothy J Fontaine)

* installer: fix --without-npm (Ben Noordhuis)

* cli: make -p equivalent to -pe (Ben Noordhuis)

* url: Go much faster by using Url class (isaacs)

11 years agoopenssl: fix the Windows x64 build
Bert Belder [Tue, 18 Sep 2012 00:13:29 +0000 (02:13 +0200)]
openssl: fix the Windows x64 build

11 years agoopenssl: Set flags to properly build on sunos
isaacs [Mon, 17 Sep 2012 23:54:36 +0000 (16:54 -0700)]
openssl: Set flags to properly build on sunos

11 years agoopenssl: fix the Windows x64 build
Bert Belder [Tue, 18 Sep 2012 00:13:29 +0000 (02:13 +0200)]
openssl: fix the Windows x64 build

11 years agotest: fs.watch filename support on Darwin
isaacs [Mon, 17 Sep 2012 22:45:37 +0000 (15:45 -0700)]
test: fs.watch filename support on Darwin

11 years agouv: Upgrade to 778144f0
isaacs [Mon, 17 Sep 2012 22:36:05 +0000 (15:36 -0700)]
uv: Upgrade to 778144f0

joyent/libuv@778144f0b5bc14fe55d79854d0a67124ceaa4b22

11 years agoconfigure: always use shlex instead of split
Alex Xu [Sat, 15 Sep 2012 01:06:25 +0000 (21:06 -0400)]
configure: always use shlex instead of split

Use shlex module instead of builtin string split to parse CC.

11 years agourl: Go much faster by using Url class
isaacs [Thu, 13 Sep 2012 18:09:54 +0000 (11:09 -0700)]
url: Go much faster by using Url class

V8 loves it when JavaScript pretends to be a Classic inheritance
type of language.

Before:

$ ./node benchmark/url.js
benchmarking parse() ... 1.868 sec
benchmarking format() ... 1.906 sec
benchmarking resolve("../foo/bar?baz=boom") ... 7.800 sec
benchmarking resolve("foo/bar") ... 7.099 sec
benchmarking resolve("http://nodejs.org") ... 8.403 sec
benchmarking resolve("./foo/bar?baz") ... 7.974 sec

After:

$ ./node benchmark/url.js
benchmarking parse() ... 1.769 sec
benchmarking format() ... 1.793 sec
benchmarking resolve("../foo/bar?baz=boom") ... 4.254 sec
benchmarking resolve("foo/bar") ... 3.932 sec
benchmarking resolve("http://nodejs.org") ... 4.382 sec
benchmarking resolve("./foo/bar?baz") ... 4.293 sec

11 years agofs: fix watchFile() missing deletion events
Ben Noordhuis [Mon, 17 Sep 2012 15:40:23 +0000 (17:40 +0200)]
fs: fix watchFile() missing deletion events

Make sure the deletion event gets reported in the following scenario:

  1. Watch a file.
  2. The initial stat() goes okay.
  3. Something deletes the watched file.
  4. The second stat() fails with ENOENT.

The second stat() translates into the first 'change' event but a logic error
stopped it from getting emitted.

Fixes #4027.

11 years agodoc: fix three typos
Robin Lee [Sun, 2 Sep 2012 07:36:21 +0000 (15:36 +0800)]
doc: fix three typos

11 years agoprocess: fix setuid() and setgid() error reporting
Ben Noordhuis [Mon, 17 Sep 2012 05:17:11 +0000 (07:17 +0200)]
process: fix setuid() and setgid() error reporting

Zero errno before calling getgrnam_r() or getpwnam_r(). If errno had previously
been clobbered, node would report the wrong error.

11 years agotest: set rejectUnauthorized in tls/https tests
Ben Noordhuis [Thu, 30 Aug 2012 14:43:20 +0000 (16:43 +0200)]
test: set rejectUnauthorized in tls/https tests

Update the tls and https tests to explicitly set rejectUnauthorized instead of
relying on the NODE_TLS_REJECT_UNAUTHORIZED environment variable getting set.

11 years agotls, https: validate server certificate by default
Ben Noordhuis [Thu, 30 Aug 2012 13:14:37 +0000 (15:14 +0200)]
tls, https: validate server certificate by default

This commit changes the default value of the rejectUnauthorized option from
false to true.

What that means is that tls.connect(), https.get() and https.request() will
reject invalid server certificates from now on, including self-signed
certificates.

There is an escape hatch: if you set the NODE_TLS_REJECT_UNAUTHORIZED
environment variable to the literal string "0", node.js reverts to its
old behavior.

Fixes #3949.

11 years agouv: upgrade to 3d9de13
Bert Belder [Fri, 14 Sep 2012 02:00:30 +0000 (04:00 +0200)]
uv: upgrade to 3d9de13

11 years agouv: upgrade to a28f145
Bert Belder [Fri, 14 Sep 2012 00:56:41 +0000 (02:56 +0200)]
uv: upgrade to a28f145

11 years agofs: fix assert in fs.watch()
Ben Noordhuis [Fri, 14 Sep 2012 00:34:10 +0000 (02:34 +0200)]
fs: fix assert in fs.watch()

Fix the following error:

  FSEventWrap: Aborting due to unwrap failure at ../../src/fs_event_wrap.cc:169

It's possible and legal for a handle to be closed twice. HandleWrap::Close()
deals with that by ignoring the second close. Now FSEventWrap::Close() does
too.

Fixes #3997.

11 years agofs: don't segfault on deeply recursive stat()
Ben Noordhuis [Thu, 13 Sep 2012 23:59:44 +0000 (01:59 +0200)]
fs: don't segfault on deeply recursive stat()

Check that the calls to Integer::New() and Date::New() succeed and bail out if
they don't.

V8 returns an empty handle on stack overflow. Trying to set the empty handle as
a property on an object results in a NULL pointer dereference in release builds
and an assert in debug builds.

Fixes #4015.

11 years agov8: Replace VFP by VFP2 in common.gypi
Nathan Rajlich [Mon, 20 Aug 2012 19:06:29 +0000 (12:06 -0700)]
v8: Replace VFP by VFP2 in common.gypi

This fixes an omission in cl 10818026.
Patch by Nathan Rajlich.

Review URL: http://codereview.chromium.org/10913256

11 years agov8: Relax requirement from VFP3 to VFP2 where possible.
yangguo@chromium.org [Mon, 20 Aug 2012 00:01:32 +0000 (17:01 -0700)]
v8: Relax requirement from VFP3 to VFP2 where possible.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10818026

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@12194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00