isaacs
0e311717b5
Treat "//some_path" as pathname rather than hostname by default.
Note that "//" is still a special indicator for the hostname, and this does
not change the parsing of mailto: and other "slashless" url schemes. It
does however remove some oddness in url.parse(req.url) which is the most
common use-case for the url.parse function.
14 years ago
Ryan Dahl
7347fb3e2c
Make sure setInterval(cb, 0) loops infinitely
14 years ago
Ryan Dahl
a055153cda
Fix style in test/simple/test-dgram-unix.js
14 years ago
Ryan Dahl
f188b9d6d7
Remove timer from test/simple/test-dgram-unix.js
Test running already has a timeout mechanism.
14 years ago
Marco Rogers
af9aa93e0c
fix for fs.readFile to return string when encoding specified on zero length read
14 years ago
Marco Rogers
9c7c6e93e1
Fixed async fs writes with length 0, it should fire the callback
14 years ago
Ryan Dahl
635986e433
Add failing uncaughtException test
FIXME
14 years ago
Johan Euphrosine
e49be4768b
add readline support for meta-d
14 years ago
Russell Haering
37b6e10684
Pass an error to the sys.pump callback if one occurs
- Add test case for pumping from unreadable stream.
- Document the sys.pump error handling behavior
14 years ago
Benjamin Thomas
57642e2349
Fix process.nextTick so thrown errors don't confuse it.
If the function for a process.nextTick throws an error, then the
splice() never removes that function from the nextTickQueue array. This
makes sure the functions that have been run in _tickCallback get removed
regardless of errors.
Also add a test for this.
14 years ago
Ryan Dahl
4fdebab005
Safe constructor: net.Server, net.Stream
14 years ago
Ryan Dahl
f86ad1693f
Safe Constructor: Buffer
14 years ago
Ryan Dahl
44a287987e
Safe constructors: http.Server and http.Client
14 years ago
Johan Euphrosine
51224f12ca
add test for readline putty support
14 years ago
Johan Euphrosine
748469c71c
add readline support for meta-f and meta-b
14 years ago
Johan Euphrosine
fd3e84499e
add home/end support in rxvt and readline tests
14 years ago
Johan Euphrosine
bedca2e7a9
add tests for console.log arguments handling
14 years ago
Ryan Dahl
2982e75a0b
set-cookies header is an array of values. always
14 years ago
Ryan Dahl
60b93cca6d
Fix race conditions in test-dgram-multicast.js
14 years ago
Herbert Vojčík
28b21d15c3
Fix undefined_reference_in_new_context test for own-context module loader.
14 years ago
Herbert Vojčík
2b126da395
Tests for behaviour of 'global'.
14 years ago
Herbert Vojčík
9253333850
Fix registerExtension for NODE_MODULE_CONTEXTS
Fix of registerExtension-produced non-string module loading with own
context. Plus finishing touches to the test.
14 years ago
Herbert Vojčík
cf2b206a8e
More changes to tests so they really work under context module loader.
Plus, getting rid of test/common.js defining things in global.
14 years ago
Herbert Vojčík
32e309440f
Fix of 'sys.common.debug' calls in tests.
14 years ago
Marco Rogers
6744e59e46
detect 0 length fs writes with tests
14 years ago
Ryan Dahl
4593c04959
Implement net.Server.maxConnections
Simplify EMFILE behavior.
14 years ago
Ryan Dahl
a8c2bb41af
Fix tests
14 years ago
Ryan Dahl
03123435e0
Remove platform specific asserts
14 years ago
Bert Belder
0e8d858aba
One more test with a race condition fixed
14 years ago
Rasmus Andersson
758f12f34c
added read and write support for process.title Darwin
This will only manipulate the OS X-level process name, not the title shown
in e.g. ps.
14 years ago
Rasmus Andersson
8d5e05668b
Added support for multiple listeners to DNS multicast datagrams.
Some platforms require SO_REUSEPORT to be set for the socket.
14 years ago
Bert Belder
7059be19ec
Fix http and net tests failing due to race condition
Plus some minor cosmetic corrections
14 years ago
Ryan Dahl
9395786d11
Fix race conditions in tests
14 years ago
Bert Belder
aaa1f451e6
Expose cwd option to child_process.exec()
14 years ago
Bert Belder
94914135df
New api for child_process.spawn; ability to set cwd for spawn()ed process
Tests for child_process.spawn() use new API
Test for deprecated child_process.spawn() API
14 years ago
Ryan Dahl
d408de87fc
Remove module.js - put code into src/node.js
14 years ago
cloudhead
fe3e419687
querystring.parse: handle undefined value properly
14 years ago
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
14 years ago
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.
14 years ago
Ryan Dahl
7db5c8a10d
Fix toString('base64') bug
Thanks to Stepan Stolyarov for the test case.
14 years ago
Ryan Dahl
adec544fdd
Revert "Expose the V8 debug object process.debug"
This reverts commit d9fbb8a580
.
14 years ago
Ryan Dahl
31b59400f8
Allow null context in Script
14 years ago
Ryan Dahl
d9fbb8a580
Expose the V8 debug object process.debug
Add one duplicate test from V8, just to make sure it works.
14 years ago
Mikeal Rogers
3214116be6
Implement keep-alive for http.Client
Send the 'Connection: keep-alive' header in your request to enable.
14 years ago
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.
14 years ago
Ben Noordhuis
f72ac17c89
Buffer: graciously handle padding in base64-encoded input.
14 years ago
Ryan Dahl
f291fbc8a7
Fix ending \0 in base64 decoding
14 years ago
Ben Noordhuis
95638c9b0d
Buffer: adjust buffer size so the base64-decoded input fits snugly.
Stops Valgrind from complaining about uninitialized memory access.
14 years ago
Dmitry Baranovskiy
8ab3c3e7c3
Added ability to pass offset to buffer write and toString methods as a string, i.e. '2' and encoding as anything
14 years ago
Ryan Dahl
2c1ca4078d
Implement buffer.write for base64
There might be an off-by-one on the returned value.
14 years ago