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

3431 Commits

Author SHA1 Message Date
Ryan Petrello
58a1d7ec30 Close #562 Close #1078 Parse file:// urls properly
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'.
2011-05-27 10:47:34 -07:00
Ben Noordhuis
eb4c9ed881 Fix resource leaks in node_crypto.cc
Fixes #1097.
2011-05-24 23:36:54 -07:00
Brian White
9b3472637e Crypto documentation fixes
Fixes #1104.
2011-05-24 23:35:18 -07:00
Felix Geisendörfer
2b91256c61 Fix error handling bug in stream.pipe()
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.
2011-05-24 10:50:33 -07:00
Brian White
d22259426c Fix incorrect documentation for assert.fail()
Fixes #1100.
2011-05-24 10:44:14 -07:00
Ryan Dahl
823604a4e0 Now working on v0.4.9 2011-05-21 00:10:23 -07:00
Ryan Dahl
7dd22c26e4 Bump to v0.4.8 2011-05-20 19:40:06 -07:00
Ryan Dahl
80b0225b98 Merge branch 'v8-3.1' into v0.4 2011-05-20 19:25:30 -07:00
Ryan Dahl
cee4ce39a9 Upgrade V8 to 3.1.8.16 2011-05-20 19:24:37 -07:00
Ryan Dahl
70dd6d4ea3 Fix TJ's assert error
Unable to reproduce but connect's "make test TESTS=test/static.test.js" does
it occasionally.
2011-05-20 15:41:04 -07:00
Mark Cavage
a55a9ff3c2 Additional docs for net.listenFD()
Fixes #1080.
2011-05-20 15:02:22 -07:00
Ryan Dahl
9c7f89bf56 CryptoStream.prototype.readyState shoudn't reference fd
Fixes #1069
2011-05-20 10:20:22 -07:00
Brian White
2de0611b43 Remove unused variable
Fixes #1077
2011-05-20 08:51:55 -07:00
David Trejo
8a0ac5b422 Add test for agent upgrade and example in docs 2011-05-19 18:44:42 -07:00
Alexandre Marangone
6c28fcf661 (char *) casting for all strings args to kstat function to avoid warnings
Fixes #1071.
2011-05-19 14:53:31 -07:00
Alexandre Marangone
5d9dc1c6d5 Adding os.totalmem() and os.freemem() for SunOS 2011-05-19 14:53:07 -07:00
Fedor Indutny
21724ecaec Share SSL context between server connections
Fixes #1073.
2011-05-19 14:45:42 -07:00
Ryan Dahl
6461af1baa Fix buffer test 2011-05-19 12:41:17 -07:00
Ryan Dahl
5e409c2f1a makeFastBuffer should not segfault but rather throw on non-buffer 2011-05-19 12:13:48 -07:00
David Trejo
f4e69e44ff readline docs 2011-05-18 21:13:49 -07:00
Ryan Dahl
63c0d71213 Changes for job bullets 2011-05-17 13:25:25 -07:00
Ryan Dahl
103a450d3a Remove 'binary' encoding assert - add tests
Don't write large characters to buffers with binary encoding. You will be
silently injured.
2011-05-16 15:01:33 -07:00
isaacs
249361cab7 Close #1054 More clear documentation for module system 2011-05-16 23:30:43 +02:00
Ryan Dahl
e83c6959db Disable compression with OpenSSL.
This improves memory and speed. Users may apply compression in "userland"
above the CryptoStream layer if they desire.
2011-05-16 10:33:19 -07:00
koichik
d4f82ea590 Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"
Fixes #1038
2011-05-16 10:21:16 -07:00
koichik
80c2fe9456 Fix event listener leak check timing
Fixes #1041.
2011-05-14 14:43:00 -07:00
koichik
56aa2fd4c3 Fix doc - missing dns.resolveNs() and dns.resolveCname()
Fixes #1039.
2011-05-14 14:36:58 -07:00
Felix Geisendörfer
9d717f6bef Update http.ServerRequest docs
The documentation for 'end' was wrong, and 'close' now has an `err`
parameter.
2011-05-14 14:21:41 -07:00
Felix Geisendörfer
e7ac6d8fcd Error argument for http.ServerRequest 'close'
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.
2011-05-14 14:15:31 -07:00
Felix Geisendörfer
1fde5f51b4 Make https 'timeout' events bubble up
Also adds a test case for it.
2011-05-14 13:38:04 -07:00
Ryan Dahl
9a3dd754be Add trademark stuff to homepage 2011-05-11 13:40:42 -07:00
isaacs
307f39ce9e Fix a url regression
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.
2011-05-10 13:57:25 -07:00
Ryan Dahl
11beac70e2 Docs: server.pause() server.address() socket.address() 2011-05-09 10:49:27 -07:00
Trevor Burnham
31ed87b0a9 Documenting require.main, fixing #997 2011-05-09 10:29:09 -07:00
Ryan Dahl
110f06578d Agent socket errors bubble up to req only if req exists
Fixes #836.
2011-05-07 12:30:58 -07:00
Marcel Laverdet
c2b5ea218c Attempt to connect to debug process more than once
The debugger would give up after only 100ms but on my system this
timeout isn't enough. The startup process is now modified to try 6
times every 50ms instead.

Fixes #1010.
2011-05-06 20:53:40 -07:00
Ryan Dahl
5ab3ea3955 Point changelog to correct branch
Fixes #1002. Thanks cjavapro.
2011-05-06 16:05:04 -07:00
Ryan Dahl
55bff5bab9 TLS: simplify logic 2011-05-06 17:06:36 -07:00
Ryan Dahl
fc8afd45c7 Fix crash in debugger 2011-05-05 16:52:05 -07:00
Ryan Dahl
ad487d3226 Add on('error') to http request example
for indexzero
2011-05-05 15:40:55 -07:00
Ryan Dahl
c409aab397 Assert, Debug output in normal default build 2011-05-04 21:41:01 -07:00
Ryan Dahl
75a0cf970f cleartextstream.destroy() should destroy socket.
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.
2011-05-02 15:03:50 -07:00
Ben Noordhuis
82bc25d5ad Remove oprofile flags in wscript.
V8 3.1.5 (commit 550f73a) dropped oprofile support so don't pass
prof=oprofile to scons.

See http://codereview.chromium.org/6474037/

Fixes #998.
2011-05-01 08:00:34 -07:00
Ryan Dahl
8d88c00b77 Merge branch 'v8-3.1' into v0.4 2011-04-30 11:38:55 -07:00
Ryan Dahl
eb57d1b9b1 Upgrade V8 to 3.1.8.14 2011-04-30 11:38:25 -07:00
koichik
fcc04e67c8 Fix SlowBuffer.write() with 'ucs2' throws ReferenceError. 2011-04-28 04:57:00 -04:00
koichik
1343ee8d54 Doc improvements. 2011-04-28 04:54:28 -04:00
isaacs
7c6f0147df Better stream.pipe() tracking.
This commit does three things:

1. Uses an exposed counter rather than a hidden array for tracking dest
streams that may have multiple inputs.  This allows for significantly
faster lookups, since the counter can be checked in constant time rather
than searching an array for the dest object.  (A proper O(1) WeakMap
would be better, but that may have to wait for Harmony.)

2. Calls the 'end' event logic when there is an 'error' event on the
source object (and then throws if there are no other error listeners.)
This is important, because otherwise 'error' events would lead to
memory leaks.

3. Clean up the style a bit.  Function Declarations are not allowed
within blocks in ES strict.  Prefer Function Declarations to Function
Expressions, because hoisting allows for more expressive ordering of
logic.

Downside: It adds "_pipeCount" as part of the Stream API.  It'll work
fine if the member is missing, but if anyone tries to use it for some
other purpose, it can mess things up.
2011-04-27 22:08:21 -07:00
isaacs
bbffd9e502 Close #983 Better JSON.parse error detection
Previous pattern would only catch ILLEGAL, not { or other
known-but-unexpected JSON tokens.
2011-04-26 09:48:28 -07:00
George Miroshnykov
68c8a69f4c Close #962: Fixed typo in vm.runInNewContext docs.
EDIT: Also added another typo fix to this commit. --isaacs
2011-04-25 13:45:58 -07:00