Граф коммитов

1425 Коммитов

Автор SHA1 Сообщение Дата
Igor Zinkovsky 3060266ff1 windows: enable pending accepts knob 2011-11-01 14:14:52 -07:00
Ben Noordhuis 37bb37d151 os: rename getNetworkInterfaces() to networkInterfaces() 2011-11-01 18:10:06 +01:00
koichik f53d092a2a tls, https: add passphrase option
Fixes #1925.
2011-10-31 17:36:43 +09:00
koichik 8a729270c1 fix for --harmony_block_scoping
Fixes #1969.
2011-10-31 00:49:20 +09:00
Siddharth Mahendraker 12cf730b69 events: separate maxListeners and _events
Fixes #1479.
Fixes #1923.
2011-10-30 02:14:30 +01:00
Tj Holowaychuk 528c28587f cluster: Add some docs, improve cluster.isWorker()
Fixes #1949.
2011-10-26 16:42:00 -07:00
Ryan Dahl c5d54010bc node cluster is now a module instead of CLI interface
This is to make room for master process plugins instead of adding CLI
options as proposed in #1879.
2011-10-26 13:50:53 -07:00
Nathan Rajlich ebefe77bc0 More bulletproof `util.inspect()` function.
Use the *real* versions of the Date and RegExp functions, from the
prototype. This defends against code like:

  var d = new Date()
  d.toUTCString = null
  util.inspect(d)
    // TypeError: toUTCString is not a function

Fixes #1944.
2011-10-27 04:58:34 +09:00
Nathan Rajlich 2dbb470ea1 Don't use `instanceof` in lib/util.js "is" checks.
While using `instanceof`, these functions could easily be faked with something
like:  Object.create(Date.prototype)

So let's just not use it at all. A little slower, but these functions are only
used in the REPL / for debugging so it's OK.

Fixes #1941.
Fixes #1942.
2011-10-27 04:33:24 +09:00
Nathan Rajlich b8f3e18a5d Export the type checking functions from `util.js`.
As per discussion at:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/b08970166e4670cf
2011-10-27 03:38:29 +09:00
koichik cbcaeedba9 tls: add address(), remoteAddress/remotePort
Fixes #758.
Fixes #1055.
2011-10-27 00:28:16 +09:00
koichik 0e8a55d2a2 tls: does not emit 'end' from EncryptedStream
de09168 and 4cdf9d4 breaks `test/pummel/test-https-large-response.js`.
It is never finished.

Fixes #1936.
2011-10-27 00:18:29 +09:00
Nathan Rajlich 58cb0fa639 Directly export the Stream constructor.
Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.

Fixes #1933
2011-10-24 15:45:35 -07:00
Ryan Dahl 239b3d62de Remove resume and pause events
Too complex; unnecessary.
2011-10-24 13:23:59 -07:00
isaacs 4c5751ba97 Close #1929 zlib Respond to 'resume' events properly 2011-10-24 12:55:45 -07:00
Maciej Małecki 7ee29d1d5b net: `Server.listen`, `Server.close` and `Socket.connect` return `this`
Just a syntactic sugar for doing, for example:

    var server = net.createServer(function (c) {
      c.end('goodbye, cruel world!\r\n');
      server.close().on('close', function () {
        console.log('really, goodbye!');
      });
    }).listen(1337);

Fixes #1922.
2011-10-24 22:19:42 +09:00
seebees 216570b5e1 Lint 2011-10-22 14:14:40 +09:00
seebees 1ead20f274 remove auth from host
Fixes #1626
2011-10-22 14:14:40 +09:00
seebees 005d607aed http.request(url.parse(x))
http2.js

protocols object to store defaults for http and https, and use as a switch for supported protocols.
options.hostname > options.host > 'localhost'
if I have an options.auth element and I do not have an Authorization header, I do basic auth.
http.request collapses to new ClientRequest since the defaults are handled by the protocol object

test-http-url.parse*

Fixes #1390

Conflicts:

	lib/http2.js
2011-10-22 14:14:40 +09:00
seebees be4576de7a url.resolveObject(url.parse(x), y) == url.parse(url.resolve(x, y));
added a .path property = .pathname + .search for use with http.request

And tests to verify everything.
With the tests, I changed over to deepEqual, and I would note the comment on the test
['.//g', 'f:/a', 'f://g'], which I think is a fundamental problem

This supersedes pull 1596
2011-10-22 14:14:39 +09:00
Nathan Rajlich bdb9d09aef Print out `undefined` on the REPL when returned.
util.inspect() has a special case for "undefined", so it's nice to be able to
distinguish visually that undefined is the result of an expression.
2011-10-22 14:02:35 +09:00
Ben Noordhuis ac379b3be1 net: bring back .setNoDelay() and .setKeepAlive() 2011-10-21 18:09:23 -07:00
Ryan Dahl 493d3b9f7c Merge remote branch 'origin/v0.4'
Conflicts:
	ChangeLog
	Makefile
	deps/libev/wscript
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	src/platform_cygwin.cc
	test/pummel/test-net-write-callbacks.js
	test/simple/test-buffer.js
2011-10-21 18:02:30 -07:00
Ryan Dahl d5a21a29f8 getaddrinfo returns ENOTFOUND for invalid domain names
change test-http-dns-error to reflect this.
2011-10-21 15:19:53 -07:00
Ryan Dahl de09168e5a Emit 'end' from crypto streams on close
Fixes test/simple/test-tls-peer-certificate.js on Windows

Patch from bnoordhuis.

See also 75a0cf970f
2011-10-21 13:16:41 -07:00
isaacs 2d02e6a992 Add useGlobal flag for standard node repl 2011-10-21 13:02:49 -07:00
isaacs caf70f5e94 Revert "Don't use a separate context for the repl."
This reverts commit b70fed48a7.
2011-10-21 13:00:37 -07:00
Ben Noordhuis 84d0b1bcc5 http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
2011-10-20 19:19:02 -07:00
Ryan Dahl c83dda89a4 dns.lookup uses cares_wrap::GetAddrInfo 2011-10-20 18:03:02 -07:00
Nathan Rajlich 95d530f2b4 repl: print out `undefined`
util.inspect() has a special case for "undefined", so it's nice to be able to
distinguish visually that undefined is the result of an expression.
2011-10-20 08:41:33 -07:00
Fedor Indutny b43eb9678b debugger: fix backtrace err handling 2011-10-20 08:37:51 -07:00
isaacs b70fed48a7 Don't use a separate context for the repl.
Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
2011-10-18 18:18:32 -07:00
Ryan Dahl 6cc0c9e6a9 Remove superfluous nextTick during server binding
This breaks fork().send({}, server._handle) after server.listen() because
server._handle is not set.
2011-10-18 15:12:18 -07:00
Ryan Dahl d77ce4b998 Fixes #1860. Remove process.writeError
Breaks a few tests in "make test-message"
2011-10-18 13:12:50 -07:00
Yoshihiro Kikuchi f90ba61478 http: tiny fix in http.js
Fixes #1885.
2011-10-17 01:14:45 +09:00
koichik d6191f593d net: fix error handling in listen()
Fixes #1894.
2011-10-16 01:30:19 +09:00
koichik 68cc173c6d tls: The TLS API is inconsistent with the TCP API
Add 'secureConnect' event to tls.CleartextStream.

Fixes #1467.
2011-10-15 19:27:21 +09:00
Ben Noordhuis 0b92fa0e93 net: fix connect queue bugs
This commit fixes two bugs in the handling of write requests when the connect()
call is still in progress.

1. The deferred write request's size was counted twice towards `.bytesWritten`.

2. The callback was not called. After connecting, `Socket.write()` was called
   with three arguments (data, encoding, cb) but it ignored the third argument.

Coincidentally fixes test/simple/test-net-connect-buffer.js.
2011-10-15 03:34:09 +02:00
Ben Noordhuis 6df574b744 net: properly account multi-byte chars in .bytesWritten 2011-10-15 03:24:34 +02:00
koichik 19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
koichik a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00
isaacs 59a5262041 Fix #1882 zlib Update 'availOutBefore' value, and test 2011-10-13 16:47:51 -07:00
Simen Brekken 4b0e36810a net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
2011-10-13 16:09:14 +02:00
Ryan Dahl 3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Ryan Dahl 7b4370e5f8 Fix test/pummel/test-watch-file.js 2011-10-12 16:19:46 -07:00
Ryan Dahl 651b8a06d6 Fix test/pummel/test-exec.js 2011-10-12 16:12:24 -07:00
Daniel Ennis 59be975322 Improve IPC performance.
Reading of JSON data off the buffer, 10-15% performance increase.

Fixes #1864.
2011-10-12 15:06:51 -07:00
Ryan Dahl 25ff181300 Revert some changes made in 12486a6
Some of the perf improvements from many-writes-fix branch were accidentally
undone in that commit. This puts them back in.
2011-10-12 12:49:58 -07:00
Ryan Dahl 87339a22b1 introduce node cluster 2011-10-12 02:58:35 -07:00
Ryan Dahl cdf5d91fe5 Remove tty_legacy 2011-10-11 13:41:33 -07:00