Commit Graph

1990 Commits (d408de87fc2490c0e083ad438ac2cffbe8b56280)

Author SHA1 Message Date
Ryan Dahl d408de87fc Remove module.js - put code into src/node.js 2010-08-06 12:34:02 -07:00
Tj Holowaychuk e8795cea30 Added console.trace() 2010-08-06 12:15:04 -07:00
Tj Holowaychuk a8e1e8d057 Added console.{time,timeEnd}() 2010-08-06 12:11:04 -07:00
Tj Holowaychuk e15221a8de console formatter appends extra arguments
This makes the console methods more "browser-like",
for example:

  console.log("foo", "bar", "baz");
  // foo bar baz

but still works with formatting

  console.log("hey %s", "tj", "whats up");

  // hey tj whats up
2010-08-06 12:10:08 -07:00
cloudhead fe3e419687 querystring.parse: handle undefined value properly 2010-08-05 10:46:28 -07:00
Felix Geisendörfer ffbbc465d3 Support inspecting objects with console.log
If the first parameter passed into console.log() is not a string, all
parameters will be printed as formated by sys.inspect. This change
also affects console.info and console.warn.
2010-08-05 10:23:17 -07:00
Ryan Dahl 6cd32fb62e Update AUTHORS 2010-08-04 16:50:59 -07:00
Ryan Dahl a4906c7c83 Print warning when OpenSSL not found 2010-08-04 16:07:10 -07:00
Nick Stenning 0a3eff8021 Standardise module load order for native and registered file extensions.
This patch standardises the load order for modules. Highest priority is trying to load exactly the file the user specified, followed by native extensions, followed by registered extra extensions, etc.

In full, if we require('foo') having registered '.coffee' as an alternative extension, we try and load the following files in order:

    foo
    foo.js
    foo.node
    foo.coffee
    foo/index.js
    foo/index.node
    foo/index.coffee
2010-08-04 16:03:08 -07:00
Nick Stenning 78520ba482 Don't attempt to load a directory.
This patch replaces the path.exists check for module loading with a call to
fs.statSync (or fs.stat for require.async) which ensures that it's not trying
to load a directory.
2010-08-04 15:55:47 -07:00
Ryan Dahl 0b925d075d bump version 2010-08-04 12:04:12 -07:00
Ryan Dahl 81f5ed5c65 Upgrade V8 to 2.3.5 2010-08-04 11:46:42 -07:00
Ryan Dahl 7db5c8a10d Fix toString('base64') bug
Thanks to Stepan Stolyarov for the test case.
2010-08-04 11:38:48 -07:00
Samuel Shull 24c6d26cca Add node_version.h to install 2010-08-04 10:54:02 -07:00
Ryan Dahl adec544fdd Revert "Expose the V8 debug object process.debug"
This reverts commit d9fbb8a580.
2010-08-04 10:38:19 -07:00
Ryan Dahl 31b59400f8 Allow null context in Script 2010-08-04 10:20:40 -07:00
isaacs 1a1214866f SetBlocking should set blocking, not toggle it 2010-08-04 09:58:56 -07:00
isaacs e9aacd40c6 When the parent's stdio FDs are passed to a child, make them temporarily blocking.
Many programs do not handle non-blocking stdio very well.  In particular,
man and less have serious problems with this, and since stdout isn't being
flushed after each write, the output jumps about on the screen as you page
down.  Programs that do use non-blocking stdio will set that flag themselves
(as node does).

This puts the stdio file descriptors into blocking mode before sharing them
with the child process, so that one could spawn a vim subprocess, or some
other program that depends on blocking IO.
2010-08-03 18:11:43 -07:00
Ryan Dahl a6bc68a83b Upgrade V8 to 2.3.4 2010-08-03 10:33:16 -07:00
Ben Noordhuis 4b19bd2896 Client.onend: Anticipate that the HTTP parser object is uninitialized when the client setup failed. 2010-08-02 11:25:53 -07:00
Ryan Dahl d9fbb8a580 Expose the V8 debug object process.debug
Add one duplicate test from V8, just to make sure it works.
2010-08-02 00:46:09 -07:00
Mikeal Rogers 3214116be6 Implement keep-alive for http.Client
Send the 'Connection: keep-alive' header in your request to enable.
2010-08-01 22:34:17 -07:00
Brian 71009ad3fe Allow signals to be used with process.on in addition to process.addListener. 2010-08-01 20:23:03 -07:00
isaacs 65037eeb32 Don't let path.normalize get above the root.
Any path.join or path.normalize that starts with a / will not go "above" that after normalization.  This is important because /../foo is almost *always* some sort of error, and doesn't match the corollary in sh: `cd $p; pwd`

At the worse, this can be a vector for exploits, since a static file server might do path.join(docroot, path.normalize("/"+req)) to get the file.  If the normalized request path could be something like "/../../../etc/passwd" then bad things could happen.
2010-08-01 20:20:17 -07:00
Danny Coates dc8c079d90 remove node::CheckBreak in favor of using the v8 debugger js object 2010-08-01 20:04:31 -07:00
Ryan Dahl e59b3f0eb3 Upgrade http-parser for clang compat 2010-07-31 14:32:59 -07:00
Ryan Dahl b2a2bb736b [v8] Remove global.print from v8natives.js (fixes issue 791)
Review URL: http://codereview.chromium.org/3045016
2010-07-30 12:20:32 -07:00
Ryan Dahl c38dd24dc5 Fix style 2010-07-30 10:54:43 -07:00
Ben Noordhuis f72ac17c89 Buffer: graciously handle padding in base64-encoded input. 2010-07-30 10:49:00 -07:00
Ryan Dahl cf49fc7bfe Fix email address in AUTHORS file 2010-07-30 09:42:36 -07:00
Ryan Dahl f291fbc8a7 Fix ending \0 in base64 decoding 2010-07-29 14:52:40 -07:00
Ben Noordhuis 95638c9b0d Buffer: adjust buffer size so the base64-decoded input fits snugly.
Stops Valgrind from complaining about uninitialized memory access.
2010-07-28 11:37:23 -07:00
Ryan Dahl b5b83b210b Fix --debug-brk; hacky solution 2010-07-27 20:36:58 -07:00
Ryan Dahl 505178d82b Add todos 2010-07-27 12:19:08 -07:00
Ryan Dahl 8052dd0022 Clarify string encoding docs 2010-07-27 12:16:48 -07:00
Ryan Dahl 5459e5c606 Globalize the Buffer object 2010-07-27 10:58:45 -07:00
Ryan Dahl b3c0359b56 Only one line break before stacktrace 2010-07-26 19:08:21 -07:00
Ryan Dahl d489555553 Use kqueue on recent macintosh builds 2010-07-26 19:07:31 -07:00
Matt Ranney f7c5334195 Check for socket on Unix domain connect.
Change scope to context in REPL docs.
2010-07-26 19:02:15 -07:00
Ryan Dahl 23cf556c6c Upgrade http-parser
support for
- long messages
- spaces in header fields
2010-07-26 15:02:20 -07:00
Ryan Dahl 552cf28260 Upgrade V8 to 2.3.3 2010-07-26 14:26:42 -07:00
Benjamin Kramer eeaf1ef970 Constify read-only global data
Also silences a compiler warning about deprecated conversion from const
char* to char*.
2010-07-26 22:14:39 +02:00
Benjamin Kramer 93cb09642d Add missing parentheses
& has higher precedence than ==, making this a noop. Use the less
error-prone S_IS* macros instead. Found by clang.
2010-07-26 22:14:10 +02:00
Benjamin Kramer eeb54c63d8 Fix addrlen for unix_dgram sockets
The old definition was off by one byte on BSD. Also simplify
ADDRESS_TO_JS because sun_path is always zero-terminated now.
2010-07-26 22:13:49 +02:00
Ryan Dahl 28db0c2562 Add write() callback TODO item 2010-07-26 12:42:59 -07:00
Chandra Sekar S 66deea10c7 Support for HOME and END in REPL. 2010-07-26 10:59:34 -07:00
Ryan Dahl 6fdb874e2e Fix DNS example in docs 2010-07-26 10:35:45 -07:00
Ryan Dahl 2a4568c85f bump version 2010-07-25 23:39:58 -07:00
Ryan Dahl 402bcb83bc Add reference to base64 encoding 2010-07-25 23:21:39 -07:00
Dmitry Baranovskiy 8ab3c3e7c3 Added ability to pass offset to buffer write and toString methods as a string, i.e. '2' and encoding as anything 2010-07-25 20:16:37 -07:00