summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Move test-net-write-callbacks to pummelRyan Dahl2011-09-301-0/+0
| | | | Runs in 3 seconds.
* tls: Add test for #1775koichik2011-09-301-0/+78
|
* net: Fix string-concat hot path bugRyan Dahl2011-09-281-0/+56
| | | | | Also removes functionality added in f9fec3a2d65580b7e39edc9afd5904cd4775c87c because it changes API. (That patch shouldn't have been added anyway.)
* buffers: handle bad length argument in constructorBen Noordhuis2011-09-241-0/+13
| | | | | | Coerce fractional, negative and non-numeric length arguments to numbers. Fractional numbers are rounded up, negative numbers and non-numeric values are set to zero.
* Fix #1707 hasOwnProperty usageisaacs2011-09-151-0/+1
| | | | | | | If hasOwnProperty is overridden, then calling `obj.hasOwnProperty(prop)` can fail. Any time a dictionary of user-generated items is built, we cannot rely on hasOwnProperty being safe, so must call it from the Object.prototype explicitly.
* Add querystring test for hasOwnProperty usageisaacs2011-09-151-3/+4
|
* test: add http multi-line header testBen Noordhuis2011-09-141-0/+59
| | | | Test case for #1569. Verify that http_parser parses multi-line headers.
* net: Socket write encoding case sensitivitykoichik2011-09-041-0/+55
| | | | Fixes #1586.
* buffer: write() should always set _charsWritten.koichik2011-09-031-0/+13
| | | | Refs #1633.
* buffer: Avoid overrun with 'binary' encoding.koichik2011-09-021-0/+6
| | | | Fixes #1624.
* util: isRegExp() should not call toString() on its argumentNathan Rajlich2011-08-251-0/+33
| | | | | | | An overloaded toString() method may have side effects so don't call it for a simple type check. Back-port of 54b409d to the v0.4 branch.
* Fix #1563. overflow in ChildProcess custom_fd.Ryan Dahl2011-08-201-0/+9
| | | | Backported from master f5db3f1f859427d2b1252f937a45409c5d4eb38b
* test: add test for #1202, uncatchable exception on bad host nameBen Noordhuis2011-08-121-0/+70
|
* Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty'isaacs2011-08-111-1/+6
|
* Fix http.ClientRequest crashes if end() was called twicekoichik2011-07-301-0/+38
| | | | | Fixes #1417. Fixes #1223.
* Fix crypto encryption/decryption with Base64.SAWADA Tadashi2011-07-231-0/+19
| | | | | Fixes #738. Fixes #1205.
* http: fix setting ServerResponse.statusCode in writeHeadTrent Mick2011-07-211-0/+66
| | | | Fixes #1374.
* Close #1360 url: Allow _ in hostnames.isaacs2011-07-191-0/+9
|
* Properly respond to HEAD during end(body) hot pathReid Burke2011-07-201-0/+55
| | | | | | | | | | | | | | During write(), _hasBody is checked to make sure a body is allowed -- this is now also checked during end(body) when write() isn't used. Concise final chunk for HEAD req's res.end(data). Instead of simply clearing data, check _hasBody earlier to avoid sending cruft when chunkedEncoding is used. Fixes #1291.
* Add tests for #1085 and #1304koichik2011-07-152-0/+90
| | | | Fixes #1327.
* Fix Buffer drops last null character in UTF-8koichik2011-07-141-0/+27
| | | | | | | | | | | | | | | | | Reproduce: $ node > buf = new Buffer('\0') <Buffer > > buf.length 0 > buf = new Buffer(1) <Buffer 28> > buf.write('\0') 0 Fixes #394. Fixes #1210.
* Improvements AssertionError messagekoichik2011-07-141-0/+31
| | | | Fixes #217.
* Revert 3e2a2a7. Always send a HTTP/1.1 status line to the client.Ben Noordhuis2011-07-071-1/+1
|
* Test cases for #1234: don't send HTTP/1.1 responses to HTTP/1.0 clients.Ben Noordhuis2011-07-051-30/+142
|
* Clean up temporary file on exit.Ben Noordhuis2011-07-051-3/+10
| | | | | Unbreaks test/simple/test-http-get-pipeline-problem.js, it assumed a fixed number of files in the tmp directory.
* Fixes #877. Don't wait for socket pool to establish connections.Ryan Dahl2011-07-011-0/+49
| | | | Thanks to Yann Biancheri for putting together an initial test.
* Fix -e/--eval can't load module from node_moduleskoichik2011-06-201-0/+35
| | | | | | | | | | | | With -e or --eval, require() can load module using relative path. node -e 'require("./foo")' But it can't load module from node_modules directory. node -e 'require("foo")' Fixes #1196.
* Closes #1177 remove one node_modules optimizationMathias Buus2011-06-141-6/+0
| | | | to better support certain project structures.
* Support for signature verification with RSA/DSA public keysMark Cavage2011-06-143-0/+37
| | | | Fixes #1166.
* Close #562 Close #1078 Parse file:// urls properlyRyan Petrello2011-05-271-2/+28
| | | | | | | | | | | | | | | | | | | 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'.
* Fix error handling bug in stream.pipe()Felix Geisendörfer2011-05-241-0/+58
| | | | | | | | | | | | | | | | | | 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.
* CryptoStream.prototype.readyState shoudn't reference fdRyan Dahl2011-05-201-0/+5
| | | | Fixes #1069
* Add test for agent upgrade and example in docsDavid Trejo2011-05-191-0/+90
|
* Fix buffer testRyan Dahl2011-05-191-1/+3
|
* makeFastBuffer should not segfault but rather throw on non-bufferRyan Dahl2011-05-191-0/+4
|
* Remove 'binary' encoding assert - add testsRyan Dahl2011-05-161-0/+15
| | | | | Don't write large characters to buffers with binary encoding. You will be silently injured.
* Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"koichik2011-05-161-0/+6
| | | | Fixes #1038
* Fix event listener leak check timingkoichik2011-05-141-0/+29
| | | | Fixes #1041.
* Error argument for http.ServerRequest 'close'Felix Geisendörfer2011-05-144-4/+155
| | | | | | | | | | | 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.
* Make https 'timeout' events bubble upFelix Geisendörfer2011-05-141-0/+50
| | | | Also adds a test case for it.
* Fix a url regressionisaacs2011-05-101-0/+26
| | | | | | | | 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.
* cleartextstream.destroy() should destroy socket.Ryan Dahl2011-05-022-1/+5
| | | | | | This fixes a critical bug see in MJR's production. Very difficult to build a test case. Sometimes HTTPS server gets sockets that are hanging in a half-duplex state.
* Fix SlowBuffer.write() with 'ucs2' throws ReferenceError.koichik2011-04-281-0/+5
|
* Close #974 Properly report traceless errors.isaacs2011-04-256-0/+111
| | | | Also, tests for the same.
* A test that running 100 stream pipes in parallel is okisaacs2011-04-221-0/+100
|
* Bump bounds on #897 test - was too small for slow machinesRyan Dahl2011-04-221-1/+1
|
* Fix timeouts with floating point numbers bugRyan Dahl2011-04-221-0/+14
| | | | fixes #897.
* Close #954 URL parsing/formatting correctionsisaacs2011-04-201-12/+106
| | | | | | | | 1. Allow single-quotes in urls, but escape them. 2. Add comments about which RFCs we're following for guidance. 3. Handle any invalid character in the hostname portion. 4. lcase protocol and hostname portions, since they are case-insensitive.
* Fix: Multiple pipes to the same stream were brokenFelix Geisendörfer2011-04-141-1/+20
| | | | | | | | | | When creating multiple .pipe()s to the same destination stream, the first source to end would close the destination, breaking all remaining pipes. This patch fixes the problem by keeping track of all open pipes, so that we only call end on destinations that have no more sources piping to them. closes #929
* Add os.cpus() and os.uptime() support for sunosScott McWhirter2011-04-131-8/+26
|