Commit Graph

966 Commits (68d840b47d18d5c64c33d80c95c39941b6e9ad6c)

Author SHA1 Message Date
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
Ryan Dahl 296ff04cdc Test to demonstrate #892 2011-04-13 12:49:13 -07:00
Brian White ac1da4b407 Add remoteAddress and remotePort for client TCP connections
https://groups.google.com/d/topic/nodejs-dev/Asr87_YFSkg/discussion
2011-04-13 10:24:28 -07:00
koichik 9533e879f0 Fix Buffer.write() with UCS-2 should not be write partial char
closes #916.
2011-04-13 09:55:49 -07:00
Felix Geisendörfer 301f53c2aa Allow omission of end option for range reads
Problem: Sometimes it is useful to read a file from a certain position
to it's end. The current implementation was already perfectly capable
of this, but decided to throw an error when the user tried to omit
the end option. The only way to do this, was to pass {end: Infinity}.

Solution: Automatically assume {end: Infinity} when omitted, and remove
the previous exception thrown. Also updated the docs.

closes #801.
2011-04-13 09:46:28 -07:00
Nick Campbell 425b57bedc Lowercase protocol and hostname since casing isn't significant.
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
2011-04-13 01:10:47 -07:00
Jakub Lekstan 81cbd42cf5 Fixes the circular reference in vm modules.
Fixes the circular reference problem. Closes GH-822.
2011-04-12 15:51:57 -07:00
Abe Fettig 83727a4c86 Fix bug where http response.readable was never set to false
Closes GH-867.
2011-04-12 14:55:18 -07:00
Felix Geisendörfer bc8489580c Allow to remove all EventEmitter listeners at once
This patch adds support for calling EventEmitter#removeAllListeners
with no parameters in order to remove all listeners as once.

See discussion: https://groups.google.com/forum/#!topic/nodejs-dev/Mcyal1ThTHY

Closes GH-889.
2011-04-12 14:47:16 -07:00
Ryan Dahl 9ccf0e527f Don't error on ENOTCONN from shutdown() 2011-04-11 15:33:24 -07:00
Ryan Dahl bfa9db9dd6 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
	test/simple/test-buffer.js
2011-04-03 23:42:56 -07:00
isaacs 7ee8c5676b Modify futimes test to allow ENOSYS 2011-04-01 17:41:42 -07:00
isaacs 6d85da185c Closes GH-721 Set default host header properly
However, this test is failing for some quite unrelated issue.
Getting some odd "socket hangup" crashes, and only the first request
ever makes it to the server.
2011-04-01 17:40:41 -07:00
isaacs e1a72f0e2e Closes GH-535 Immediate pause/resume race condition
Calling resume() immediately after calling pause() would trigger
a race condition where it would try to read() from a file
descriptor that was already being read from, causing an EBADF
2011-04-01 17:40:19 -07:00
isaacs 4d64f36338 Closes GH-310 Format slashes properly 2011-04-01 17:40:19 -07:00
Ryan Dahl f2dd8dd2b9 Fix test/message/undefined_reference_in_new_context
Broke after 75db199.
2011-04-01 12:36:58 -07:00
Ryan Dahl ed74db01f3 process.stderr.write should return true 2011-03-30 15:53:07 -07:00
Ryan Dahl 6394ba28c8 Add test for circular refs in deepEquals
Closes GH-207.
2011-03-30 10:18:58 -07:00