Commit Graph

1545 Commits (7bfa5cf284de1f1c00dafa651bff5ea225e98825)

Author SHA1 Message Date
Joshua Holbrook 4065b241e8 child_process: remove dummy "setsid" option setting 2012-02-29 02:06:20 +01:00
koichik 63431796f4 net: fix race write() before and after connect()
Fixes #2827.
2012-02-28 19:27:27 +09:00
AJ ONeal 7f58d207f3 [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings 2012-02-27 14:17:09 -08:00
Mathias Bynens 483edbdf1a punycode: Update to v1.0.0 2012-02-27 14:03:18 -08:00
isaacs dfed2cef75 Merge branch 'v0.6.11-release' into v0.6 2012-02-17 13:35:52 -08:00
isaacs a2851b6234 Revert "cluster: propagate bind errors"
This reverts commit 30e462e919.
2012-02-17 12:39:45 -08:00
Nathan Rajlich a118f21728 repl: make tab completion work on non-objects 2012-02-17 15:51:33 +01:00
Ben Noordhuis 30e462e919 cluster: propagate bind errors
This commit fixes a bug where the cluster module failed to propagate EADDRINUSE
errors.

When a worker starts a (net, http) server, it requests the listen socket from
its master who then creates and binds the socket.

Now, OS X and Windows don't always signal EADDRINUSE from bind() but instead
defer the error until a later syscall. libuv mimics this behaviour to provide
consistent behaviour across platforms but that means the worker could end up
with a socket that is not actually bound to the requested addresss.

That's why the worker now checks if the socket is bound, raising EADDRINUSE if
that's not the case.

Fixes #2721.
2012-02-16 23:47:17 +01:00
einaros 83fd1c1de5 Add WebSocket RFC6455 multiheader fields to the http parser. 2012-02-16 14:12:38 -08:00
Ben Noordhuis 2c07712860 http: allow multiple WWW-Authenticate headers 2012-02-16 14:11:49 -08:00
Ben Noordhuis 3415427dbf tls: mitigate session renegotiation attacks
The TLS protocol allows (and sometimes requires) clients to renegotiate the
session. However, renegotiation requires a disproportional amount of server-side
resources, particularly CPU time, which makes it a potential vector for
denial-of-service attacks.

To mitigate this issue, we keep track of and limit the number of renegotiation
requests over time, emitting an error if the threshold is exceeded.
2012-02-16 18:15:21 +01:00
Bert Belder d91bc7cb09 Windows: get rid of process._cwdForDrive() 2012-02-16 00:10:51 +01:00
koichik b19b8836c3 tls: Allow establishing secure connection on the existing socket 2012-02-14 11:53:05 -08:00
Seth Fitzsimmons 1ce14eca44 dgram: handle close of dgram socket before DNS lookup completes 2012-02-14 14:10:21 +01:00
Igor Zinkovsky c7771bc2ec set readable/writable for pipes 2012-02-10 11:28:43 -08:00
Ben Noordhuis 09c296b44d debugger: fix --debug-brk
Commit 840229a forgot to update the debugger special case in lib/module.js

Fixes #2710.
2012-02-07 23:16:40 +01:00
koichik 0f0af55a0a net: fix large file downloads failing
Fixes #2678.
2012-02-05 17:41:49 +09:00
Christopher Jeffrey f64989e63b fs: fix ReadStream fails to read from existing fd
A ReadStream constructed from an existing file descriptor failed to start
reading automatically. Avoids a userspace call to ReadStream.prototype._read().
2012-02-04 22:14:58 +01:00
Stefan Rusu 4671e54495 net: destroy socket on DNS error
The socket was never destroyed on DNS errors. This broke some clients, including
lib/https.js.
2012-02-04 00:40:53 +01:00
Bert Belder e5ea6ad0f0 _makeLong shouldn't turn the empty string into \\?\C:\ 2012-02-02 17:14:03 +01:00
Bert Belder a661830569 Run path.exists paths through _makeLong 2012-02-02 17:14:01 +01:00
Philip Tellis 5166758927 Make QueryString.parse run faster
Use decodeURIComponent when appropriate, and only fall back to
querystring.decode if it throws, or if the character is a '+'.

Fix #2248
2012-02-01 16:04:01 -08:00
Ben Noordhuis 3deceaf6e7 Revert "Process symlinked shared library as .node"
This reverts commit 7e0bf7d57d.

It's possible to make GYP generate an XCode project that produces a .node file,
hence this commit is no longer needed.
2012-02-01 22:49:56 +01:00
Paddy Byers 7e0bf7d57d Process symlinked shared library as .node 2012-01-31 17:50:16 -08:00
Paddy Byers 840229a825 Tidy _resolveFilename 2012-01-31 17:50:11 -08:00
koichik 3fd13c6426 http: fix free http-parser too early
when the status code is 100 (Continue).

Fixes #2636.
2012-01-31 00:16:01 +09:00
Ben Noordhuis b221fe9b29 timers: add v0.4 compatibility hack
If a timer callback throws and the user's uncaughtException handler ignores the
exception, other timers that expire on the current tick should still run.

If #2582 goes through, this hack should be removed.

Fixes #2631.
2012-01-30 14:12:23 +01:00
Fedor Indutny ccf7b41a69 module: fix --debug-brk on symlinked scripts
* fixes #1519
2012-01-24 19:07:38 +01:00
Ben Noordhuis 2775c0e97e dgram: bring back setTTL() 2012-01-24 00:11:45 +01:00
Ben Noordhuis 46e86aa803 dgram: bring back setMulticastLoopback() 2012-01-24 00:11:45 +01:00
Ben Noordhuis 6999fb3d1e dgram: make addMembership() and dropMembership() conform to v0.4 API
- throw on error, don't return an error code
2012-01-24 00:05:34 +01:00
Ben Noordhuis fc6a9673c8 dgram: make setBroadcast() conform to v0.4 API
- don't return a value
2012-01-24 00:05:34 +01:00
Ben Noordhuis ed111975a0 dgram: make setMulticastTTL() conform to v0.4 API
- throw if the ttl argument is not a number
- return the ttl argument (not particulary useful but it's what v0.4 did)

Note that the 0 < ttl < 256 check has *not* been reinstated. On Linux, -1 is a
valid argument to setsockopt(IPPROTO_IP, IP_TTL).
2012-01-24 00:05:34 +01:00
Brandon Benvie f9014438c7 util: use getOwnPropertyDescripter
Change formatProperty in util.js to use Object.getOwnPropertyDescriptor
instead of __lookup[GS]etter__.

Use the cached value from the descriptor to reduce number of property
lookups from 3 to 1.

Fallback to standard lookup if the descriptor is empty. This doesn't
ever happen with normal JS objects (this function is called only when
the key exists) but apparently does with Node's custom ENV interface.

Fixes: #2109.
2012-01-22 17:29:40 +09:00
koichik 3df7c90c30 http: keep-alive should default with HTTP/1.1 server
As RFC 2616 says we should, assume that servers will provide a persistent
connection by default.

> A significant difference between HTTP/1.1 and earlier versions of
> HTTP is that persistent connections are the default behavior of any
> HTTP connection. That is, unless otherwise indicated, the client
> SHOULD assume that the server will maintain a persistent connection,
> even after error responses from the server.

> HTTP/1.1 applications that do not support persistent connections MUST
> include the "close" connection option in every message.

Fixes #2436.
2012-01-22 14:55:41 +09:00
Dan VerWeire f2b1f57f74 dgram: reintroduce setMulticastTTL()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:26:09 +01:00
Dan VerWeire f749338e1e dgram: reintroduce setBroadcast()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:26:04 +01:00
Roman Shtylman a38fd6056c dgram: reintroduce addMembership() and dropMembership()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:21:51 +01:00
koichik 35fe3eb5c7 http: reduce creating http-parser instances
Fixes #2577.
2012-01-20 16:24:01 -08:00
Nicolas LaCasse 40c93486e8 Fix #2365 zlib crashing on invalid input
Fix zlib crashes on error due to improper use of removeListener
in the error handler
2012-01-20 13:12:32 -08:00
Brandon Benvie f7b612550a Add missing TTY key translations for F1-F5 on Windows 2012-01-18 16:00:55 +01:00
Bert Belder d489a01f81 Make path.extname do the right thing when the last path component is . or ..
Closes GH-2526
2012-01-18 15:21:58 +01:00
Ben Noordhuis d44ce97909 cluster: don't always kill the master on uncaughtException
uncaughtException handlers installed by the user override the default one that
the cluster module installs, the one that kills off the master process.

Fixes #2556.
2012-01-18 00:45:02 +01:00
Andreas Madsen ca6ededbd1 child_process: add errno property to exceptions
In case of a write failure when using fork() an error would be thrown. The
thrown exception was missing the `errno` property.
2012-01-17 18:37:02 +01:00
koichik 534df2f8d2 tls: fix double 'error' events on HTTPS Requests
Fixes #2549.
2012-01-17 17:09:27 +01:00
Ben Noordhuis f0c1376e07 net: make .write() throw on bad input
Passing a non-buffer or non-string argument to Socket.prototype.write triggered
an assert:

  Assertion failed: (Buffer::HasInstance(args[0])), function Write,
  file ../src/stream_wrap.cc, line 289.

Fixes #2532.
2012-01-14 02:13:24 +01:00
Ryunosuke SATO 22d7fe1206 events: fix checking max listeners with `1`
Fixes #2490.
2012-01-09 04:02:01 +01:00
koichik dd9593ccc4 http: fix ServerResponse does not emit 'close'
Refs #2453.
2012-01-06 15:45:21 +09:00
koichik baebd30eee http: use `self` insted of `this` 2012-01-05 17:43:00 +09:00
isaacs 8e57398b20 Fix #2034 repl message for .clear when useGlobal=true 2011-12-31 03:20:41 +01:00