Commit Graph

939 Commits (da9b3340ebb7501ebb8a2896d2c259ffabdab340)

Author SHA1 Message Date
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
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
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 7a8c729830 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-22 13:12:07 -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 602a4637bf Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-18 11:11:43 -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
Daniel Ennis 911cbd0cef Add support for file descriptor type detection.
setImplementationMethods checks the type of a socket and defines different
behavior based on the type, so auto detect it if type not implicitly
specified.
2011-03-17 10:35:47 -07:00
Ryan Dahl 19e53512b8 os.getNetworkInterfaces() 2011-03-16 16:34:12 -07:00
isaacs 3c9fb3ec1a Fix invalid end handling for SlowBuffer#hexSlice 2011-03-15 11:39:11 -07:00
Ryan Dahl 3c0dd8196a Fix test-process-uptime.js test 2011-03-14 17:50:24 -07:00
Ryan Dahl 247d880113 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-14 17:45: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
Tony Huang 502900c0bc add path.relative 2011-03-08 11:03:21 -08:00
Ryan Dahl 81d3de7e6d setMaxListeners should initialize _events 2011-03-07 13:16:00 -08:00
Tom Hughes cf78ce59b3 Add process.uptime(). 2011-03-07 10:45:25 -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
Ben Noordhuis 1d5ff15a46 fs.utimes() and fs.futimes() support. 2011-03-02 20:35:45 -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