isaacs
06e321d0f9
streams2: Correct drain/return logic
...
It was testing the length *before* adding the current chunk, which
is the opposite of correct.
Also, the return value was flipped.
2012-12-13 17:00:25 -08:00
isaacs
02f017d24f
streams2: Allow 0 as a lowWaterMark value
2012-12-13 17:00:25 -08:00
isaacs
caa853bb06
transform: Automatically read() on _write when read buffer is empty
2012-12-13 17:00:25 -08:00
isaacs
3b59fd70f4
streams2: Make Transform streams pull-style
...
That is, the transform is triggered by a _read, not by a _write.
This way, backpressure works properly.
2012-12-13 17:00:24 -08:00
isaacs
9b5abe5bfe
streams2: setEncoding and abstract out endReadable
2012-12-13 17:00:24 -08:00
isaacs
51a52c43a2
streams2: Set flowing=true when flowing
2012-12-13 17:00:24 -08:00
isaacs
639fbe28d1
streams2: Convert strings to buffers before passing to _write()
2012-12-13 17:00:23 -08:00
isaacs
420e07c577
streams2: The new stream base classes
2012-12-13 17:00:23 -08:00
isaacs
17834ed28c
Add 'stream' as a native module in repl
2012-12-13 17:00:23 -08:00
isaacs
372cb32dc4
module: Support cycles in native module requires
2012-12-13 17:00:23 -08:00
isaacs
314c6b3060
Don't allow invalid encodings in StringDecoder class
2012-12-13 17:00:22 -08:00
isaacs
77ed12fe7a
Merge remote-tracking branch 'ry/v0.8' into master
...
Conflicts:
AUTHORS
ChangeLog
deps/uv/test/test-spawn.c
deps/uv/uv.gyp
src/cares_wrap.cc
src/node.cc
src/node_version.h
test/simple/test-buffer.js
tools/gyp/pylib/gyp/common.py
tools/install.py
2012-12-13 16:57:58 -08:00
isaacs
45cdb0e4c1
blog: Post for 0.8.16
2012-12-13 11:50:47 -08:00
isaacs
953673424a
Now working on 0.8.17
2012-12-13 11:50:35 -08:00
isaacs
a18507ce11
Merge commit 'v0.8.16' into v0.8
2012-12-13 11:50:15 -08:00
isaacs
1c9c6277d5
2012.12.13, Version 0.8.16 (Stable)
...
* npm: Upgrade to 1.1.69
* fs: fix WriteStream/ReadStream fd leaks (Ben Noordhuis)
* crypto: fix leak in GetPeerCertificate (Fedor Indutny)
* buffer: Don't double-negate numeric buffer arg (Trevor Norris)
* net: More accurate IP address validation and IPv6 dotted notation. (Joshua Erickson)
2012-12-13 11:49:39 -08:00
Ben Noordhuis
6cf68aead6
deps: upgrade libuv to e079a99
2012-12-13 20:23:01 +01:00
isaacs
b09f97068e
npm: Upgrade to v1.1.69
2012-12-12 14:41:28 -08:00
Ben Noordhuis
d65832ccd0
fs: fix WriteStream fd leak
...
Close the file descriptor when a write operation fails.
Fixes #4387 .
2012-12-12 09:46:22 +01:00
Ben Noordhuis
6e97b2cc17
fs: fix ReadStream fd leak
...
Close the file descriptor when a read operation fails.
Fixes #4387 .
2012-12-12 09:46:22 +01:00
Ben Noordhuis
65d824b488
test: add common.mustCall function
...
Verifies that the callback gets invoked <n> times during the lifetime of the
test script.
This is a back-port of commit d0e6c3f
from the master branch.
2012-12-12 09:46:09 +01:00
isaacs
92e92b0215
doc: Add nodejstr to community page
2012-12-10 16:56:49 -08:00
Ryunosuke SATO
0506d294dc
events: fix typos in code comment
...
- newListeners -> newListener
2012-12-10 13:08:26 +01:00
Ryunosuke SATO
eb502205d5
events: setMaxListeners() should not have side effects
...
This object initialization has been unnecessary since 12cf730b
.
Ref #3803 .
2012-12-10 13:07:35 +01:00
Ryunosuke SATO
1c7acd2c84
events: use assigned variable instead of arguments
...
Always `arguments[0]` is used when `EventEmitter#emit` called.
Using assigned variable is faster than `arguments[0]`.
2012-12-10 13:04:46 +01:00
Ryunosuke SATO
0397223ab4
events: use null assignment instead of deleting property
2012-12-10 08:59:14 +01:00
Bert Belder
3c293ba272
http: protect against response splitting attacks
2012-12-07 17:13:51 -08:00
isaacs
0e95ea42ce
lint
...
introduced in 5b65638
.
2012-12-07 16:58:16 -08:00
isaacs
33fa740577
fs: Raise error when null bytes detected in paths
...
Reworking of @bnoordhuis's more aggressive approach.
2012-12-07 16:52:46 -08:00
Ben Noordhuis
c79fd0e167
doc: remove broken require.extensions example
...
Fixes #4384 .
2012-12-06 21:58:36 +01:00
Ben Noordhuis
5b65638124
tls, https: add tls handshake timeout
...
Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.
Adds a new tls.Server and https.Server configuration option, handshakeTimeout.
Fixes #4355 .
2012-12-06 17:39:24 +01:00
Ben Noordhuis
3ece130ea2
process: add getgroups(), setgroups(), initgroups()
...
DRY the getuid(), getgid(), etc. functions while we're at it.
2012-12-06 17:14:58 +01:00
Ben Noordhuis
c08e947fbd
buffer: remove unused #includes
2012-12-06 04:45:11 +01:00
Ben Noordhuis
c81dec70e6
test: remove simple/test-child-process-fork2
...
The test assumes the parent and the child are scheduled fairly. Probably true
most of the time but not always, making it fail spuriously.
Bad test, remove it.
2012-12-05 05:46:20 +01:00
Shigeki Ohtsu
1c8a5269c5
test: fix simple/test-debug-brk-file race condition
...
V8 debug agent needs some time to be ready and no longer sends the first event
break response to a debug client. We wait some time to connect the agent and
check its break status by obtaining breakpoint list and seeing if it exists on
line 0.
2012-12-05 04:31:22 +01:00
Ben Noordhuis
1f76a2eddc
fs: add long stacktrace debugging facility
...
Enable long stacktraces if NODE_DEBUG=fs is set in the environment. Only
applies to the default rethrow callback; it's to help you find places where
you forgot to pass in a callback.
2012-12-04 08:12:12 +01:00
Ben Noordhuis
a80434736b
fs: fix 'object is not a function' callback errors
...
Use a default callback if the user omitted one. Avoids errors like the one
below:
fs.js:777
if (err) return callback(err);
^
TypeError: object is not a function
at fs.appendFile (fs.js:777:21)
at Object.oncomplete (fs.js:297:15)
This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile()
when the callback is omitted. Before, they silently swallowed errors.
Fixes #4352 .
2012-12-04 08:05:55 +01:00
Bert Belder
03b00dcca9
os: throw when os.networkInterfaces() fails
2012-12-03 22:35:01 +01:00
Fedor Indutny
51d5655efa
crypto: fix leak in GetPeerCertificate
2012-12-03 20:30:41 +04:00
Fedor Indutny
276245d26f
crypto: fix leak in GetPeerCertificate
2012-12-03 20:30:16 +04:00
Ben Noordhuis
9d02bfbc25
test: fix simple/test-setproctitle on freebsd
2012-12-03 03:08:19 +01:00
Ben Noordhuis
f8999da514
build: avoid -Wno-old-style-declaration with gcc 4.2
...
Fixes the build on FreeBSD <= 9 with the default compiler.
Fixes #4186 .
2012-12-03 02:21:32 +01:00
Ben Noordhuis
e5649d4b3d
tools: fix platform detection on freebsd, sunos
...
This is a back-port of upstream gyp commit r1482.
2012-12-02 03:01:20 +01:00
Ben Noordhuis
22965da799
install: fix freebsd man page location
...
Man pages go into $PREFIX/man on FreeBSD, not $PREFIX/share/man.
2012-12-02 02:55:50 +01:00
isaacs
4de274cbee
test: TTY only has writeBuffer(), not write()
...
This test is only passing because it's skipped normally.
2012-12-01 11:17:51 -08:00
isaacs
3149d2f7dc
benchmark: Add net-pipe benchmark
...
Just sends a buffer to a server, which echoes it back, and then measures
the Gbits/second. Very similar to throughput.js, but using a single
process, so that it's possible to dtrace and get the jsstack frames for
profile comparison.
2012-11-30 18:26:18 -08:00
Lewuathe
4d0fcd515f
Fix dropped html tag
2012-11-30 18:14:26 -08:00
Trevor Norris
6772308883
buffer: Don't double-negate numeric buffer arg
...
Fix #4331
Using double negate forces values into 32bit space. Because of this
Math.ceil needs to be used. Since NaN comparisons are always false, use
that to our advantage to return 0 if it is.
Also added two tests to verify the changes.
2012-11-30 16:23:49 -08:00
Kyle Robinson Young
acad8d9a77
website: typo fixes
2012-11-29 23:00:09 +01:00
Joshua Erickson
c9f2531ae0
net: More accurate IP address validation and IPv6 dotted notation.
...
* Added isIP method to make use of inet_pton to cares_wrap.cc
* Modified net.isIP() to make use of new C++ isIP method.
* Added new tests to test-net-isip.js.
This is a back-port of commit fb6377e
from the master branch.
2012-11-28 21:51:27 +01:00