0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

8242 Commits

Author SHA1 Message Date
Ben Noordhuis
e99dff4617 deps: upgrade libuv to 7b66ea1 2013-03-14 15:55:26 +01:00
Adam Malcontenti-Wilson
028c630ecd doc: change dgram to socket for properties of dgram.Socket
Fixes #4919.
2013-03-14 12:55:19 +01:00
isaacs
6399839c39 Revert "stream: Never call decoder.end() multiple times"
This reverts commit 615d809ac6.
2013-03-13 15:48:56 -07:00
isaacs
6bd8b7e540 fs: Missing cb errors are deprecated, not a throw
Commit a804347 makes fs function rethrow errors when the callback is
omitted. While the right thing to do, it's a change from the old v0.8
behavior where such errors were silently ignored.

To give users time to upgrade, temporarily disable that and replace it
with a function that warns once about the deprecated behavior.

Close #5005
2013-03-13 15:34:18 -07:00
Ben Noordhuis
fa05e8a270 doc: implicit fs callbacks don't throw in v0.10
But they will in v0.12.

Re #5005.
2013-03-13 15:34:18 -07:00
Ben Noordhuis
7b7235a232 doc: add note on process.title max length
Fixes #5006.
2013-03-13 23:27:16 +01:00
Gil Pedersen
615d809ac6 stream: Never call decoder.end() multiple times
Fixes decoder.end() being called on every push(null). As the tls module
does this, corrupt stream data could potentially be added to the end.
2013-03-13 15:20:13 -07:00
isaacs
110cacd1ed core: Move UNWRAP_NO_ABORT to handle_wrap.h
Otherwise it cannot be used in StreamWrap.

Forgot to include in last patch, broke the build.
2013-03-13 11:26:36 -07:00
Ben Noordhuis
9af0085f70 doc: path.join() arguments must be strings
In v0.8, non-string arguments were ignored. v0.10 throws an exception.
2013-03-13 18:42:04 +01:00
Fedor Indutny
8135ac1b7f net: handle 'finish' event only after 'connect' 2013-03-13 10:27:23 -07:00
isaacs
53f2381455 core: Unwrap without aborting in handle fd getter 2013-03-13 10:16:26 -07:00
isaacs
7a07b31a2f blog: Fix typo in typo fix 2013-03-13 10:15:30 -07:00
Nathan Rajlich
598b5e4593 blog: fix small typo in v0.10.0 release article 2013-03-12 19:00:48 -07:00
Ben Noordhuis
da10bb85ff doc: events: add 'removeListener' event section
Amends commit 84221fd by (also) documenting the 'removeListener' event
in a dedicated section, like the 'newListener' event.

Fixes #4977.
2013-03-12 00:07:18 +01:00
isaacs
228ad9357c blog: Post about v0.10.0 2013-03-11 10:19:19 -07:00
isaacs
e2b293c360 Now working on 0.10.1 2013-03-11 08:49:33 -07:00
isaacs
dcfb6d8286 Merge branch 'v0.10.0-release' into v0.10 2013-03-11 08:49:20 -07:00
isaacs
163ca27423 2013.03.11, Version 0.10.0 (Stable)
* npm: Upgrade to 1.2.14

* core: Append filename properly in dlopen on windows (isaacs)

* zlib: Manage flush flags appropriately (isaacs)

* domains: Handle errors thrown in nested error handlers (isaacs)

* buffer: Strip high bits when converting to ascii (Ben Noordhuis)

* win/msi: Enable modify and repair (Bert Belder)

* win/msi: Add feature selection for various node parts (Bert Belder)

* win/msi: use consistent registry key paths (Bert Belder)

* child_process: support sending dgram socket (Andreas Madsen)

* fs: Raise EISDIR on Windows when calling fs.read/write on a dir (isaacs)

* unix: fix strict aliasing warnings, macro-ify functions (Ben Noordhuis)

* unix: honor UV_THREADPOOL_SIZE environment var (Ben Noordhuis)

* win/tty: fix typo in color attributes enumeration (Bert Belder)

* win/tty: don't touch insert mode or quick edit mode (Bert Belder)
2013-03-10 17:36:28 -07:00
isaacs
327b6e3e1d stream: Don't emit 'end' unless read() called
This solves the problem of calling `readable.pipe(writable)` after the
readable stream has already emitted 'end', as often is the case when
writing simple HTTP proxies.

The spirit of streams2 is that things will work properly, even if you
don't set them up right away on the first tick.

This approach breaks down, however, because pipe()ing from an ended
readable will just do nothing.  No more data will ever arrive, and the
writable will hang open forever never being ended.

However, that does not solve the case of adding a `on('end')` listener
after the stream has received the EOF chunk, if it was the first chunk
received (and thus, length was 0, and 'end' got emitted).  So, with
this, we defer the 'end' event emission until the read() function is
called.

Also, in pipe(), if the source has emitted 'end' already, we call the
cleanup/onend function on nextTick.  Piping from an already-ended stream
is thus the same as piping from a stream that is in the process of
ending.

Updates many tests that were relying on 'end' coming immediately, even
though they never read() from the req.

Fix #4942
2013-03-10 11:08:22 -07:00
isaacs
cd2b9f542c stream: Avoid nextTick warning filling read buffer
In the function that pre-emptively fills the Readable queue, it relies
on a recursion through:

stream.push(chunk) ->
maybeReadMore(stream, state) ->
  if (not reading more and < hwm) stream.read(0) ->
stream._read() ->
stream.push(chunk) -> repeat.

Since this was only calling read() a single time, and then relying on a
future nextTick to collect more data, it ends up causing a nextTick
recursion error (and potentially a RangeError, even) if you have a very
high highWaterMark, and are getting very small chunks pushed
synchronously in _read (as happens with TLS, or many simple test
streams).

This change implements a new approach, so that read(0) is called
repeatedly as long as it is effective (that is, the length keeps
increasing), and thus quickly fills up the buffer for streams such as
these, without any stacks overflowing.
2013-03-10 11:04:48 -07:00
Julian Gruber
738347b904 events: Handle missing error obj when domains in use
so `ee.emit('error')` doesn't throw when domains are active

create an empty error only when handled by a domain

test for when no error is provided to an error event
2013-03-10 09:53:24 -07:00
koichik
c9a4ec9c63 http: ServerRequest does not timeout after 'end'
Fixes #4967
2013-03-10 20:14:43 +09:00
isaacs
e2400f88d8 http: Do not setTimeout a not-yet-existent socket
Fixes #4967
2013-03-10 18:34:41 +09:00
isaacs
21a99664ae uv: Upgrade to 5462dab 2013-03-09 18:34:59 -08:00
isaacs
12713c3bb7 win/msi: Fix typos 2013-03-09 09:22:00 -08:00
isaacs
31b5d41f57 npm: Upgrade to 1.2.14 (fixed) 2013-03-09 09:11:22 -08:00
hc
5757ce48b4 http: check if incoming parser has already been freed
Fix #4948

This adds a check before setting the incoming parser
to null. Under certain circumstances it'll already be set to
null by freeParser().

Otherwise this will cause node to crash as it tries to set
null on something that is already null.
2013-03-09 08:46:44 -08:00
Andreas Madsen
7becf156a9 timers: consistent this keyword in setImmediate
When calling setImmediate with extra arguments the this keyword in the
callback would refer to the global object, but when not calling
setImmediate with extra arguments this would refer to the returned
handle object.

This commit fixes that inconsistency so its always set handle object.
The handle object was chosen for performance reasons.
2013-03-09 08:19:57 -08:00
isaacs
80472bc301 domain: Fix double-exit on nested domains
Minor oversight in fix for #4953.
2013-03-09 07:00:21 -08:00
isaacs
4d1e9e5370 Now working on 0.10.0 2013-03-08 21:52:09 -08:00
isaacs
7c9ff8e94a lint 2013-03-08 20:26:26 -08:00
Gil Pedersen
77a776da90 stream: Always defer preemptive reading to improve latency 2013-03-08 20:09:21 -08:00
isaacs
061a7ddbff Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	src/node_version.h
2013-03-08 18:59:44 -08:00
isaacs
6e34dfd9e8 test: Fail faster in simple/test-cluster-bind-twice-v2
Crashing on windows, but at least now it's a crash rathert han a timeout.
2013-03-08 18:56:32 -08:00
isaacs
98c6a81771 test: Kill zombies when debugger-client fails on windows 2013-03-08 18:56:32 -08:00
isaacs
8cf2d4c2c1 test: Don't run async operation in process 'exit'
Also, this seems to occasionally cause some annoying file-locking
errors in Windows.  Not sure if this is the best fix, but it seems
to make the warnings go away in that spot.
2013-03-08 18:56:31 -08:00
isaacs
f5c293b5ed test: Use copy instead of symlink in child-process-fork-exec-path 2013-03-08 18:56:31 -08:00
isaacs
9826159bf1 test: Trim cat output for windows 2013-03-08 18:56:31 -08:00
isaacs
99a2059e40 test: Sending dgram sockets to child procs not supported on windows 2013-03-08 18:56:31 -08:00
isaacs
6076a25e80 core: Append filename properly in dlopen on windows
Fixes simple/test-module-loading on win32
2013-03-08 18:56:31 -08:00
isaacs
08f5db112f test: Make stream2-transform less timing-dependent 2013-03-08 18:56:31 -08:00
isaacs
6d593a9026 test: Don't fail tls-session-cache if openssl is bad 2013-03-08 18:56:31 -08:00
isaacs
b3cbb16f41 zlib: Manage flush flags appropriately
If you call z.flush();z.write('foo'); then it would try to write 'foo'
before the flush was done, triggering an assertion in the zlib binding.

Closes #4950
2013-03-08 18:56:31 -08:00
isaacs
29cd0f2a77 domains: Handle errors thrown in nested error handlers
If a domain error handler throws, it should be caught if it was
in a stack of nested domains.

Fix #4953
2013-03-08 14:46:58 -08:00
Ben Noordhuis
e325ace53c buffer: speed up ascii character scanning
Speed up ASCII character scanning and conversion by 25% to 30% by scanning and
converting whole words instead of individual bytes.
2013-03-08 14:42:15 -08:00
Ben Noordhuis
96a314b68b buffer: strip high bits when converting to ascii
Consider the following example:

  console.log(Buffer('ú').toString('ascii'));

Before this commit, the contents of the buffer was used as-is and hence it
prints 'ú'.

Now, it prints 'C:'. Perhaps not much of an improvement but it conforms to what
the documentation says it does: strip off the high bits.

Fixes #4371.
2013-03-08 14:42:15 -08:00
isaacs
632b7d8750 Revert "http: check if incoming parser has already been freed"
This reverts commit 9f4c3b0d45.
2013-03-08 14:35:00 -08:00
hheennrryy@gmail.com
9f4c3b0d45 http: check if incoming parser has already been freed
Fix #4948

This adds a check before setting the incoming parser
to null. Under certain circumstances it'll already be set to
null by freeParser().

Otherwise this will cause node to crash as it tries to set
null on something that is already null.
2013-03-08 14:14:58 -08:00
isaacs
ea30ca9533 doc: Add wrk's license to LICENSE file 2013-03-08 13:47:36 -08:00
Bert Belder
3c22c42519 win/msi: enable modify and repair 2013-03-08 18:00:41 +01:00