platform/upstream/nodejs.git
14 years agobump version v0.1.96
Ryan Dahl [Fri, 21 May 2010 09:55:38 +0000 (02:55 -0700)]
bump version

14 years agoimprove test for stdio non-blockingness
Ryan Dahl [Fri, 21 May 2010 08:22:20 +0000 (01:22 -0700)]
improve test for stdio non-blockingness

14 years agoFix opposite logic, which coincidentially works
Ryan Dahl [Fri, 21 May 2010 05:11:26 +0000 (22:11 -0700)]
Fix opposite logic, which coincidentially works

14 years agoRemove unneeded fd variables in node_stdio.cc
Ryan Dahl [Fri, 21 May 2010 05:01:13 +0000 (22:01 -0700)]
Remove unneeded fd variables in node_stdio.cc

14 years agoDeprecate string interface for fs.read()
Felix Geisendörfer [Thu, 20 May 2010 22:13:22 +0000 (18:13 -0400)]
Deprecate string interface for fs.read()

This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.

14 years agoRevert "Deprecate string interface for fs.read()"
Ryan Dahl [Thu, 20 May 2010 23:11:33 +0000 (16:11 -0700)]
Revert "Deprecate string interface for fs.read()"

This reverts commit cbbf9e43d1770047e98fe65d5f710815f432a5b4.

14 years agoDeprecate string interface for fs.read()
Felix Geisendörfer [Thu, 20 May 2010 22:13:22 +0000 (18:13 -0400)]
Deprecate string interface for fs.read()

This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.

14 years agoThrowing in a callback should kill the process
Ryan Dahl [Thu, 20 May 2010 22:21:40 +0000 (15:21 -0700)]
Throwing in a callback should kill the process

There is a difference between errors which happen to a socket - like
receiving EPIPE - an exceptional situation but ultimately okay and the
situation where code throws in a callback - which is not okay.

Fixes test/simple/test-http-exceptions.js

TODO: explain this in docs.

14 years agoFIX path.dirname('/tmp') => '/'.
rentzsch [Sun, 16 May 2010 19:29:29 +0000 (14:29 -0500)]
FIX path.dirname('/tmp') => '/'.

Previously path.dirname('/tmp') incorrectly returned '.'.

Unfortunately module.js incorrectly thinks dirname('/a/b/') should
yield '/a/b', so I can't strip trailing slashes yet. Once module.js
is fixed, then the commented-out code should be activated and a test
written for it.

14 years agoDeprecate sys.p()
Ryan Dahl [Thu, 20 May 2010 17:12:05 +0000 (10:12 -0700)]
Deprecate sys.p()

14 years agoMake buffer's c++ constructor public
Ryan Dahl [Thu, 20 May 2010 16:42:47 +0000 (09:42 -0700)]
Make buffer's c++ constructor public

14 years agoFix a leaking global
isaacs [Wed, 19 May 2010 06:04:24 +0000 (23:04 -0700)]
Fix a leaking global

14 years agoRemove the ReportException from the Script class
isaacs [Sun, 9 May 2010 23:20:15 +0000 (16:20 -0700)]
Remove the ReportException from the Script class

This is so that syntax errors can be handled discretely in places like the
repl, where SyntaxErrors are expected and normal.

14 years agoMinor style changes for fs.write code
Ryan Dahl [Wed, 19 May 2010 21:59:03 +0000 (14:59 -0700)]
Minor style changes for fs.write code

14 years agoDeprecate string interface for fs.write()
Felix Geisendörfer [Wed, 19 May 2010 18:17:50 +0000 (14:17 -0400)]
Deprecate string interface for fs.write()

This patch makes buffers the preferred input for fs.write() and
fs.writeSync(). The old string interface is still supported by
converting strings to buffers dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.

14 years agoFix api for request.connection
Ryan Dahl [Wed, 19 May 2010 18:01:21 +0000 (11:01 -0700)]
Fix api for request.connection

14 years agoAllow process.setuid() and process.setgid() to accept string names in lieu of numeric IDs
Peter Griess [Wed, 19 May 2010 00:40:44 +0000 (17:40 -0700)]
Allow process.setuid() and process.setgid() to accept string names in lieu of numeric IDs

14 years agoFix utf8stream references
Ryan Dahl [Tue, 18 May 2010 16:32:28 +0000 (09:32 -0700)]
Fix utf8stream references

14 years agoUse Utf8Stream for http Streams with utf8 encoding
Felix Geisendörfer [Tue, 18 May 2010 02:42:24 +0000 (22:42 -0400)]
Use Utf8Stream for http Streams with utf8 encoding

14 years agoUse Utf8Stream for net Streams with utf8 encoding
Felix Geisendörfer [Tue, 18 May 2010 02:42:24 +0000 (22:42 -0400)]
Use Utf8Stream for net Streams with utf8 encoding

14 years agoImplemented Utf8Decoder module
Felix Geisendörfer [Tue, 18 May 2010 02:25:51 +0000 (22:25 -0400)]
Implemented Utf8Decoder module

Allows to safely decode a utf8 stream into strings without breaking
on multibyte characters.

14 years agofs.WriteStream.write should support buffer
Ryan Dahl [Mon, 17 May 2010 22:22:09 +0000 (15:22 -0700)]
fs.WriteStream.write should support buffer

Also re-adding the callback parameter.

14 years agoFix errno display in c-ares exceptions
Ryan Dahl [Mon, 17 May 2010 20:58:15 +0000 (13:58 -0700)]
Fix errno display in c-ares exceptions

14 years agoSupport arrays and strings in buffer constructor
Felix Geisendörfer [Mon, 17 May 2010 13:33:56 +0000 (09:33 -0400)]
Support arrays and strings in buffer constructor

This is be very useful for testing code that deals with buffers.

14 years agoAdded better error messages for async and sync fs calls with paths
visionmedia [Fri, 14 May 2010 14:52:49 +0000 (07:52 -0700)]
Added better error messages for async and sync fs calls with paths

14 years agoFIX: EventEmitter#removeAllListeners signature
Jonas Pfenniger [Fri, 14 May 2010 11:13:27 +0000 (13:13 +0200)]
FIX: EventEmitter#removeAllListeners signature

This function should return this is all cases.

14 years agoFIX: EventEmitter#removeListener logic
Jonas Pfenniger [Fri, 14 May 2010 11:12:41 +0000 (13:12 +0200)]
FIX: EventEmitter#removeListener logic

In the case of one defined listener, the function should only remove it
if it is the same as the passed listener.

14 years agoFIX: signal-unregister bug
Jonas Pfenniger [Fri, 14 May 2010 07:59:31 +0000 (09:59 +0200)]
FIX: signal-unregister bug

We now restore the default signal behavior when all listeners are
removed for a given signal.

Re-enabled test-signal-unregister

14 years agoThinner SignalWatcher, only using callback
Jonas Pfenniger [Fri, 14 May 2010 07:57:02 +0000 (09:57 +0200)]
Thinner SignalWatcher, only using callback

Since it is only used internally, we don't need the complexity of
EventEmitter. The new SignalWatcher's design was copied from
IdleWatcher.

14 years agoAdded posix fsync and fdatasync to fs module
Andrew Johnston [Mon, 22 Mar 2010 07:25:24 +0000 (07:25 +0000)]
Added posix fsync and fdatasync to fs module

14 years agoChanges to work on Solaris 10
Ryan Dahl [Fri, 14 May 2010 23:36:17 +0000 (23:36 +0000)]
Changes to work on Solaris 10

14 years agoAdd --without-ssl configure option
Ryan Dahl [Fri, 14 May 2010 23:34:47 +0000 (16:34 -0700)]
Add --without-ssl configure option

14 years agoRemove some unused cruft from wscript
Ryan Dahl [Fri, 14 May 2010 23:30:41 +0000 (16:30 -0700)]
Remove some unused cruft from wscript

14 years agoSimplify stack trace reporting using new V8 API
Ryan Dahl [Fri, 14 May 2010 18:48:14 +0000 (11:48 -0700)]
Simplify stack trace reporting using new V8 API

14 years agoFix AUTHORS file
Ryan Dahl [Fri, 14 May 2010 18:15:31 +0000 (11:15 -0700)]
Fix AUTHORS file

14 years agoAdd test for exceptions in HTTP parser event handlers.
Matt Ranney [Fri, 14 May 2010 07:06:32 +0000 (00:06 -0700)]
Add test for exceptions in HTTP parser event handlers.

14 years agoRemove unused CSS reference.
Matt Ranney [Fri, 14 May 2010 07:07:01 +0000 (00:07 -0700)]
Remove unused CSS reference.

14 years agoAdd process.version description.
Matt Ranney [Fri, 7 May 2010 20:37:30 +0000 (13:37 -0700)]
Add process.version description.

14 years agoSystem EV compatibility fix : use EV_DEFAULT_UC
Jérémy Lal [Thu, 13 May 2010 23:50:26 +0000 (01:50 +0200)]
System EV compatibility fix : use EV_DEFAULT_UC

14 years agobump version v0.1.95
Ryan Dahl [Thu, 13 May 2010 21:58:31 +0000 (14:58 -0700)]
bump version

14 years agoAllow parallel jobs to be passed to V8 build
Ryan Dahl [Thu, 13 May 2010 23:24:05 +0000 (16:24 -0700)]
Allow parallel jobs to be passed to V8 build

e.g. JOBS=2 make

14 years agoChange the 'make dist' to remove v8 test dir
Ryan Dahl [Thu, 13 May 2010 22:54:50 +0000 (15:54 -0700)]
Change the 'make dist' to remove v8 test dir

14 years agoHandle empty files with fs.readFile
Elijah Insua [Thu, 13 May 2010 19:42:17 +0000 (12:42 -0700)]
Handle empty files with fs.readFile

14 years agoSupport for fstat(2) through fs.fstat() and fs.fstatSync(). Added test cases, updated...
Ben Noordhuis [Wed, 12 May 2010 20:35:33 +0000 (22:35 +0200)]
Support for fstat(2) through fs.fstat() and fs.fstatSync(). Added test cases, updated documentation.

14 years agoDisable test-signal-unregister.js as functionality doesn't exist yet
Ryan Dahl [Wed, 12 May 2010 19:45:53 +0000 (12:45 -0700)]
Disable test-signal-unregister.js as functionality doesn't exist yet

14 years agoRemove reference to C++ EventEmitter in docs
Ryan Dahl [Wed, 12 May 2010 19:17:45 +0000 (12:17 -0700)]
Remove reference to C++ EventEmitter in docs

I prefer ppl to use ObjectWrap

14 years agoDeprecate sendHeader() and writeHeader(), ppl should use writeHead()
Ryan Dahl [Wed, 12 May 2010 19:15:58 +0000 (12:15 -0700)]
Deprecate sendHeader() and writeHeader(), ppl should use writeHead()

14 years agoDefault to 2 second timeout for http servers
Ryan Dahl [Wed, 12 May 2010 18:42:01 +0000 (11:42 -0700)]
Default to 2 second timeout for http servers

Taking a performance hit on 'hello world' benchmark by enabling this by
default, but I think it's worth it. Hopefully we can improve performance by
resetting the timeout less often - ideally a 'hello world' benchmark would
only touch the one timer once - if it runs in less than 2 seconds. The rest
should be just link list manipulations.

14 years agoAdd note about 'error' event to docs
Ryan Dahl [Wed, 12 May 2010 17:42:14 +0000 (10:42 -0700)]
Add note about 'error' event to docs

14 years agoIdle timeout changes
Ryan Dahl [Wed, 12 May 2010 17:01:27 +0000 (10:01 -0700)]
Idle timeout changes

- setTimeout should active the timeout too. (test-net-set-timeout tests
  this.)

- 'timeout' event is not automatically followed by an 'error' event. That
  is the user is now responsible for destroying the stream if there is an
  idle timeout.

14 years agoQuote variables in configure script
Ryan Dahl [Tue, 11 May 2010 17:25:27 +0000 (10:25 -0700)]
Quote variables in configure script

14 years agoJust add an extra include for strings.h - don't try to be cute
Ryan Dahl [Mon, 10 May 2010 23:38:47 +0000 (16:38 -0700)]
Just add an extra include for strings.h - don't try to be cute

14 years agoRevert "Check for strings.h"
Ryan Dahl [Mon, 10 May 2010 23:38:14 +0000 (16:38 -0700)]
Revert "Check for strings.h"

This reverts commit 032f651824869c429cc24fbd9f7a23e84ed34b1f.

14 years agoCheck for strings.h
Ryan Dahl [Mon, 10 May 2010 23:05:42 +0000 (16:05 -0700)]
Check for strings.h

14 years agoPatch v8 build for solaris
Ryan Dahl [Mon, 10 May 2010 23:25:43 +0000 (16:25 -0700)]
Patch v8 build for solaris

Submitted this patch to V8
http://codereview.chromium.org/1990010/show

14 years agoUpgrade V8 to 2.2.9
Ryan Dahl [Mon, 10 May 2010 16:58:20 +0000 (09:58 -0700)]
Upgrade V8 to 2.2.9

14 years agoRevert "destroy instead of end http connection at end of pipeline"
Ryan Dahl [Mon, 10 May 2010 04:29:51 +0000 (21:29 -0700)]
Revert "destroy instead of end http connection at end of pipeline"

This reverts commit 4ce1e1fca59bc6ad6e2d19643db2ed3159ccb7dc.

To fix test-http-full-response.js. Clearly this is not the correct solution.
Probably need idle timeouts.

14 years agoDisable test-remote-module-loading
Ryan Dahl [Mon, 10 May 2010 01:46:04 +0000 (18:46 -0700)]
Disable test-remote-module-loading

In ab068db9b12a9fb8619f6a94299a8d7a35d4695b this test was broken because (I
think) compile/run errors are set to crash the program instead of being
passed back.

Error reporting is more important than remote loading. Disabling until there
is a fix

14 years agoChange string.h to strings.h compile on solaris
Ryan Dahl [Sun, 9 May 2010 23:23:29 +0000 (16:23 -0700)]
Change string.h to strings.h compile on solaris

14 years agoAdd failing test - http responses not all complete
Ryan Dahl [Sun, 9 May 2010 22:07:54 +0000 (15:07 -0700)]
Add failing test - http responses not all complete

Report and test by soderblom.peter@gmail.com

14 years agoImprove error reporting
Ryan Dahl [Sun, 9 May 2010 20:54:58 +0000 (13:54 -0700)]
Improve error reporting

- No more single line "node.js:176:9" errors
- No more strange output when error happens on first line due to
  module wrapper function.
- A few tests to check these things

14 years agoBetter logic for testing if an argument is a port
Ryan Dahl [Sun, 9 May 2010 19:10:38 +0000 (12:10 -0700)]
Better logic for testing if an argument is a port

If you did server.listen('123') it would open a socket in the current
directory called 123. Now it will interpret it as a port.

14 years agoDon't emit 'exit' twice from child process
Ryan Dahl [Sun, 9 May 2010 06:28:26 +0000 (23:28 -0700)]
Don't emit 'exit' twice from child process

14 years agoForgot to add child_process_should_emit_error.js
Ryan Dahl [Sun, 9 May 2010 06:24:24 +0000 (23:24 -0700)]
Forgot to add child_process_should_emit_error.js

14 years agoFix error reporting in child_process callbacks
Ryan Dahl [Sun, 9 May 2010 05:11:55 +0000 (22:11 -0700)]
Fix error reporting in child_process callbacks

Issue 120, test case by Nathan Ostgard

14 years agofs.Stats.size V8::Integer => V8::Number.
rentzsch [Sat, 8 May 2010 06:09:29 +0000 (01:09 -0500)]
fs.Stats.size V8::Integer => V8::Number.

While VM::Integer::Value() offers an int64_t, V8::Integer::New() only
accepts an int32_t, truncating fs.Stat's size in BuildStatsObject().

I consider this a bug in V8, and we should move back to V8::Integer
when it gets a ctr that allows a int64_t. Until then, this work-around
should hold.

14 years agoChange GC idle notify so that it runs along side setInterval
Ryan Dahl [Sat, 8 May 2010 02:05:59 +0000 (19:05 -0700)]
Change GC idle notify so that it runs along side setInterval

Doesn't appear any slower. Also checks for high memory usage and tries to
force more notifications.

14 years agoAdd binding.close to fs.readFile
isaacs [Fri, 7 May 2010 19:50:36 +0000 (12:50 -0700)]
Add binding.close to fs.readFile

14 years agofs.readFile uses a buffer internally and will return the raw buffer if no encoding...
Tim Caswell [Fri, 7 May 2010 05:03:43 +0000 (00:03 -0500)]
fs.readFile uses a buffer internally and will return the raw buffer if no encoding is specified.

14 years agofix authors file
Ryan Dahl [Thu, 6 May 2010 21:15:16 +0000 (14:15 -0700)]
fix authors file

14 years agoInstall node_buffer.h on make install
Ryan Dahl [Thu, 6 May 2010 21:14:52 +0000 (14:14 -0700)]
Install node_buffer.h on make install

14 years agobump version v0.1.94
Ryan Dahl [Thu, 6 May 2010 17:39:27 +0000 (10:39 -0700)]
bump version

14 years agoUpgrade V8 to 2.2.8
Ryan Dahl [Thu, 6 May 2010 16:59:35 +0000 (09:59 -0700)]
Upgrade V8 to 2.2.8

14 years agodestroy instead of end http connection at end of pipeline
Ryan Dahl [Wed, 5 May 2010 08:32:18 +0000 (01:32 -0700)]
destroy instead of end http connection at end of pipeline

14 years agoFix a bug in http.Client where parsers may be prematurely released back to the free...
Thomas Lee [Wed, 5 May 2010 08:55:04 +0000 (18:55 +1000)]
Fix a bug in http.Client where parsers may be prematurely released back to the free pool.

14 years agoChanged undefined pos to null to prevent hanging on SheevaPlug
Jonathan Knezek [Thu, 6 May 2010 05:23:45 +0000 (00:23 -0500)]
Changed undefined pos to null to prevent hanging on SheevaPlug

14 years agoAdded c-ares headers for linux-arm
Jonathan Knezek [Thu, 6 May 2010 05:22:05 +0000 (00:22 -0500)]
Added c-ares headers for linux-arm

14 years agoAdd buffer response to http_simple.js
Ryan Dahl [Wed, 5 May 2010 05:35:55 +0000 (22:35 -0700)]
Add buffer response to http_simple.js

14 years agoUse test port instead of 8000 in test-http-304
Ryan Dahl [Wed, 5 May 2010 05:06:46 +0000 (22:06 -0700)]
Use test port instead of 8000 in test-http-304

14 years agoLook in /usr/local/lib/node for modules, so that there's a way to install modules...
isaacs [Wed, 5 May 2010 04:58:43 +0000 (21:58 -0700)]
Look in /usr/local/lib/node for modules, so that there's a way to install modules globally

14 years agoAdd proper HTML header for changelog so UTF-8 works.
Matt Ranney [Wed, 5 May 2010 04:17:29 +0000 (21:17 -0700)]
Add proper HTML header for changelog so UTF-8 works.

14 years agoFix whitespace
Ryan Dahl [Wed, 5 May 2010 04:35:46 +0000 (21:35 -0700)]
Fix whitespace

14 years agoEmit a better error message when something strange is sent to OutgoingMessage#write
isaacs [Wed, 5 May 2010 01:28:49 +0000 (18:28 -0700)]
Emit a better error message when something strange is sent to OutgoingMessage#write

14 years agoLazy load crypto
Ryan Dahl [Tue, 4 May 2010 21:21:01 +0000 (14:21 -0700)]
Lazy load crypto

The whole program is being slowed down by the large CA string in crypto.
Why?

14 years agoAdded default CAs, updated openssl verify behaviour, added crypto and https documentation
Rhys Jones [Tue, 4 May 2010 20:49:00 +0000 (21:49 +0100)]
Added default CAs, updated openssl verify behaviour, added crypto and https documentation

14 years agoIgnore SIGPIPE
Ryan Dahl [Tue, 4 May 2010 17:41:56 +0000 (10:41 -0700)]
Ignore SIGPIPE

Was inadvertently removed with evcom,
http://github.com/ry/node/commit/c72967d3351c4a28c3f2434748598017aa0126d5#L10L1900

14 years agoFix SEGV by setting msg_controllen earlier.
Peter Griess [Tue, 4 May 2010 16:26:23 +0000 (11:26 -0500)]
Fix SEGV by setting msg_controllen earlier.

- Some implementations of CMSG_FIRSTHDR() rely on msg_controllen being
  set correctly, else it returns NULL: see <linux/socket.h>.

14 years agoAdditional OpenSSL tests
Rhys Jones [Mon, 3 May 2010 22:37:49 +0000 (23:37 +0100)]
Additional OpenSSL tests

14 years agoRead all records to always empty the OpenSSL reading buffer.
Paulo Matias [Sun, 2 May 2010 18:21:43 +0000 (15:21 -0300)]
Read all records to always empty the OpenSSL reading buffer.

14 years agoMake it possible to use client certificates to connect with a nodejs server, and...
Paulo Matias [Sun, 2 May 2010 03:40:21 +0000 (00:40 -0300)]
Make it possible to use client certificates to connect with a nodejs server, and make verifyPeer behaviour consistant.

14 years agoImplement writeSync for buffers
Ryan Dahl [Mon, 3 May 2010 20:25:48 +0000 (13:25 -0700)]
Implement writeSync for buffers

(Needs tests still)

14 years agoImplement fs.readSync for buffers
Ryan Dahl [Mon, 3 May 2010 20:18:33 +0000 (13:18 -0700)]
Implement fs.readSync for buffers

14 years agoImplement fs.read() for Buffers (again)
Ryan Dahl [Mon, 3 May 2010 19:55:33 +0000 (15:55 -0400)]
Implement fs.read() for Buffers (again)

14 years agoFix memory leak with fs.writeSync
Ryan Dahl [Mon, 3 May 2010 18:41:30 +0000 (11:41 -0700)]
Fix memory leak with fs.writeSync

14 years agoAdd another http upgrade test
Ryan Dahl [Mon, 3 May 2010 18:23:36 +0000 (11:23 -0700)]
Add another http upgrade test

14 years agoDon't emit error twice from http.Client
Ryan Dahl [Mon, 3 May 2010 17:53:52 +0000 (10:53 -0700)]
Don't emit error twice from http.Client

14 years agodocumentation typos and tweaks
Michaeljohn Clement [Mon, 3 May 2010 06:49:24 +0000 (02:49 -0400)]
documentation typos and tweaks

14 years agoAdd symbols to release build
Ryan Dahl [Mon, 3 May 2010 01:20:02 +0000 (18:20 -0700)]
Add symbols to release build

14 years agoRevert changes to node_file.cc
Ryan Dahl [Mon, 3 May 2010 00:38:02 +0000 (17:38 -0700)]
Revert changes to node_file.cc

Revert "Fix memory leak in fs.writeSync()"

This reverts commit 5457eae28c24739d2d0d779ab0f7deb4999a3636.

Revert "Implement fs.read() for buffers"

This reverts commit 692f580a07c2787ed5db730b5eae8e9e1da43f12.

14 years agoAllow different ports for http_simple.js
Ryan Dahl [Mon, 3 May 2010 00:26:18 +0000 (17:26 -0700)]
Allow different ports for http_simple.js