0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

637 Commits

Author SHA1 Message Date
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
Ryan Dahl
d5bdda74c1 fast buffer bounds checking in copy() 2010-09-09 11:03:48 -07:00
Felix Geisendörfer
ef54777fa5 Fix: uncaughtException was broken for main module
See: 635986e433
2010-09-09 10:47:30 -07:00
Ryan Dahl
17f3ffa633 Call Tick() after coming out of select()
Previously we would only call it before going into select(). This is needed
to fix test/simple/test-next-tick-ordering2.js.
2010-09-09 10:30:43 -07:00
isaacs
ba0c32e2e1 Fix issue #262. Allow fs.realpath to traverse above the current working directory. 2010-09-08 17:35:58 -07:00
Tobie Langel
512016fd74 Test for ReadStream typo 2010-09-08 12:09:13 -07:00
Tobie Langel
ccf4afa256 Do not emit WriteStream's drain event before ws.write has been called. 2010-09-08 11:58:54 -07:00
Tobie Langel
f5e4047064 Avoid closing a WriteStream before it has been opened. 2010-09-08 11:51:29 -07:00
Herbert Vojčík
6789ab16d8 Modifying test-global to accomodate v8 inter-context 'global' protection. 2010-09-08 10:37:26 -07:00
Herbert Vojčík
2a03d5802b Removing test-global-between-modules.
Using "global" to push data to require()d modules
not supported under NODE_MODULE_CONTEXTS=1.
2010-09-08 10:36:45 -07:00
Felix Geisendörfer
cf4b5fc52a Test case showing a bug in nextTick ordering
nextTick should fire before setTimeout in this test, but it doesn't.
2010-09-07 22:37:14 -07:00
Ryan Dahl
1d0fb850d9 test-http-parser should not use private API 2010-09-07 17:17:12 -07:00