Commit Graph

983 Commits (3d7d994ffce2e79d516f76d7384a411b21021142)

Author SHA1 Message Date
Ryan Dahl 3d7d994ffc Merge branch 'v0.4'
Conflicts:
	doc/api/modules.markdown
	test/simple/test-crypto.js
2011-06-15 14:43:37 +02:00
Ryan Dahl 86214c9f16 tcp_wrap: Initial wrap of uv_read_start 2011-06-14 18:03:01 +02:00
Mark Cavage 88552c51ae Support for signature verification with RSA/DSA public keys
Fixes #1166.
2011-06-14 12:50:00 +02:00
isaacs 9967c369c9 AMD compatibility for node, with docs and tests
Closes #1173
Closes #1170
2011-06-13 16:11:13 -07:00
Ryan Dahl 062759194b Initial binding to uv_tcp_t 2011-06-10 18:17:48 +02:00
Ryan Dahl b6a742d76f Merge branch 'v0.4' 2011-06-03 16:37:56 +02:00
Fuji, Goro 8971b59365 `node -e ''` should mean eval(''), not invoke REPL
Fixes #1116
2011-05-31 22:10:39 -07:00
Ryan Dahl 4d22405f0f TimerWrap: mimic libev ref count semantics 2011-05-28 13:21:03 -07:00
Ryan Petrello 58a1d7ec30 Close #562 Close #1078 Parse file:// urls properly
The file:// protocol *always* has a hostname; it's frequently
abbreviated as an empty string, which represents 'localhost'
implicitly.

According to RFC 1738 (http://tools.ietf.org/html/rfc1738):

A file URL takes the form:

   file://<host>/<path>

where <host> is the fully qualified domain name of the system on
which the <path> is accessible...

As a special case, <host> can be the string "localhost" or the empty
string; this is interpreted as 'the machine from which the URL is
being interpreted'.
2011-05-27 10:47:34 -07:00
Ryan Dahl 9d1bad8960 Implement new wrap for uv timer 2011-05-25 10:17:02 -07:00
Felix Geisendörfer f0a440d886 Remove 'connect' event from server side sockets
Sockets emitted by the 'connection' event are always connected, having
them emit the 'connect' event makes no sense. It only confused people,
as it's not clear if you have to listen to 'connect' or not.

That try..catch block was also very scary. It would silently swallow
exceptions in 'connect' listeners and destroy the socket. Makes no
sense.

Fixes #1047.
2011-05-24 11:22:59 -07:00
Felix Geisendörfer 2b91256c61 Fix error handling bug in stream.pipe()
Problem: Since stream.pipe() is registering it's own error handlers on
the source and destination stream, it needs to replicate the
EventEmitter 'error' emitting semantics of throwing an error if there
are no other listeners. However, there was a off-by-one error because
the check for remaining listeners was done after cleanup() which means
the pipe's own listener was no longer included.

This would cause 'error' events on either the dest or the source to
throw if there was one other error listener, and while swallowing
the 'error' event if there was no other listener.

Solution: I added a test demonstrating the two issues and fixed the
problem by correcting the off-by-one error.

Fixes #1095.
2011-05-24 10:50:33 -07:00
Ryan Dahl 59274e8a33 Merge branch 'v0.4'
Conflicts:
	lib/crypto.js
	lib/tls.js
2011-05-20 10:29:16 -07:00
Ryan Dahl 9c7f89bf56 CryptoStream.prototype.readyState shoudn't reference fd
Fixes #1069
2011-05-20 10:20:22 -07:00
David Trejo 8a0ac5b422 Add test for agent upgrade and example in docs 2011-05-19 18:44:42 -07:00
Ryan Dahl 6461af1baa Fix buffer test 2011-05-19 12:41:17 -07:00
Ryan Dahl 5e409c2f1a makeFastBuffer should not segfault but rather throw on non-buffer 2011-05-19 12:13:48 -07:00
Ryan Dahl 85bc8d02fa Merge branch 'v0.4'
Conflicts:
	src/node_crypto.cc
2011-05-16 19:29:02 -07:00
Ryan Dahl 103a450d3a Remove 'binary' encoding assert - add tests
Don't write large characters to buffers with binary encoding. You will be
silently injured.
2011-05-16 15:01:33 -07:00
koichik d4f82ea590 Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"
Fixes #1038
2011-05-16 10:21:16 -07:00
Brian White e505a1215c Add reading/writing of floats and doubles from/to buffers
Code for readIEEE754/writeIEEE754 is from jspack: http://code.google.com/p/jspack/
2011-05-15 18:39:07 -07:00
koichik 80c2fe9456 Fix event listener leak check timing
Fixes #1041.
2011-05-14 14:43:00 -07:00
Felix Geisendörfer e7ac6d8fcd Error argument for http.ServerRequest 'close'
Problem: It was not possible to detect the reason for a premature
connection termination in http requests.

This patch provides a new `err` argument to the 'close' event which
can be inspected to differentiate between a timeout and a client
actively terminating the connection.

Also contains tests for this new behavior for http and https.
2011-05-14 14:15:31 -07:00
Felix Geisendörfer 1fde5f51b4 Make https 'timeout' events bubble up
Also adds a test case for it.
2011-05-14 13:38:04 -07:00
Ryan Dahl 337c48db5f Rename spawnNode to fork 2011-05-11 13:32:40 -07:00
Ryan Dahl 9e26dab150 child_process.spawnNode
For making easy worker processes.
2011-05-11 02:24:48 -07:00
isaacs 307f39ce9e Fix a url regression
The change for #954 introduced a regression that would cause
the url parser to fail on special chars found in the auth
segment.  Fix that, and also don't create invalid urls when
format() is called on an object containing an auth member
containing '@' characters or delimiters.
2011-05-10 13:57:25 -07:00
isaacs 205b9beb6b Merge branch 'v0.4'
Conflicts:
	lib/tls.js
	lib/url.js
	src/node_version.h
	test/simple/test-buffer.js
	test/simple/test-url.js
2011-05-07 20:38:32 -07:00
Håvard Stranden 9f0b1a9bc6 Add Diffie-Hellman support to crypto module
Fixes #573
2011-05-06 14:36:04 -07:00
Konstantin Käfer 5e1b7cadb4 Add Buffer::fill method to do memset
Fixes #477.
2011-05-06 13:39:12 -07:00
Ryan Dahl 75a0cf970f cleartextstream.destroy() should destroy socket.
This fixes a critical bug see in MJR's production. Very difficult to build a
test case. Sometimes HTTPS server gets sockets that are hanging in a
half-duplex state.
2011-05-02 15:03:50 -07:00
Robert Mustacchi 9812e31e8b Add reading/writing of C integers to buffers 2011-05-01 14:02:33 -07:00
koichik fcc04e67c8 Fix SlowBuffer.write() with 'ucs2' throws ReferenceError. 2011-04-28 04:57:00 -04:00
isaacs a7ce79124e Add arch/platform to os module 2011-04-26 20:04:32 -07:00
Mark Cavage a2328dc73c Add support for Unix Domain Sockets to HTTP
fixes #979.
2011-04-25 16:52:31 -07:00
isaacs 8df6f9e544 Close #974 Properly report traceless errors.
Also, tests for the same.
2011-04-25 12:22:18 -07:00
isaacs 8fd1c68f06 A test that running 100 stream pipes in parallel is ok 2011-04-22 19:33:23 -07:00
Ryan Dahl 621b024b6e Bump bounds on #897 test - was too small for slow machines 2011-04-22 17:50:40 -07:00
Ryan Dahl c8e447ee63 Fix timeouts with floating point numbers bug
fixes #897.
2011-04-22 16:38:29 -07:00
isaacs 5cfac21852 GH-853 fs.fchmod and fs.fchown 2011-04-20 16:04:33 -07:00
isaacs 90802d628d Close #954 URL parsing/formatting corrections
1. Allow single-quotes in urls, but escape them.
2. Add comments about which RFCs we're following for guidance.
3. Handle any invalid character in the hostname portion.
4. lcase protocol and hostname portions, since they are
case-insensitive.
2011-04-20 15:44:34 -07:00
Fedor Indutny c9b40da368 OpenSSL NPN in node.js
closes #926.
2011-04-19 11:32:26 -07:00
Ryan Dahl 9e6498d5fa Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-04-18 18:58:16 -07:00
Ryan Dahl b4ff36a41b Add --cov code coverage option 2011-04-14 23:42:08 -07:00
Felix Geisendörfer 80711b0ff9 Feature: WriteStream#bytesWritten property
Implemented a new property for writable file streams that keeps track
of the bytes written (not queued). This helps when you are piping
another stream to a file, and would like to know how big the file is
without having to issue another stat call.

closes #930
2011-04-14 14:26:46 -07:00
Felix Geisendörfer 6c5b31bd80 Fix: Multiple pipes to the same stream were broken
When creating multiple .pipe()s to the same destination stream, the
first source to end would close the destination, breaking all remaining
pipes. This patch fixes the problem by keeping track of all open
pipes, so that we only call end on destinations that have no more
sources piping to them.

closes #929
2011-04-14 14:12:01 -07:00
Ryan Dahl 598792ba91 Merge branch 'v0.4'
Conflicts:
	src/platform_sunos.cc
	test/simple/test-os.js
2011-04-14 01:11:21 +00:00
Scott McWhirter 90348a616d Add os.cpus() and os.uptime() support for sunos 2011-04-13 17:42:54 -07:00
Ryan Dahl 2f98451561 Revert "Add os.cpus() and os.uptime() support for sunos"
Cherry-pick fail. Breaks linux. Will land again shortly.

This reverts commit e8cf98c841.
This reverts commit d953856d87.
This reverts commit 752bbd6b42.
2011-04-13 17:31:09 -07:00
Scott McWhirter e8cf98c841 Add os.cpus() and os.uptime() support for sunos 2011-04-14 00:18:19 +00:00