Commit Graph

440 Commits (2085909aebcf47e6a6aa9c5d10cf6a960544eeec)

Author SHA1 Message Date
David Siegel 2085909aeb fix corner-case bug in Module
and added a test to expose it
2010-07-13 17:15:10 -07:00
rick c9e505791a use delete for removing events after removing the final listener 2010-07-12 16:29:58 -07:00
Ryan Dahl d700a6f74a Return child from execFile 2010-07-12 14:18:09 -07:00
Dmitriy Shalashov 70a8fb3763 Fix headers with empty value. 2010-07-07 18:46:24 +02:00
Ryan Dahl 515dc2161b Experimental: 'on' as alias to 'addListener' 2010-07-03 09:30:32 +02:00
Peter Griess 94cd83ef34 Doc fixes for FD related features, upgrade.
- Add docs for 'fd' events, Server.listenFD(), Stream.write(...[, fd])
  and http.Client 'upgrade' event.
2010-07-03 08:18:42 +02:00
Ryan Dahl 8a52fb7aeb Revert "Fix 'uncaughtException' for top level exceptions"
This reverts commit 8f8dcf8ed6.
2010-07-01 11:10:22 -07:00
Ryan Dahl 8f8dcf8ed6 Fix 'uncaughtException' for top level exceptions
Done by not evaluating the code in the first tick.

This breaks one test in test-error-reporting.js but I believe this to be a
V8 error and I have reported it in
http://code.google.com/p/v8/issues/detail?id=764
2010-06-30 15:04:40 -07:00
Ryan Dahl ce8c30c9de Clean up indention on module compile
Remove strange code artifact
2010-06-30 14:30:37 -07:00
Blake Mizerany 8c8534046c fix whitespace errors 2010-06-29 23:59:24 -07:00
Dmitry Baranovskiy f8ca6b383c Rewrote QueryString.parse to make it smaller and more effective.
Also added ability to parse foo.bar=4 equal to foo[bar]=4
Added tests for this as well
2010-06-29 23:52:42 -07:00
Ryan Dahl 0a8bd34b69 Resolve .local domains with getaddrinfo()
C-Ares doesn't go through the Name Service Switch (NSS) and thus can't
resolve certain classes of names. Generally this doesn't matter and the
whole idea of NSS is rather annoying. Nevertheless until C-Ares gets better
support, adding this hack to go through getaddrinfo() for .local domain look
up.

This reverts commit 9926dacd14.
2010-06-29 22:15:28 -07:00
Blake Mizerany 898afbaf34 Buffer.prototype.write: Indifferent order preference of encoding and offset 2010-06-29 19:56:07 -07:00
Ryan Dahl 5e86d01385 Revert "Buffer.copy should copy through sourceEnd, as specified."
This reverts commit a2f70da4c9.

Keep tests modifies a few edge checks on Copy()
2010-06-29 19:40:20 -07:00
Dmitry Baranovskiy 8ec12339f5 Refactored isA, isBool, etc functions to use some of ES5 goodness. 2010-06-29 19:22:28 -07:00
Dmitry Baranovskiy d3f04933f1 sys.inherts to shadow constructor property from enumerability
thanks to ES5 features in V8 it is quite easily possible.
2010-06-29 19:11:40 -07:00
Ruben Rodriguez 242161bef2 Added new API to Script, and implemented it in the REPL 2010-06-28 15:16:26 -07:00
Matt Ranney a2f70da4c9 Buffer.copy should copy through sourceEnd, as specified.
Improve test-buffer.js to cover all copy error cases.

Fix off by one error in string_decoder.
2010-06-25 09:10:49 -07:00
Ryan Dahl 7b119f8b38 Fix error message 2010-06-23 09:09:15 -07:00
Ryan Dahl f541043618 Remove ini.js 2010-06-22 19:37:29 -07:00
Ryan Dahl fc175a089d Remove mjsunit from repo 2010-06-22 19:33:01 -07:00
Mikeal Rogers f62979da6b Add sys.pump 2010-06-22 17:58:09 -07:00
Peter Griess 51bd1b4483 Only concatenate some incoming HTTP headers.
- Concatenate 'accept', 'accept-charset', 'accept-encoding',
  'accept-language', 'connection', 'cookie', and 'x-*' headers.
- For all others, drop duplicates.
2010-06-21 12:01:50 -07:00
Peter Griess 187f191558 Support 'upgrade' event in HTTP client.
- Add a unit test for client HTTP upgrade.
- Move around unit tests for server HTTP upgrade.
2010-06-16 11:27:56 -07:00
Ryan Dahl cbf2a2233e Add callback to dgramSocket.send() 2010-06-16 11:03:34 -07:00
David Siegel 81ad8106dc Add UDP broadcast support 2010-06-16 10:45:16 -07:00
Micheil Smith b05daaaf69 Adding path.existsSync (with tests.) 2010-06-16 10:26:11 -07:00
Aaron Heckmann 1d088fb906 fs.writeFile accepts Buffers 2010-06-15 23:58:32 -07:00
Peter Dekkers e48f0d1dd9 Fixed incorrect mask for determining fs.Stats types 2010-06-15 19:52:37 -07:00
isaacs 4ce100fa62 A replacement for decodeURIComponent that doesn't throw.
And add a few more tests.
2010-06-15 19:28:09 -07:00
Ryan Dahl ed5f4f3a44 RootCaCerts shouldn't be global 2010-06-15 18:29:45 -07:00
Ryan Dahl 6bed15e074 Refactor: Utf8Decoder -> StringDecoder
Instead of just decoding Utf8, this will proxy requests to buffer.toString()
for other encodings. This makes for a simpler interface.
2010-06-15 18:19:27 -07:00
Peter Griess 4b48042c17 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.
2010-06-15 15:10:30 -07:00
Ben Lowery f3cd7bbe77 Coerce each argument to a String before attempting to print it via sys.print 2010-06-15 14:44:09 -07:00
Ryan Dahl 14414f81f3 Soft deprecation of 'listening' event.
Add callback param to listen() instead
2010-06-15 12:38:25 -07:00
Ryan Dahl 009b4569b3 Merge Hash.init() function into JS constructor 2010-06-14 13:10:23 -07:00
Felix Geisendörfer 5f3906b65e Fix: fs.writeFile could not handle utf8 2010-06-14 10:58:17 -07:00
Paul Querna 02da5ed4a1 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
2010-06-12 02:41:45 -07:00
isaacs e65e6039a8 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.
2010-06-11 14:04:58 -07:00
isaacs 94be898fbc Remove "uri" module.
The deprecation warning was broken, so clearly no one is using this thing.
2010-06-11 13:19:50 -07:00
Peter Griess de6d663a67 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.
2010-06-08 18:09:17 -07:00
Ryan Dahl bca16a0581 Handle ctrl+z from readline 2010-06-08 17:49:22 -07:00
Ryan Dahl adc06dd705 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.
2010-06-08 15:44:43 -07:00
Ryan Dahl 0377b12964 Use strings instead of buffers in readline
For eventual large character support.
2010-06-08 10:00:43 -07:00
Ryan Dahl a6942b345d Fix test-repl 2010-06-07 17:39:52 -07:00
Matt Ranney 09af242c89 Support more readline navigation keys. 2010-06-07 16:51:07 -07:00
Ryan Dahl 6056d2ea2c node without arguments starts the REPL 2010-06-07 16:15:41 -07:00
Ryan Dahl e43d6fc879 Fix misspelling 2010-06-07 16:03:57 -07:00
Ryan Dahl 41f213be18 Add binding to termios, implement readline for repl 2010-06-07 15:24:21 -07:00
Peter Griess a0134ff0f8 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.
2010-06-07 10:13:30 -07:00