0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00
Commit Graph

648 Commits

Author SHA1 Message Date
Ryan Dahl
0a0e90dcca Add broken test passing a buffer through http 2010-10-11 14:54:32 -07:00
Ryan Dahl
2944e03a03 Closer to a working pipe 2010-10-11 01:22:38 -07:00
Ryan Dahl
007881b648 No long have tcp module 2010-10-11 01:22:24 -07:00
Felix Geisendörfer
3cd09e7ba5 Stress test for http upload timeouts
This was meant to find a bug in setTimeout, but there doesn't seem to be
one. So this test can no help to prevent future regressions.
2010-10-11 00:25:48 -07:00
Ryan Dahl
1d3142a882 TCP clients should buffer writes before connection 2010-10-10 23:09:14 -07:00
Ryan Dahl
81ac0d5088 pipe-test fixes 2010-10-10 22:10:47 -07:00
Ryan Dahl
393f0071e4 Improve pipe-test. Still not working 2010-10-10 20:18:47 -07:00
Ryan Dahl
bc695475b9 Add Stream base class with stream.pipe 2010-10-10 17:27:03 -07:00
Joshaven Potter
3d4e4d8909 syntax fixes to pass jslint 2010-10-06 20:40:57 -07:00
isaacs
8ff7954165 Fix #325. Add test and check for zero-length file contents in fs.readFileSync 2010-10-04 12:50:58 -07:00
Ryan Dahl
38f8665f3a lib/http.js - nested loop stepping on variables of outer loop
Fixes #318.
2010-10-04 10:50:37 -07:00
isaacs
e9b6b0b327 Report "weird" errors a little better.
There are a few kinds of errors that are very confusing.
1. Errors raised in nextTick
2. Errors emitted on the "error" event
3. RangeErrors that crash the program (or anything without a stack trace)

Long traces will make make these better, of course.  In the meantime, this
adds a few handy signposts (in the form of better error reporting and
comments on the otherwise inscrutable code printed to the terminal) that can
help new users find the cause, or at least, ask for help more effectively.
2010-10-02 06:44:28 -07:00
Mark Nottingham
d59512f6f4 Add support for handling Expect: 100-continue
HTTP/1.1 requests, either with an event (check_continue) or automatically, if no event handler is present.

Add client-side expect/continue support, tests.

Expound upon client requirements for expect/continue.
2010-10-01 15:30:53 -07:00
Marco Rogers
4a7562d28f fix encoding option on ReadStream, updated test 2010-10-01 15:16:25 -07:00
Ryan Dahl
265cda97d7 Fix zero length buffer bug for http res.end()
Reported by Kadir Pekel <kadirpekel@gmail.com>
2010-09-30 17:13:01 -07:00
Mark Nottingham
1b24fc6678 Consume HTTP trailing headers 2010-09-30 16:30:40 -07:00
Ryan Dahl
ee9af66990 Add test for getting parse error from HTTP client
Made this test in response to this thread:
http://groups.google.com/group/nodejs/browse_thread/thread/f82835007a277de2/
But Node appears to be working correctly.
2010-09-30 11:48:19 -07:00
Fedor Indutny
5535aa3d51 Fixed 'upgrade' event for httpclient
onend and ondata was cleaning on parser end
2010-09-23 10:29:20 -07:00
isaacs
4d0456f827 Don't use stat in fs.readFile[Sync]
Original patch c/o Evan Larkin <evan.larkin.iit@gmail.com>
2010-09-22 22:06:32 -07:00
Tj Holowaychuk
893ebe7230 Fixed fs.ReadStream() start: 0 bug 2010-09-22 10:22:43 -07:00
Mikeal Rogers
cc1d61cbb3 HTTP: close connection on connection:close header.
rnewson found a good bug in keep-alive. we were only using the request
headers we send to enable/disable keep-alive but when the server sends
Connection: close we need to close down the connection regardless.

I wrote up a patch the Robert verified makes all his test client code work
now and I also added a new unittest for it.
2010-09-22 10:17:07 -07:00
isaacs
dff1b5ad10 Don't try to run extension loaders unless they're actually functions 2010-09-22 10:13:25 -07:00
Ryan Dahl
1b1bee8099 Fix test/message/undefined_reference_in_new_context 2010-09-20 10:03:50 -07:00
Tim-Smart
0f16af7ee4 Remove registerExtension, add .extensions. Tests.
Updated extensions tests
2010-09-20 09:56:43 -07:00
isaacs
bb08f0c219 Remove require.async
This patch removes require.async from nodejs.

1. It complicated the code unnecessarily.
2. Everyone uses sync require anyway.
3. It's got a lot of weird edge cases when mixed with sync require.
4. It is many months behind the commonjs spec anyhow.
2010-09-19 16:52:39 -07:00
Ryan Dahl
db73c71280 Pass correct message in HTTP client upgrade
Simplify and correct test.

Fix by Fedor Indutny.
2010-09-19 11:55:18 -07:00
Ryan Dahl
4962702e4a Revert requireNative changes: 4e6b9b0, d429033, 6abbfa0, bcad540
The REPL needs the full require(); add test for that behavior.
2010-09-19 11:22:15 -07:00
Ryan Dahl
776754c33f Remove process._byteLength 2010-09-17 01:06:44 -07:00
Ryan Dahl
9628e28aec Remove process.evalcx 2010-09-17 00:23:27 -07:00
Ryan Dahl
bbbcd1fee0 Safe constructors for fs.ReadStream and fs.WriteStream 2010-09-16 19:04:09 -07:00
Paul Querna
c8f9728de7 Move dns.isIP to net.isIP
Add tests and docs.
2010-09-16 17:27:10 -07:00
Ryan Dahl
251d03197f Remove deprecation warnings in net module 2010-09-16 15:02:12 -07:00
Ryan Dahl
f47ad10db7 Remove a few old deprecation warnings 2010-09-15 16:18:54 -07:00
Sam Stephenson
6560ab9073 Send multiple header lines in ServerResponse#writeHead when header values are arrays 2010-09-15 15:55:30 -07:00
Ryan Dahl
feea1330cc Make a list of known globals
And fix missing var!

It would be good to get this script running at the end of every test, so we
know that modules aren't leaking either - but it will require a lot
modification of the tests so that they themselves aren't leaking globals.
2010-09-14 23:03:29 -07:00
Ryan Dahl
77fc61d539 Default value for second arg of Buffer#slice 2010-09-14 15:39:27 -07:00
Mark Nottingham
4fe3007a1a Support for outgoing HTTP trailing headers 2010-09-14 15:20:45 -07:00
Ryan Dahl
83ff473d30 Use child_process.exec rather than sys.exec 2010-09-14 10:29:56 -07:00
isaacs
686d9f9cc6 Bug in realpath with symlinks to absolute folder paths which have children.
Found by Cliffano Subagio
http://groups.google.com/group/nodejs/browse_thread/thread/f46f093938265ac0/387e14da08c7dd7b?
2010-09-14 10:27:57 -07:00
Peter Griess
422d3c93bc Get rid of PHP/Rails style parameter munging.
- Handle only the most basic of query string parsing and construction.
  Leave the rest (e.g. Rails/PHP behaviors) to modules higher up the
  stack, like Express.
2010-09-13 12:39:30 -07:00
Tony Metzidis
debf389490 Catch Exceptions thrown when openssl is disabled 2010-09-13 12:04:31 -07:00
Paul Querna
9a701b0a70 Expose fingerproint from getPeerCertificate
Expose the SHA1 digest of the certificate as the fingerprint attribute in
the object returned by getPeerCertificate()
2010-09-09 23:35:17 -07:00
Ryan Dahl
3a9570386a Fix fs.realpathSync('/') 2010-09-09 18:49:28 -07:00
isaacs
85fb47c11c Better temporary directory handling for tests.
Add a setUp and tearDown function to the test case class, and use it to
create and remove the test/tmp directory for each test.

TODO: amend other tests.
2010-09-09 16:43:18 -07:00
Ryan Dahl
7628905a9b Don't use empty.js - breaks module test 2010-09-09 16:22:57 -07:00
Felix Geisendörfer
f870240dcf Simple benchmark for node's startup time 2010-09-09 15:51:17 -07:00
Ryan Dahl
efc723787a Fix big string bug 2010-09-09 11:03:50 -07:00
Ryan Dahl
3e9f636b64 Improve long buffer test 2010-09-09 11:03:50 -07:00
Ryan Dahl
8078ed1f86 Expose fast-buffer bug in tests 2010-09-09 11:03:50 -07:00
Ryan Dahl
7b772f3f68 More fast buffer work 2010-09-09 11:03:48 -07:00