platform/upstream/nodejs.git
13 years agotcp_wrap: Remove listener deck
Ryan Dahl [Tue, 14 Jun 2011 10:46:10 +0000 (12:46 +0200)]
tcp_wrap: Remove listener deck

13 years agoAMD compatibility for node, with docs and tests
isaacs [Sun, 12 Jun 2011 17:36:05 +0000 (10:36 -0700)]
AMD compatibility for node, with docs and tests

Closes #1173
Closes #1170

13 years agoCompensate for uv_async_init api change
Bert Belder [Sun, 12 Jun 2011 18:53:04 +0000 (20:53 +0200)]
Compensate for uv_async_init api change

13 years agoBind uv_listen()
Ryan Dahl [Fri, 10 Jun 2011 16:25:06 +0000 (18:25 +0200)]
Bind uv_listen()

13 years agoInitial binding to uv_tcp_t
Ryan Dahl [Thu, 9 Jun 2011 13:31:51 +0000 (15:31 +0200)]
Initial binding to uv_tcp_t

13 years agoUpgrade libuv
Ryan Dahl [Thu, 9 Jun 2011 13:14:58 +0000 (15:14 +0200)]
Upgrade libuv

13 years agoAvoid tick spinner spinning forever
Bert Belder [Wed, 8 Jun 2011 01:46:29 +0000 (03:46 +0200)]
Avoid tick spinner spinning forever

13 years agoBuild on windows again
Bert Belder [Wed, 8 Jun 2011 02:41:28 +0000 (04:41 +0200)]
Build on windows again

13 years agoGet rid of node_idle_watcher
Bert Belder [Wed, 8 Jun 2011 02:01:07 +0000 (04:01 +0200)]
Get rid of node_idle_watcher

13 years agoGet rid of the old timer binding
Bert Belder [Wed, 8 Jun 2011 02:36:31 +0000 (04:36 +0200)]
Get rid of the old timer binding

13 years agoUse timer_wrap instead of the old timer binding
Bert Belder [Wed, 8 Jun 2011 02:35:50 +0000 (04:35 +0200)]
Use timer_wrap instead of the old timer binding

13 years agoCompatibility issue and warning in x-forwarded-for dtrace probe
Bert Belder [Wed, 8 Jun 2011 01:57:15 +0000 (03:57 +0200)]
Compatibility issue and warning in x-forwarded-for dtrace probe

13 years agoUpgrade libuv to e58a1abff02d7bacf89a56de9050e27690a97bc5
Ryan Dahl [Tue, 7 Jun 2011 16:37:27 +0000 (18:37 +0200)]
Upgrade libuv to e58a1abff02d7bacf89a56de9050e27690a97bc5

13 years agotypo
isaacs [Sat, 4 Jun 2011 17:41:41 +0000 (10:41 -0700)]
typo

13 years agoAvoid instanceof for native object types
isaacs [Sat, 4 Jun 2011 17:38:49 +0000 (10:38 -0700)]
Avoid instanceof for native object types

For classes defined in the module, this is fine.  For 'Error'
it's probably not very hazardous.  However, testing 'Object'
and 'String' is much more reliable using typeof, to work with
the repl and NODE_MODULE_CONTEXT modes.

13 years agoDTrace probes: support X-Forwarded-For
Dave Pacheco [Sat, 4 Jun 2011 14:04:38 +0000 (16:04 +0200)]
DTrace probes: support X-Forwarded-For

INTRO-385

13 years agoMerge branch 'v0.4'
Ryan Dahl [Fri, 3 Jun 2011 14:37:56 +0000 (16:37 +0200)]
Merge branch 'v0.4'

13 years agodebugger: don't allow users to input non-valid commands
Siddharth Mahendraker [Thu, 2 Jun 2011 20:08:18 +0000 (23:08 +0300)]
debugger: don't allow users to input non-valid commands

Fixes #1144.

13 years agoDisabling SSL compression is dependent on OpenSSL version 0.9.8
Ryan Dahl [Fri, 3 Jun 2011 12:38:55 +0000 (14:38 +0200)]
Disabling SSL compression is dependent on OpenSSL version 0.9.8

Fixes #1087.

13 years agoUpgrade http-parser to eee60127c0df551be085cc8e7983e36d7700d885
Ryan Dahl [Fri, 3 Jun 2011 12:12:14 +0000 (14:12 +0200)]
Upgrade http-parser to eee60127c0df551be085cc8e7983e36d7700d885

13 years agoDoc improvements
Ryan Dahl [Fri, 3 Jun 2011 11:19:06 +0000 (13:19 +0200)]
Doc improvements

Fixes #1147.
Fixes #1139.
Fixes #1126.
Thanks ctide, kext, disfated.

13 years agoOption to disable SSL v2
Jérémy Lal [Fri, 3 Jun 2011 06:35:11 +0000 (08:35 +0200)]
Option to disable SSL v2

Fixes #880

13 years agodocument require.cache
Ryan Dahl [Fri, 3 Jun 2011 06:14:35 +0000 (08:14 +0200)]
document require.cache

13 years ago`node -e ''` should mean eval(''), not invoke REPL
Fuji, Goro [Sat, 28 May 2011 17:04:36 +0000 (02:04 +0900)]
`node -e ''` should mean eval(''), not invoke REPL

Fixes #1116

13 years agoMove MakeCallback and SetErrno to node.cc
Ryan Dahl [Sat, 28 May 2011 20:44:03 +0000 (13:44 -0700)]
Move MakeCallback and SetErrno to node.cc

13 years agoTimerWrap: mimic libev ref count semantics
Ryan Dahl [Sat, 28 May 2011 20:21:03 +0000 (13:21 -0700)]
TimerWrap: mimic libev ref count semantics

13 years agoClose #562 Close #1078 Parse file:// urls properly
Ryan Petrello [Fri, 20 May 2011 04:50:35 +0000 (00:50 -0400)]
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'.

13 years agoImplement new wrap for uv timer
Ryan Dahl [Wed, 25 May 2011 17:16:36 +0000 (10:16 -0700)]
Implement new wrap for uv timer

13 years agoFix resource leaks in node_crypto.cc
Ben Noordhuis [Mon, 23 May 2011 11:10:00 +0000 (13:10 +0200)]
Fix resource leaks in node_crypto.cc

Fixes #1097.

13 years agoCrypto documentation fixes
Brian White [Wed, 25 May 2011 04:26:57 +0000 (21:26 -0700)]
Crypto documentation fixes

Fixes #1104.

13 years agoFixes #1102. Install ev.h into $PREFIX/include/node/ev/ev.h
Ryan Dahl [Tue, 24 May 2011 20:43:03 +0000 (13:43 -0700)]
Fixes #1102. Install ev.h into $PREFIX/include/node/ev/ev.h

13 years agoRemove 'connect' event from server side sockets
Felix Geisendörfer [Sat, 14 May 2011 10:24:48 +0000 (12:24 +0200)]
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.

13 years agoFix error handling bug in stream.pipe()
Felix Geisendörfer [Mon, 23 May 2011 09:02:53 +0000 (11:02 +0200)]
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.

13 years agoFix incorrect documentation for assert.fail()
Brian White [Tue, 24 May 2011 05:40:09 +0000 (22:40 -0700)]
Fix incorrect documentation for assert.fail()

Fixes #1100.

13 years agoFix windows EOL chars
Ryan Dahl [Tue, 24 May 2011 00:38:55 +0000 (17:38 -0700)]
Fix windows EOL chars

13 years agoBatch of ev -> uv changes
Bert Belder [Mon, 23 May 2011 23:42:22 +0000 (01:42 +0200)]
Batch of ev -> uv changes

13 years agoGuard tick_spinner start/stop
Ryan Dahl [Mon, 23 May 2011 22:38:54 +0000 (15:38 -0700)]
Guard tick_spinner start/stop

All tests passing on OSX. Thanks to Bert for debugging this.

13 years agoUpgrade libuv to d91b5012bd32b60f1a0f35241f7ac45c147f0c8a
Ryan Dahl [Mon, 23 May 2011 22:25:21 +0000 (15:25 -0700)]
Upgrade libuv to d91b5012bd32b60f1a0f35241f7ac45c147f0c8a

13 years agoUpgrade libuv to 40f0ad6d364cff76adaf1c7f182b1dc939f36617
Ryan Dahl [Sun, 22 May 2011 20:05:48 +0000 (13:05 -0700)]
Upgrade libuv to 40f0ad6d364cff76adaf1c7f182b1dc939f36617

13 years agoMerge branch 'v0.4'
Ryan Dahl [Sun, 22 May 2011 20:02:06 +0000 (13:02 -0700)]
Merge branch 'v0.4'

Conflicts:
src/node_version.h

13 years agoNow working on v0.4.9
Ryan Dahl [Sat, 21 May 2011 07:10:23 +0000 (00:10 -0700)]
Now working on v0.4.9

13 years agoBump to v0.4.8 v0.4.8
Ryan Dahl [Sat, 21 May 2011 02:40:06 +0000 (19:40 -0700)]
Bump to v0.4.8

13 years agoMerge branch 'v8-3.1' into v0.4
Ryan Dahl [Sat, 21 May 2011 02:25:30 +0000 (19:25 -0700)]
Merge branch 'v8-3.1' into v0.4

13 years agoUpgrade V8 to 3.1.8.16
Ryan Dahl [Sat, 21 May 2011 02:24:37 +0000 (19:24 -0700)]
Upgrade V8 to 3.1.8.16

13 years agoFix TJ's assert error
Ryan Dahl [Fri, 20 May 2011 22:39:48 +0000 (15:39 -0700)]
Fix TJ's assert error

Unable to reproduce but connect's "make test TESTS=test/static.test.js" does
it occasionally.

13 years agoAdditional docs for net.listenFD()
Mark Cavage [Fri, 20 May 2011 21:38:49 +0000 (14:38 -0700)]
Additional docs for net.listenFD()

Fixes #1080.

13 years agoMerge branch 'v0.4'
Ryan Dahl [Fri, 20 May 2011 17:27:39 +0000 (10:27 -0700)]
Merge branch 'v0.4'

Conflicts:
lib/crypto.js
lib/tls.js

13 years agoCryptoStream.prototype.readyState shoudn't reference fd
Ryan Dahl [Fri, 20 May 2011 17:08:08 +0000 (10:08 -0700)]
CryptoStream.prototype.readyState shoudn't reference fd

Fixes #1069

13 years agoRemove unused variable
Brian White [Thu, 19 May 2011 22:09:10 +0000 (15:09 -0700)]
Remove unused variable

Fixes #1077

13 years agoUse same make as when originally invoked
Robert Mustacchi [Fri, 20 May 2011 02:51:30 +0000 (19:51 -0700)]
Use same make as when originally invoked

13 years agoRework getNetworkInterfaces() for Linux, SunOS, Mac OS X
Robert Mustacchi [Fri, 20 May 2011 01:32:05 +0000 (18:32 -0700)]
Rework getNetworkInterfaces() for Linux, SunOS, Mac OS X

13 years agoAdd test for agent upgrade and example in docs
David Trejo [Thu, 19 May 2011 23:50:12 +0000 (16:50 -0700)]
Add test for agent upgrade and example in docs

13 years agoRevert "Upgrade libuv to 9c2dd6bea970b2376696aba070bdfc2873843cfb"
Ryan Dahl [Fri, 20 May 2011 00:50:13 +0000 (17:50 -0700)]
Revert "Upgrade libuv to 9c2dd6bea970b2376696aba070bdfc2873843cfb"

This reverts commit 4b60e87afec10e7e051e37cd5d00d0fbe3568a7d.

Event loop ref count broken.

13 years ago(char *) casting for all strings args to kstat function to avoid warnings
Alexandre Marangone [Thu, 19 May 2011 19:20:08 +0000 (21:20 +0200)]
(char *) casting for all strings args to kstat function to avoid warnings

Fixes #1071.

13 years agoAdding os.totalmem() and os.freemem() for SunOS
Alexandre Marangone [Thu, 19 May 2011 19:15:12 +0000 (21:15 +0200)]
Adding os.totalmem() and os.freemem() for SunOS

13 years agoShare SSL context between server connections
Fedor Indutny [Thu, 19 May 2011 19:42:13 +0000 (02:42 +0700)]
Share SSL context between server connections

Fixes #1073.

13 years agoFix buffer test
Ryan Dahl [Thu, 19 May 2011 19:41:17 +0000 (12:41 -0700)]
Fix buffer test

13 years agomakeFastBuffer should not segfault but rather throw on non-buffer
Ryan Dahl [Thu, 19 May 2011 19:13:48 +0000 (12:13 -0700)]
makeFastBuffer should not segfault but rather throw on non-buffer

13 years agoUpgrade libuv to 9c2dd6bea970b2376696aba070bdfc2873843cfb
Ryan Dahl [Thu, 19 May 2011 17:37:51 +0000 (10:37 -0700)]
Upgrade libuv to 9c2dd6bea970b2376696aba070bdfc2873843cfb

13 years agoMerge branch 'v0.4'
Ryan Dahl [Thu, 19 May 2011 17:34:42 +0000 (10:34 -0700)]
Merge branch 'v0.4'

13 years agoreadline docs
David Trejo [Thu, 19 May 2011 01:39:06 +0000 (18:39 -0700)]
readline docs

13 years agoreadline docs
David Trejo [Thu, 19 May 2011 01:39:06 +0000 (18:39 -0700)]
readline docs

13 years agoRemove libev/macos kqueue override - goes in libuv
Ryan Dahl [Tue, 17 May 2011 21:55:26 +0000 (14:55 -0700)]
Remove libev/macos kqueue override - goes in libuv

13 years agoChanges for job bullets
Ryan Dahl [Tue, 17 May 2011 20:22:34 +0000 (13:22 -0700)]
Changes for job bullets

13 years agofork: Use utf8 for channel encoding
Ryan Dahl [Tue, 17 May 2011 17:51:30 +0000 (10:51 -0700)]
fork: Use utf8 for channel encoding

13 years agoMerge branch 'v0.4'
Ryan Dahl [Tue, 17 May 2011 02:29:02 +0000 (19:29 -0700)]
Merge branch 'v0.4'

Conflicts:
src/node_crypto.cc

13 years agoRemove 'binary' encoding assert - add tests
Ryan Dahl [Mon, 16 May 2011 22:00:33 +0000 (15:00 -0700)]
Remove 'binary' encoding assert - add tests

Don't write large characters to buffers with binary encoding. You will be
silently injured.

13 years agoClose #1054 More clear documentation for module system
isaacs [Mon, 16 May 2011 11:56:40 +0000 (04:56 -0700)]
Close #1054 More clear documentation for module system

13 years agoDisable compression with OpenSSL.
Ryan Dahl [Fri, 1 Apr 2011 02:27:28 +0000 (19:27 -0700)]
Disable compression with OpenSSL.

This improves memory and speed. Users may apply compression in "userland"
above the CryptoStream layer if they desire.

13 years agoFix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"
koichik [Thu, 12 May 2011 04:43:24 +0000 (13:43 +0900)]
Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"

Fixes #1038

13 years agoAdd reading/writing of floats and doubles from/to buffers
Brian White [Mon, 16 May 2011 01:25:11 +0000 (21:25 -0400)]
Add reading/writing of floats and doubles from/to buffers

Code for readIEEE754/writeIEEE754 is from jspack: http://code.google.com/p/jspack/

13 years agoFix event listener leak check timing
koichik [Thu, 12 May 2011 06:18:21 +0000 (15:18 +0900)]
Fix event listener leak check timing

Fixes #1041.

13 years agoFix doc - missing dns.resolveNs() and dns.resolveCname()
koichik [Thu, 12 May 2011 04:49:26 +0000 (13:49 +0900)]
Fix doc - missing dns.resolveNs() and dns.resolveCname()

Fixes #1039.

13 years agoUpdate http.ServerRequest docs
Felix Geisendörfer [Sat, 14 May 2011 14:06:32 +0000 (16:06 +0200)]
Update http.ServerRequest docs

The documentation for 'end' was wrong, and 'close' now has an `err`
parameter.

13 years agoError argument for http.ServerRequest 'close'
Felix Geisendörfer [Sat, 14 May 2011 13:58:41 +0000 (15:58 +0200)]
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.

13 years agoMake https 'timeout' events bubble up
Felix Geisendörfer [Sat, 14 May 2011 19:17:13 +0000 (21:17 +0200)]
Make https 'timeout' events bubble up

Also adds a test case for it.

13 years agocheck_tick_watcher to use libuv
Ryan Dahl [Fri, 13 May 2011 14:09:28 +0000 (07:09 -0700)]
check_tick_watcher to use libuv

13 years agoprepare_tick_watcher to use libuv
Ryan Dahl [Fri, 13 May 2011 14:06:20 +0000 (07:06 -0700)]
prepare_tick_watcher to use libuv

13 years agomove tick_spinner on libuv
Ryan Dahl [Fri, 13 May 2011 13:59:33 +0000 (06:59 -0700)]
move tick_spinner on libuv

13 years agoIntegrate libuv into build system
Ryan Dahl [Fri, 13 May 2011 02:16:40 +0000 (19:16 -0700)]
Integrate libuv into build system

13 years agoAdd trademark stuff to homepage
Ryan Dahl [Wed, 11 May 2011 20:40:42 +0000 (13:40 -0700)]
Add trademark stuff to homepage

13 years agoRename spawnNode to fork
Ryan Dahl [Wed, 11 May 2011 20:32:40 +0000 (13:32 -0700)]
Rename spawnNode to fork

13 years agoImprove spawnNode docs
Ryan Dahl [Wed, 11 May 2011 19:31:35 +0000 (12:31 -0700)]
Improve spawnNode docs

13 years agochild_process.spawnNode
Ryan Dahl [Wed, 11 May 2011 07:41:16 +0000 (00:41 -0700)]
child_process.spawnNode

For making easy worker processes.

13 years agoFix a url regression
isaacs [Tue, 10 May 2011 20:42:49 +0000 (13:42 -0700)]
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.

13 years agoDocs: server.pause() server.address() socket.address()
Ryan Dahl [Mon, 9 May 2011 17:49:20 +0000 (10:49 -0700)]
Docs: server.pause() server.address() socket.address()

13 years agoDocumenting `require.main`, fixing #997
Trevor Burnham [Sun, 1 May 2011 18:03:08 +0000 (14:03 -0400)]
Documenting `require.main`, fixing #997

13 years agoMerge branch 'v0.4'
isaacs [Sun, 8 May 2011 03:38:32 +0000 (20:38 -0700)]
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

13 years agoAgent socket errors bubble up to req only if req exists
Ryan Dahl [Sat, 7 May 2011 19:30:53 +0000 (12:30 -0700)]
Agent socket errors bubble up to req only if req exists

Fixes #836.

13 years agoAttempt to connect to debug process more than once
Marcel Laverdet [Tue, 3 May 2011 21:51:15 +0000 (06:51 +0900)]
Attempt to connect to debug process more than once

The debugger would give up after only 100ms but on my system this
timeout isn't enough. The startup process is now modified to try 6
times every 50ms instead.

Fixes #1010.

13 years agoPoint changelog to correct branch
Ryan Dahl [Fri, 6 May 2011 23:05:02 +0000 (16:05 -0700)]
Point changelog to correct branch

Fixes #1002. Thanks cjavapro.

13 years agoTLS: simplify logic
Ryan Dahl [Fri, 6 May 2011 23:48:44 +0000 (16:48 -0700)]
TLS: simplify logic

13 years agoMake sure 'ARCH' get's defined with the CMake build system.
Nathan Rajlich [Tue, 3 May 2011 15:51:53 +0000 (08:51 -0700)]
Make sure 'ARCH' get's defined with the CMake build system.

Fixes #1004.

13 years agoAdded docs for fs.fsync and fs.fsyncSync
Ryan Dahl [Tue, 3 May 2011 21:56:04 +0000 (14:56 -0700)]
Added docs for fs.fsync and fs.fsyncSync

Thanks baudehlo. Fixes #1009.

13 years agoAdd Diffie-Hellman support to crypto module
Håvard Stranden [Wed, 19 Jan 2011 01:00:38 +0000 (02:00 +0100)]
Add Diffie-Hellman support to crypto module

Fixes #573

13 years agoAdd docs for buffer.fill()
Ryan Dahl [Fri, 6 May 2011 20:42:55 +0000 (13:42 -0700)]
Add docs for buffer.fill()

13 years agoAdd Buffer::fill method to do memset
Konstantin Käfer [Tue, 30 Nov 2010 11:18:02 +0000 (13:18 +0200)]
Add Buffer::fill method to do memset

Fixes #477.

13 years agoFix crash in debugger
Ryan Dahl [Thu, 5 May 2011 23:52:05 +0000 (16:52 -0700)]
Fix crash in debugger

13 years agoAdd on('error') to http request example
Ryan Dahl [Thu, 5 May 2011 22:40:45 +0000 (15:40 -0700)]
Add on('error') to http request example

for indexzero

13 years agoAssert, Debug output in normal default build
Ryan Dahl [Thu, 5 May 2011 04:41:01 +0000 (21:41 -0700)]
Assert, Debug output in normal default build