Commit Graph

7703 Commits (193320aa3a128ae4ee06e91f1b4b25ce64aef82b)

Author SHA1 Message Date
Ben Noordhuis 193320aa3a gitignore: ignore v8.log files 2013-01-24 11:35:29 +01:00
Ben Noordhuis 4a7a98fd0a http: close connection on 204 and chunked encoding
This is similar to commit 2cbf458 but this time for 204 No Content
instead of 304 Not Modified responses.

When the user sends a 204 response with a Transfer-Encoding: chunked
header, suppress sending the zero chunk and force the connection to
close.
2013-01-24 11:23:36 +01:00
Scott Blomquist 0774798ce0 build: Add some gyp artifacts to .gitignore 2013-01-23 10:54:00 -08:00
Trevor Norris 3d286b68be buffer: remove float write range checks
Removed range checks when writing float values, and removed a few
includes and defines. Also updated api docs to reflect that invalid 32
bit float is an unspecified behavior.
2013-01-23 13:55:04 +01:00
Ben Noordhuis 2cbf4586df http: close connection on 304 and chunked encoding
Force the connection to close when the response is a 304 Not Modified
and the user has set a "Transfer-Encoding: chunked" header.

RFC 2616 mandates that 304 responses MUST NOT have a body but node.js
used to send out a zero chunk anyway to accommodate clients that don't
have special handling for 304 responses.

It was pointed out that this might confuse reverse proxies to the point
of creating security liabilities, so suppress the zero chunk and force
the connection to close.
2013-01-23 01:47:24 +01:00
Bert Belder e2acf26a91 deps: upgrade libuv to e4d8cba 2013-01-23 00:17:01 +01:00
Ben Noordhuis 814bdf0f51 deps: upgrade libuv to 7841f77 2013-01-22 16:21:25 +01:00
Tim d5a5901346 doc: Fix syntax in cluster example code 2013-01-21 19:17:01 -08:00
Fedor Indutny e2592cc6a3 gyp: fix build with dtrace support on FreeBSD
Fix undefined reference to `gelf_getsym`... and other undefined symbols
from libelf, by adding `-lelf` to linker options on FreeBSD.
2013-01-21 12:47:26 +04:00
Fedor Indutny 3d67f89552 dtrace: fix generation of v8 constants on freebsd
Every constant is certainly 4 bytes now, but freebsd's objdump utility
prints out odd byte sequences (5-bytes, 6-bytes and even 9-bytes long)
for v8's data section. We can safely ignore all upper bytes, because all
constants that we're using are just `int`s. Since on all supported
platforms `int` is 32bit long (and anyway v8's constants are 32bit too),
we ignore all higher bits if they were read.
2013-01-21 12:46:27 +04:00
Ben Noordhuis 2dd373894f typed arrays: fix DataView endianness regression
Fix an off-by-one error introduced in 9fe3734 that caused a regression
in the default endianness used for writes in DataView::setGeneric().

Fixes #4626.
2013-01-20 00:29:01 +01:00
Fedor Indutny 00abc243dd child_process: remove .track option
Since net.Server's `connection` property is deprecated now, we don't
need API to track socket's state to keep `connection`s value up-to-date.
2013-01-20 02:23:42 +04:00
isaacs 539bf1d7b7 console: Support formatting options in trace()
Fix #4589
2013-01-18 15:39:08 -08:00
Dave Olszewski 14c911de77 domain: empty stack on all exceptions
Due to the nature of asyncronous programming, it's impossible to know
what will run on the next tick.  Because of this, it's not correct to
maintain domain stack state between ticks

Since the _fatalException handler is only invoked after the stack is
unwound, once it exits the tick will end.  The only reasonable thing to
do in that case is to exit *all* domains.
2013-01-18 13:26:40 -08:00
Yi EungJun 33d22428fb doc: Add NODE_DEBUG env to the first example.
The first example in cluster.markdown requires NODE_DEBUG env to show
debug message.

And also fix the message because it was a little bit different with
the actual message.
2013-01-18 13:18:37 -08:00
isaacs 3d7818fc42 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	src/node_version.h
	test/simple/test-buffer.js
2013-01-18 12:58:16 -08:00
isaacs 9c2c845463 blog: Post for v0.8.18 release 2013-01-18 12:54:22 -08:00
isaacs 4598a4c6dd Now working on 0.8.19 2013-01-18 12:51:34 -08:00
isaacs f05cf3bea7 Merge branch 'v0.8.18-release' into v0.8 2013-01-18 12:51:14 -08:00
isaacs 2c4eef0d97 2013.01.18, Version 0.8.18 (Stable)
* npm: Upgrade to v1.2.2

* dns: make error message match errno (Dan Milon)

* tls: follow RFC6125 more stricly (Fedor Indutny)

* buffer: reject negative SlowBuffer offsets (Ben Noordhuis)

* install: add simplejson fallback (Chris Dent)

* http: fix "Cannot call method 'emit' of null" (Ben Noordhuis)
2013-01-18 12:15:41 -08:00
isaacs 4d32fc5964 npm: Upgrade to v1.2.2 2013-01-18 12:12:07 -08:00
isaacs fc3547bc82 Now working on 0.9.8 2013-01-18 11:49:35 -08:00
isaacs fa543da830 Merge branch 'v0.9.7-release' 2013-01-18 11:49:12 -08:00
isaacs 1c35ee8695 blog: Post for v0.9.7 release 2013-01-18 11:48:21 -08:00
isaacs 9e7bebeb83 2013.01.18, Version 0.9.7 (Unstable)
* V8: Upgrade to 3.15.11.7

* npm: Upgrade to 1.2.2

* punycode: Upgrade to 1.2.0 (Mathias Bynens)

* repl: make built-in modules available by default (Felix Böhm)

* windows: add support for '_Total' perf counters (Scott Blomquist)

* cluster: make --prof work for workers (Ben Noordhuis)

* child_process: do not keep list of sent sockets (Fedor Indutny)

* tls: Follow RFC6125 more strictly (Fedor Indutny)

* buffer: floating point read/write improvements (Trevor Norris)

* TypedArrays: Improve dataview perf without endian param (Dean McNamee)

* module: assert require() called with a non-empty string (Felix Böhm, James Campos)

* stdio: Set readable/writable flags properly (isaacs)

* stream: Properly handle large reads from push-streams (isaacs)
2013-01-18 11:04:11 -08:00
isaacs ee2fd79e43 doc: Remove mention of child.send 'track' option
Will be removed very soon.  No point making it public.
2013-01-18 11:04:10 -08:00
isaacs 01a4be4554 buffer: Define INFINITY for MSVC compiler 2013-01-18 11:04:10 -08:00
isaacs 0459a60232 npm: Upgrade to 1.2.2 2013-01-18 08:37:32 -08:00
Ben Noordhuis 6b713b5253 cluster: make --prof work for workers
Profiling in clustered environments doesn't work out of the box.

By default, V8 writes the profile data of all processes to a single
v8.log.

Running that log file through a tick processor produces bogus numbers
because many events won't match up with the recorded memory mappings
and you end up with graphs where 80+% of ticks is unaccounted for.

Fixing the tick processor to deal with multi-process output is not very
useful because the processes may be running wildly disparate workloads.

That's why we fix up the command line arguments to include
a "--logfile=v8-%p.log" argument (where %p is expanded to the PID)
unless it already contains a --logfile argument.

Fixes #4617.
2013-01-18 12:56:40 +01:00
Dan Milon 7295bb9435 dns: make error message match errno 2013-01-18 12:13:32 +01:00
Ben Noordhuis 8b0f3ce397 v8: add %p option to --logfile, expands to pid
Useful when you are profiling multiple instances of V8 concurrently.
Submitted upstream: http://code.google.com/p/v8/issues/detail?id=2503

Refs #4617.
2013-01-18 01:33:12 +01:00
Fedor Indutny 31583be042 tls: follow RFC6125 more stricly
* Allow wildcards only in left-most part of hostname identifier.
* Do not match CN if altnames are present
2013-01-18 03:48:05 +04:00
Fedor Indutny e70d1bfe64 Revert "Revert "tls: allow wildcards in common name""
This reverts commit 30e237041d.

Works properly with b4b750b
2013-01-18 03:47:47 +04:00
Fedor Indutny 4488a69fac child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want to receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-18 03:13:41 +04:00
Fedor Indutny 44cd121c63 Revert "child_process: do not keep list of sent sockets"
This reverts commit db5ee0b3de.
2013-01-18 03:13:10 +04:00
isaacs ae6f4b32c4 benchmark: Add resume() in static_http_server 2013-01-17 14:54:59 -08:00
Fedor Indutny db5ee0b3de child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want `server.connections` to be a reliable
  number, and receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-17 13:46:31 -08:00
isaacs b7d76a1a7b Revert "events: Don't crash on events named __proto__"
Unfortunately, it's just too slow to do this in events.js.  Users will
just have to live with not having events named __proto__ or toString.

This reverts commit b48e303af0.
2013-01-17 13:20:22 -08:00
isaacs 1528de2373 stdio: Set readable/writable flags properly
Set the readable/writable flags properly in net streams that have
a handle passed in (such as TTY streams).

Fix #4606
2013-01-17 10:42:44 -08:00
isaacs b48e303af0 events: Don't crash on events named __proto__
This prefixes all event names internally with 'ev'.
2013-01-17 09:21:45 -08:00
Ben Noordhuis 30e237041d Revert "tls: allow wildcards in common name"
This reverts commit 45024e7b75.

It's making test/simple/test-tls-check-server-identity.js fail:

  AssertionError: Test#4 failed: { host: 'b.a.com',
    cert: { subject: { CN: '*.a.com' } },
    result: false }
      at <omitted>/test/simple/test-tls-check-server-identity.js:201:10
2013-01-17 16:32:00 +01:00
Ryunosuke SATO 562d3f11f3 doc: modify documentation style about 'Stability: 5'
'Stability: 5' is described as 'Locked' not as 'API Locked'
in other documents.

For example:
- `/doc/api/assert.markdown`
- `/doc/api/util.markdown`

This word was injected in 192192a.
2013-01-17 13:51:21 +01:00
Ben Noordhuis 08ac9fe016 test: add cluster 'bind twice' test
This test starts two clustered HTTP servers on the same port.
It expects the first cluster to succeed and the second cluster
to fail with EADDRINUSE.

Reapplies commit cacd3ae, accidentally reverted in a2851b6.
2013-01-17 13:37:23 +01:00
Ben Noordhuis 498200b87c buffer: reject negative SlowBuffer offsets
Reject negative offsets in SlowBuffer::MakeFastBuffer(), it allows
the creation of buffers that point to arbitrary addresses.

Reported by Trevor Norris.
2013-01-17 01:22:11 +01:00
Ben Noordhuis 952e42de72 deps: upgrade libuv to 4ba03dd 2013-01-16 23:38:02 +01:00
isaacs 47f3fc9a26 test: add module-loading test with empty string 2013-01-16 12:27:53 -08:00
Felix Böhm 7465cf911a module: assert that require() is called with a string
as requested in #4577
2013-01-16 12:25:06 -08:00
isaacs b9ffc537e6 lint: Prefer double-quotes over single 2013-01-16 12:07:12 -08:00
Ryunosuke SATO 61741f9a83 repl: fix how to module requiring in code comment
This module requiring style is old.
This API has been changed in Node 0.1.16 726865af.
2013-01-16 10:59:22 -08:00
Dean McNamee 9fe3734f15 TypedArrays: Improve dataview perf without endian param
V8 seems to be particularly slow converting an undefined value to false
in BooleanValue.

Revert this when we upgrade to V8 3.17, or whenever the fix discussed
in http://code.google.com/p/v8/issues/detail?id=2487 lands in V8.
2013-01-16 10:54:28 -08:00