platform/upstream/nodejs.git
14 years agoA replacement for decodeURIComponent that doesn't throw.
isaacs [Tue, 15 Jun 2010 04:13:09 +0000 (21:13 -0700)]
A replacement for decodeURIComponent that doesn't throw.

And add a few more tests.

14 years agoRootCaCerts shouldn't be global
Ryan Dahl [Wed, 16 Jun 2010 01:29:45 +0000 (18:29 -0700)]
RootCaCerts shouldn't be global

14 years agoRefactor: Utf8Decoder -> StringDecoder
Ryan Dahl [Wed, 16 Jun 2010 01:19:25 +0000 (18:19 -0700)]
Refactor: Utf8Decoder -> StringDecoder

Instead of just decoding Utf8, this will proxy requests to buffer.toString()
for other encodings. This makes for a simpler interface.

14 years agoWrap FD in closure before emitting from Stream.
Peter Griess [Tue, 15 Jun 2010 20:33:44 +0000 (15:33 -0500)]
Wrap FD in closure before emitting from Stream.

- Without this, recvMsg can be invoked before the event emitter gets a
  chance to run. In this case, recvMsg.fd will be overwritten and the
  original caller can end up emitting null.

14 years agoUpgrade V8 to 2.2.17
Ryan Dahl [Tue, 15 Jun 2010 21:52:00 +0000 (14:52 -0700)]
Upgrade V8 to 2.2.17

14 years agoCoerce each argument to a String before attempting to print it via sys.print
Ben Lowery [Tue, 15 Jun 2010 19:16:08 +0000 (15:16 -0400)]
Coerce each argument to a String before attempting to print it via sys.print

14 years agoMore lint on node_crypto
Ryan Dahl [Tue, 15 Jun 2010 20:35:47 +0000 (13:35 -0700)]
More lint on node_crypto

14 years agoFix a bunch of memory leaks in node_crypto
Ryan Dahl [Tue, 15 Jun 2010 20:31:59 +0000 (13:31 -0700)]
Fix a bunch of memory leaks in node_crypto

14 years agoLint node_crypto.cc
Ryan Dahl [Tue, 15 Jun 2010 20:16:20 +0000 (13:16 -0700)]
Lint node_crypto.cc

14 years agoRemove unused code from node_crypto
Ryan Dahl [Tue, 15 Jun 2010 19:41:14 +0000 (12:41 -0700)]
Remove unused code from node_crypto

14 years agoSoft deprecation of 'listening' event.
Ryan Dahl [Tue, 15 Jun 2010 19:38:22 +0000 (12:38 -0700)]
Soft deprecation of 'listening' event.

Add callback param to listen() instead

14 years agoTest case for net.Server.listenFD()
Peter Griess [Tue, 15 Jun 2010 18:44:33 +0000 (11:44 -0700)]
Test case for net.Server.listenFD()

14 years agoExpose the FD numbers for stdin and stderr on process.binding("stdio")
isaacs [Sun, 13 Jun 2010 06:03:11 +0000 (23:03 -0700)]
Expose the FD numbers for stdin and stderr on process.binding("stdio")

14 years agoFix memory leak in hash.update()
Ryan Dahl [Mon, 14 Jun 2010 21:38:40 +0000 (14:38 -0700)]
Fix memory leak in hash.update()

14 years agoMerge Hash.init() function into JS constructor
Ryan Dahl [Mon, 14 Jun 2010 20:10:23 +0000 (13:10 -0700)]
Merge Hash.init() function into JS constructor

14 years agoFix: fs.writeFile could not handle utf8
Felix Geisendörfer [Mon, 14 Jun 2010 17:34:34 +0000 (19:34 +0200)]
Fix: fs.writeFile could not handle utf8

14 years agoImplement datagram sockets
Paul Querna [Sat, 12 Jun 2010 09:40:24 +0000 (02:40 -0700)]
Implement datagram sockets

- Adds new dgram module, for all data-gram type transports
- Supports both UDP client and servers
- Supports Unix Daemon sockets in DGRAM mode too (think syslog)
- Uses a shared Buffer and slices that as needed to be reasonably
  performant.
- One supplied test program so far, test-dgram-pingpong
- Passes test cases on osx 10.6 and ubuntu 9.10u

14 years agoFix #169. Expose require members in the repl.
isaacs [Fri, 11 Jun 2010 20:59:18 +0000 (13:59 -0700)]
Fix #169. Expose require members in the repl.

This fixes #169 by putting the require members onto the cwdRequire function
which is exposed to the repl scope.

14 years agoMake addon building work for Cygwin.
Brian McKenna [Fri, 11 Jun 2010 11:25:05 +0000 (21:25 +1000)]
Make addon building work for Cygwin.

14 years agoRemove "uri" module.
isaacs [Thu, 10 Jun 2010 21:56:59 +0000 (14:56 -0700)]
Remove "uri" module.

The deprecation warning was broken, so clearly no one is using this thing.

14 years agoAdd Orlando to changelog
Ryan Dahl [Fri, 11 Jun 2010 20:16:08 +0000 (13:16 -0700)]
Add Orlando to changelog

14 years agobump version v0.1.98
Ryan Dahl [Wed, 9 Jun 2010 23:13:40 +0000 (16:13 -0700)]
bump version

14 years agoUpgrade C-Ares to 1.7.3
Ryan Dahl [Fri, 11 Jun 2010 19:45:17 +0000 (12:45 -0700)]
Upgrade C-Ares to 1.7.3

14 years agoLicense file maintenance.
Ryan Dahl [Fri, 11 Jun 2010 19:34:34 +0000 (12:34 -0700)]
License file maintenance.

- reference to OpenSSL
- note about http-parser

14 years agoRemove setTimeout from initial example and description.
Matt Ranney [Fri, 11 Jun 2010 06:19:43 +0000 (23:19 -0700)]
Remove setTimeout from initial example and description.

14 years agoImprove fs.write tests
Ryan Dahl [Thu, 10 Jun 2010 21:59:06 +0000 (14:59 -0700)]
Improve fs.write tests

14 years agoDon't use bzero
Ryan Dahl [Thu, 10 Jun 2010 14:58:24 +0000 (07:58 -0700)]
Don't use bzero

14 years agoThe underscores are not meant to emphasize. Escape them.
Jérémy Lal [Thu, 10 Jun 2010 13:06:23 +0000 (15:06 +0200)]
The underscores are not meant to emphasize. Escape them.

14 years agoPort to cygwin
Raffaele Sena [Wed, 9 Jun 2010 04:08:05 +0000 (21:08 -0700)]
Port to cygwin

14 years agoUpgrade V8 to 2.2.16
Ryan Dahl [Wed, 9 Jun 2010 17:09:37 +0000 (10:09 -0700)]
Upgrade V8 to 2.2.16

14 years agoWeb site example fixes.
Matt Ranney [Wed, 9 Jun 2010 06:25:55 +0000 (23:25 -0700)]
Web site example fixes.

14 years agoUpgrade V8 to 2.2.15
Ryan Dahl [Wed, 9 Jun 2010 01:19:00 +0000 (18:19 -0700)]
Upgrade V8 to 2.2.15

14 years agoAdd 'type' parameter to net.Server.listenFD()
Peter Griess [Wed, 9 Jun 2010 01:09:17 +0000 (18:09 -0700)]
Add 'type' parameter to net.Server.listenFD()

This is needed in case the provided socket is not the default 'tcp4' type
(i.e. and needs different read/write/etc methods). With this patch, one can
call listenFD(sock, 'unix') to bind to existing UNIX domain sockets.

14 years agoHandle ctrl+z from readline
Ryan Dahl [Wed, 9 Jun 2010 00:49:04 +0000 (17:49 -0700)]
Handle ctrl+z from readline

14 years agoAdd NODE_NO_READLINE check for REPL
Ryan Dahl [Tue, 8 Jun 2010 20:05:21 +0000 (13:05 -0700)]
Add NODE_NO_READLINE check for REPL

Setting this environmental variable to a non-zero integer will start all
REPL interfaces without readline. For use with rlwrap.

14 years agoUse strings instead of buffers in readline
Ryan Dahl [Tue, 8 Jun 2010 04:19:25 +0000 (21:19 -0700)]
Use strings instead of buffers in readline

For eventual large character support.

14 years agoFix test-repl
Ryan Dahl [Tue, 8 Jun 2010 00:39:24 +0000 (17:39 -0700)]
Fix test-repl

14 years agoSupport more readline navigation keys.
Matt Ranney [Mon, 7 Jun 2010 23:43:50 +0000 (16:43 -0700)]
Support more readline navigation keys.

14 years agoDo not output \n on stderr on output, breaks tests
Ryan Dahl [Mon, 7 Jun 2010 23:23:48 +0000 (16:23 -0700)]
Do not output \n on stderr on output, breaks tests

14 years agonode without arguments starts the REPL
Ryan Dahl [Mon, 7 Jun 2010 23:15:41 +0000 (16:15 -0700)]
node without arguments starts the REPL

14 years agoFix misspelling
Ryan Dahl [Mon, 7 Jun 2010 23:03:57 +0000 (16:03 -0700)]
Fix misspelling

14 years agoAdd binding to termios, implement readline for repl
Ryan Dahl [Mon, 31 May 2010 18:50:35 +0000 (11:50 -0700)]
Add binding to termios, implement readline for repl

14 years agoadd net.Server.listenFD
Peter Griess [Mon, 7 Jun 2010 17:08:57 +0000 (10:08 -0700)]
add net.Server.listenFD

Now that FD passing is in master, it'd be great to be able to use a received
socket (which has already had bind(2) and listen(2) called on it) to fire up a
new net.Server instance. This patch adds a net.Server.listenFD() method which
will start up the accept watcher on the provided FD.

14 years agoUpgrade http-parser
Ryan Dahl [Mon, 7 Jun 2010 00:41:03 +0000 (17:41 -0700)]
Upgrade http-parser

14 years agoAllow ObjectWrap destructors before Wrap()
Ryan Dahl [Fri, 4 Jun 2010 21:23:45 +0000 (14:23 -0700)]
Allow ObjectWrap destructors before Wrap()

14 years agoMore dynamic linking options (again)
Ryan Dahl [Wed, 2 Jun 2010 21:05:37 +0000 (14:05 -0700)]
More dynamic linking options (again)

Original commit: 75f0cf471af3c029290d4bf55c34d1fc470ef600

14 years agoFix options parsing
Peter Griess [Fri, 4 Jun 2010 15:29:10 +0000 (08:29 -0700)]
Fix options parsing

The current node has a bug where it will fail to pass the option argument
immediately preceding the first non-option argument to V8. That is the
--perf flag will be ignored by V8 when running 'node --perf script.js'.

14 years agoApply fix for V8 bug 728
Ryan Dahl [Fri, 4 Jun 2010 01:50:44 +0000 (18:50 -0700)]
Apply fix for V8 bug 728

14 years agoUse a less common port in docs
Ryan Dahl [Fri, 4 Jun 2010 01:44:05 +0000 (18:44 -0700)]
Use a less common port in docs

14 years agoFix ability to disable TCP timeouts with setTimeout(0)
Ryan Dahl [Thu, 3 Jun 2010 18:01:47 +0000 (11:01 -0700)]
Fix ability to disable TCP timeouts with setTimeout(0)

14 years agoFix: require.async module exception delegation
Felix Geisendörfer [Thu, 3 Jun 2010 10:39:12 +0000 (12:39 +0200)]
Fix: require.async module exception delegation

The fs.readFile bug was hiding another bug that was causing this test
to pass, even so it was broken:

require.async("../fixtures/throws_error1") in test-module-loading.js

This patch fixes the original test by running _compile within a
try..catch block for _loadScript.

_loadScriptSync also had some useless (deprecated?) code for dealing
with module entry point exceptions. This code was also removed for
greater clarity.

14 years agoFix: fs.readFile would execute callbacks twice
Felix Geisendörfer [Thu, 3 Jun 2010 10:37:21 +0000 (12:37 +0200)]
Fix: fs.readFile would execute callbacks twice

fs.readFile was executing a callback in a try..catch context, which is
a problem in itself. To make matters worse, it would re-execute the
same callback if there was an execution.

This patch fixes both of these problems.

14 years agoDOC note stats.isSymbolicLink() is only valid with fs.lstat().
rentzsch [Thu, 3 Jun 2010 04:15:02 +0000 (23:15 -0500)]
DOC note stats.isSymbolicLink() is only valid with fs.lstat().

ref: <http://github.com/ry/node/issues#issue/153>

14 years agoSend and receive file descriptors through net.Stream.
Peter Griess [Thu, 3 Jun 2010 01:16:53 +0000 (18:16 -0700)]
Send and receive file descriptors through net.Stream.

a) create a layer of indirection in net.Stream to allow swapping in
different read/write implementations and

b) emit an 'fd' event when file descriptors are received over a UNIX pipe,
as finally as a tangential benefit

c) remove a bunch of conditionals from the primary codepaths for
ease-of-reading.

14 years agoServer responses should have a body if HEAD request
Ryan Dahl [Wed, 2 Jun 2010 21:46:29 +0000 (14:46 -0700)]
Server responses should have a body if HEAD request

14 years agoBetter 'make' output
Ryan Dahl [Wed, 2 Jun 2010 19:27:53 +0000 (12:27 -0700)]
Better 'make' output

Removes 'make all-debug' since it is unnecessary now.

14 years agoAdd a parameter to spawn() that sets the child's stdio file descriptors.
Orlando Vazquez [Tue, 1 Jun 2010 07:56:08 +0000 (00:56 -0700)]
Add a parameter to spawn() that sets the child's stdio file descriptors.

After the child is forked, these file descriptors will get dup2()'d to STDIN,
STDIO, and STDERR.

(API may be changed.)

14 years agoRevert "More dynmaic linking options"
Ryan Dahl [Wed, 2 Jun 2010 16:15:54 +0000 (09:15 -0700)]
Revert "More dynmaic linking options"

Broke the build. Will fix and reapply soon.

This reverts commit 75f0cf471af3c029290d4bf55c34d1fc470ef600.

14 years agoMore dynmaic linking options
Ryan Dahl [Wed, 2 Jun 2010 03:16:42 +0000 (23:16 -0400)]
More dynmaic linking options

This adds the following options to the `configure` program

  --shared-v8           Link to a shared V8 DLL instead of static linking
  --shared-v8-includes=SHARED_V8_INCLUDES
                        Directory containing V8 header files
  --shared-v8-libpath=SHARED_V8_LIBPATH
                        A directory to search for the shared V8 DLL
  --shared-cares        Link to a shared C-Ares DLL instead of static linking
  --shared-cares-includes=SHARED_CARES_INCLUDES
                        Directory containing C-Ares header files
  --shared-cares-libpath=SHARED_CARES_LIBPATH
                        A directory to search for the shared C-Ares DLL
  --shared-libev        Link to a shared libev DLL instead of static linking
  --shared-libev-includes=SHARED_LIBEV_INCLUDES
                        Directory containing libev header files
  --shared-libev-libpath=SHARED_LIBEV_LIBPATH
                        A directory to search for the shared libev DLL

and removes --system.

14 years agoFix style in sys.js
Ryan Dahl [Tue, 1 Jun 2010 16:28:31 +0000 (09:28 -0700)]
Fix style in sys.js

14 years agoUpgrade to V8 2.2.13
Ryan Dahl [Mon, 31 May 2010 18:52:20 +0000 (11:52 -0700)]
Upgrade to V8 2.2.13

14 years agobump version v0.1.97
Ryan Dahl [Sun, 30 May 2010 02:32:33 +0000 (19:32 -0700)]
bump version

14 years agoRemove throttling bug notes
Ryan Dahl [Sun, 30 May 2010 02:37:44 +0000 (19:37 -0700)]
Remove throttling bug notes

14 years agoAPI: readFileSync without encoding argument now returns a Buffer
Ryan Dahl [Sat, 29 May 2010 20:38:00 +0000 (13:38 -0700)]
API: readFileSync without encoding argument now returns a Buffer

Correctly load utf8 data; add a test test-fs-read-file-sync.js

14 years agoDeprecate the 'ini' module
Ryan Dahl [Sat, 29 May 2010 20:14:38 +0000 (13:14 -0700)]
Deprecate the 'ini' module

14 years agoRename node_net2.cc to node_net.cc
Ryan Dahl [Sat, 29 May 2010 20:08:05 +0000 (13:08 -0700)]
Rename node_net2.cc to node_net.cc

14 years agoMake require() from the repl be relative to cwd
isaacs [Mon, 10 May 2010 00:02:40 +0000 (17:02 -0700)]
Make require() from the repl be relative to cwd

14 years agoExecute repl code in new context
isaacs [Mon, 10 May 2010 00:02:02 +0000 (17:02 -0700)]
Execute repl code in new context

14 years agoUse duck-typing as well as instanceof in sys.inspect
isaacs [Sun, 9 May 2010 23:35:15 +0000 (16:35 -0700)]
Use duck-typing as well as instanceof in sys.inspect

This makes it so that inspecting objects from other contexts works as expected.

14 years agoaddons should have debugging symbols
Ryan Dahl [Sat, 29 May 2010 19:25:28 +0000 (12:25 -0700)]
addons should have debugging symbols

14 years agoCheck for a couple of edge cases on the inspect hook.
Tim Caswell [Fri, 28 May 2010 21:48:37 +0000 (14:48 -0700)]
Check for a couple of edge cases on the inspect hook.

Don't treat sys.inspect special, same with prototype objects.

14 years agoProvide a hook for user-specified inspect functions
Tim Caswell [Fri, 28 May 2010 19:17:16 +0000 (12:17 -0700)]
Provide a hook for user-specified inspect functions

14 years agoInsert some hot paths into HTTP
Ryan Dahl [Fri, 28 May 2010 03:28:12 +0000 (20:28 -0700)]
Insert some hot paths into HTTP

14 years agoRefactor HTTP
Ryan Dahl [Thu, 27 May 2010 00:59:55 +0000 (17:59 -0700)]
Refactor HTTP

Allow throttling from outgoing messages.

14 years ago:%s/8000/PORT/g for a few tests
Ryan Dahl [Thu, 27 May 2010 23:49:21 +0000 (16:49 -0700)]
:%s/8000/PORT/g for a few tests

14 years agoAdded support for OpenBSD 32-bit for c-ares
Brian White [Thu, 27 May 2010 13:48:40 +0000 (09:48 -0400)]
Added support for OpenBSD 32-bit for c-ares

14 years agoBugfix: fs.ReadStream.setEncoding
Ryan Dahl [Thu, 27 May 2010 01:32:56 +0000 (18:32 -0700)]
Bugfix: fs.ReadStream.setEncoding

Improve test-fs-read-stream test.

14 years agoFix Solaris V8 build
Ryan Dahl [Thu, 27 May 2010 01:05:42 +0000 (18:05 -0700)]
Fix Solaris V8 build

Patch submitted to V8: http://codereview.chromium.org/2282003/show

14 years agoAdding experimental support for fs.chown and fs.chownSync.
Micheil Smith [Wed, 26 May 2010 17:49:01 +0000 (03:49 +1000)]
Adding experimental support for fs.chown and fs.chownSync.

Notes:
- Currently only accepts numeric user and group ids.
- No tests, as tests depend on getpwuid and getgrgid.
- No documentation, as there is no tests and this is experimental.

14 years agoSimplify a few internal HTTP events.
Ryan Dahl [Wed, 26 May 2010 20:37:06 +0000 (13:37 -0700)]
Simplify a few internal HTTP events.

14 years agoFix JOBS for Solaris make
Ryan Dahl [Wed, 26 May 2010 20:05:31 +0000 (20:05 +0000)]
Fix JOBS for Solaris make

14 years agoRemove -Werror from V8 SConstruct
Ryan Dahl [Wed, 26 May 2010 17:48:20 +0000 (10:48 -0700)]
Remove -Werror from V8 SConstruct

14 years agoUpgrade V8 to 2.2.12
Ryan Dahl [Wed, 26 May 2010 17:15:43 +0000 (10:15 -0700)]
Upgrade V8 to 2.2.12

14 years agoAvoided sending empty chunkedEncoding chunks in the middle of http responses
Sam Hughes [Thu, 29 Apr 2010 02:25:43 +0000 (19:25 -0700)]
Avoided sending empty chunkedEncoding chunks in the middle of http responses

14 years agoFix issue 89, parsing responses to HEAD requests
Ryan Dahl [Wed, 26 May 2010 02:24:30 +0000 (19:24 -0700)]
Fix issue 89, parsing responses to HEAD requests

Test from Mark Hansen (mark at markhansen.co.nz)

14 years agoIn HTTP parser, proxy return value of onHeadersComplete
Ryan Dahl [Wed, 26 May 2010 01:39:23 +0000 (18:39 -0700)]
In HTTP parser, proxy return value of onHeadersComplete

14 years agoUpgrade http-parser
Ryan Dahl [Wed, 26 May 2010 01:41:31 +0000 (18:41 -0700)]
Upgrade http-parser

14 years agoDestroy REPL pipes instead of shutting down.
Ryan Dahl [Tue, 25 May 2010 00:14:08 +0000 (17:14 -0700)]
Destroy REPL pipes instead of shutting down.

14 years agofs.ReadStream should emit Buffers
Ryan Dahl [Mon, 24 May 2010 22:47:40 +0000 (15:47 -0700)]
fs.ReadStream should emit Buffers

And do proper utf8 encoding.

14 years agoCreate a public Buffer constructor for use in addons.
Ryan Dahl [Mon, 24 May 2010 19:59:22 +0000 (12:59 -0700)]
Create a public Buffer constructor for use in addons.

14 years agoChange the behavior of path.extname
Aapo Laitinen [Sun, 23 May 2010 18:28:23 +0000 (21:28 +0300)]
Change the behavior of path.extname

Make path.extname return an empty string also if:
- The last dot is not in the last path component
- The last dot starts the last path component

14 years agoPort to OpenBSD
Brian White [Sun, 23 May 2010 23:04:36 +0000 (16:04 -0700)]
Port to OpenBSD

14 years agoUpgrade libeio
Ryan Dahl [Sun, 23 May 2010 23:57:20 +0000 (16:57 -0700)]
Upgrade libeio

14 years agoAdded reason phrases for a bunch of HTTP status codes.
Ben Noordhuis [Sun, 23 May 2010 20:48:50 +0000 (22:48 +0200)]
Added reason phrases for a bunch of HTTP status codes.

14 years agoAdd bug notes about HTTP streams and throttling
Ryan Dahl [Sat, 22 May 2010 20:02:30 +0000 (13:02 -0700)]
Add bug notes about HTTP streams and throttling

14 years agoAdd assert.ifError
Mikeal Rogers [Fri, 21 May 2010 19:05:55 +0000 (12:05 -0700)]
Add assert.ifError

14 years agoUpgrade V8 to 2.2.11
Ryan Dahl [Fri, 21 May 2010 16:41:50 +0000 (09:41 -0700)]
Upgrade V8 to 2.2.11

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