Commit Graph

924 Commits (82bc25d5ada29b8d60787259b13feb39eed3296e)

Author SHA1 Message Date
koichik fcc04e67c8 Fix SlowBuffer.write() with 'ucs2' throws ReferenceError. 2011-04-28 04:57:00 -04: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 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
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
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
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
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
Ryan Dahl 9ccf0e527f Don't error on ENOTCONN from shutdown() 2011-04-11 15:33:24 -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 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
Ryan Dahl 038306a6c3 Closes GH-843. Fix SlowBuffer.prototype.slice 2011-03-29 10:47:14 -07:00
Jorge Chamorro Bieling e7604b1ea7 Retain buffers in fs.read/write()
Closes GH-814.
Closes GH-827.
2011-03-28 15:28:55 -07:00
Mikeal Rogers 2a65d29625 Fix listener leak in stream.pipe() 2011-03-28 11:19:44 -07:00
Arnout Kazemier 53bec1c862 Added support for removing .once listeners
Closes GH-806.
2011-03-25 11:51:29 -07:00
Ryan Dahl d7a86ff05e Fix GH-819. Drop out if connection destroyed before connect() 2011-03-21 14:48:26 -07:00
Ryan Dahl 66570c1964 Fix double free of parser on error in http.Agent.
Thanks to Stéphan Kochen for the fix and Maurice Fonk for reproducing the
bug.

Closes GH-784.
Closes GH-803.
2011-03-18 10:42:43 -07:00
Ryan Dahl af923154e2 hello.txt should be stored in tmpdir 2011-03-18 09:14:15 -07:00
Ryan Dahl 55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Ryan Dahl 36e75b7351 Fix HTTP agent disconnection problem
https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o

Closes GH-787.
2011-03-14 14:47:41 -07:00
Felix Geisendörfer 9d4c5a12f4 Crypto update should only accept strings / buffers
I have seen a lot of people trying to pass objects to crypto's update
functions, assuming that it would somehow serialize the object before
hashing.

In reality, the object was converted to '[object Object]' which was
then hashed, without any error message showing.

This patch modifies the DecodeBytes function (used exclusively by
crypto at this point) to complain when receiving anything but a
string or buffer.

Overall this should be a less-suprising, more robust behavior.
2011-03-14 13:16:31 -07:00
Ryan Dahl 2e40328c82 Extend OpenSSL expiration dates 2011-03-14 11:30:21 -07:00
koichik 113b1e6e0c Fix GH-746 process.stdin.destroy() breaks http server 2011-03-11 16:33:07 -08:00
Ryan Dahl 81d3de7e6d setMaxListeners should initialize _events 2011-03-07 13:16:00 -08:00
Andreas Reich 5e91042fcb Don't decrease server connection counter again if destroy() is called more than once
Test: Anders Conbere <aconbere@gmail.com>
Fix: Andreas Reich <andreas@reich.name>

Closes GH-431.
Closes GH-502.
2011-03-04 15:45:12 -08:00
Ryan Dahl ca8be39b9e Disable test-http-agent2.js for the moment
Still broken.
2011-03-02 21:21:29 -08:00
koichik 4e7c37b87c Fix fs.WriteStream.end(data, [encoding]) throws TypeError 2011-03-01 10:49:20 -08:00
Felix Geisendörfer 0304f1fc22 Expose errno with a string for dns/cares
This is to mirror the behavior introduced in
aa95e5708f.

Closes GH-727.
2011-02-28 09:54:16 -08:00
isaacs d664bf376d Closes GH-711 URL parse more safely
This does 3 things:

1. Delimiters and "unwise" characters are never included in the
   hostname or path.
2. url.format will sanitize string URLs that are passed to it.
3. The parsed url's 'href' member will be the sanitized url, which may
   not match the argument to url.parse.
2011-02-27 17:17:40 -08:00
koichik 0a51a6d3ac Fix process.stdout.end() throws ENOTSOCK error. 2011-02-27 13:06:08 -08:00
Russell Haering 7276ff9822 http: fix missing 'drain' events 2011-02-24 17:39:59 -08:00
Ryan Dahl ea9f5b110a Add 'close' and 'aborted' events to Agent responses
Closes GH-722.
2011-02-24 17:16:13 -08:00
Nathan Rajlich a9a252fda9 Read up the prototype of the 'env' object.
Closes GH-713.
2011-02-24 16:36:23 -08:00
Felix Geisendörfer 66601f13d9 Do not cache modules that throw exceptions
If a module throws an exception on load, it should not be cached.
This patch shows the problem in a test case and also fixes it.

See: https://groups.google.com/forum/#!topic/nodejs-dev/1cIrvJcADbY

Closes GH-707
Closes GH-710
2011-02-24 16:14:04 -08:00
Ryan Dahl 1f50d711b2 Fix memleak in vm.runInNewContext
Closes GH-704.
2011-02-24 15:46:55 -08:00
Felix Geisendörfer f423ec90fc In addition to 'aborted' emit 'close' from incoming requests
Closes GH-160.
2011-02-24 12:41:51 -08:00
cloudhead a91b140963 fix process.on edge case with signal event
When adding a listener for a signal event, removing it, and
adding it back again, it triggers a condition with an
undefined variable.
2011-02-23 12:57:05 -08:00
Ryan Dahl c2a62951f6 TLS sockets should not be writable after 'end'
Closes GH-694.
2011-02-19 18:25:15 -08:00
Ryan Dahl c72ae27be1 test-tls-securepair-server: don't shutdown stdout 2011-02-19 16:56:56 -08:00
isaacs 8b9dbdad27 Closes GH-687 Don't read fs read stream if not open 2011-02-19 16:38:21 -08:00