Commit Graph

7067 Commits

Author SHA1 Message Date
Fedor Indutny
e70d1bfe64 Revert "Revert "tls: allow wildcards in common name""
This reverts commit 30e237041d.

Works properly with b4b750b
2013-01-18 03:47:47 +04:00
Ben Noordhuis
30e237041d Revert "tls: allow wildcards in common name"
This reverts commit 45024e7b75.

It's making test/simple/test-tls-check-server-identity.js fail:

  AssertionError: Test#4 failed: { host: 'b.a.com',
    cert: { subject: { CN: '*.a.com' } },
    result: false }
      at <omitted>/test/simple/test-tls-check-server-identity.js:201:10
2013-01-17 16:32:00 +01:00
Ben Noordhuis
08ac9fe016 test: add cluster 'bind twice' test
This test starts two clustered HTTP servers on the same port.
It expects the first cluster to succeed and the second cluster
to fail with EADDRINUSE.

Reapplies commit cacd3ae, accidentally reverted in a2851b6.
2013-01-17 13:37:23 +01:00
Ben Noordhuis
498200b87c buffer: reject negative SlowBuffer offsets
Reject negative offsets in SlowBuffer::MakeFastBuffer(), it allows
the creation of buffers that point to arbitrary addresses.

Reported by Trevor Norris.
2013-01-17 01:22:11 +01:00
Chris Dent
6b4a93577b install: add simplejson fallback
Make tools/install.py work with python 2.5

2.5 is still fairly widespread and does not include a json lib as
standard. Most python folk will have simplejson if they are in that
boat.

In general it seems a bit tricky to solve this perfectly...
2013-01-15 09:34:07 +01:00
Bert Belder
a6b8f63660 buffer: zero-length buffers shouldn't be slab-backed 2013-01-14 22:20:03 +01:00
Fedor Indutny
45024e7b75 tls: allow wildcards in common name
see #4592
2013-01-14 21:31:34 +04:00
Ben Noordhuis
f3e78bd3c2 http: fix "Cannot call method 'emit' of null"
Fix the following exception:

  http.js:974
    this._httpMessage.emit('close');
                      ^
  TypeError: Cannot call method 'emit' of null
      at Socket.onServerResponseClose (http.js:974:21)
      at Socket.EventEmitter.emit (events.js:124:20)
      at net.js:421:10
      at process._tickCallback (node.js:386:13)
      at process._makeCallback (node.js:304:15)

Fixes #4586.
2013-01-14 17:28:32 +01:00
isaacs
4c9de9d716 blog: release v0.9.6 2013-01-11 11:24:37 -08:00
Nathan Rajlich
4fa3fd1cc0 make binary: allow custom config flags
For example, to cross-compile from my OS X laptop for Raspberry Pi, you would
do something like:

  $ make binary BINARYNAME=node-v`python tools/getnodeversion.py`-linux-arm-pi \
      DESTCPU=arm CONFIG_FLAGS="--dest-os=linux"
2013-01-10 17:05:14 -08:00
isaacs
8e37a589a6 blog, changelog: 0.8.17 was released in 2013, not 2012 2013-01-10 07:47:09 -08:00
isaacs
be54423782 blog: Correct shasums for v0.8.17 2013-01-09 19:05:37 -08:00
isaacs
6d9ee4b184 blog: Add security notice to v0.8.17 post 2013-01-09 17:21:16 -08:00
isaacs
1388171d96 blog: Post about v0.8.17 2013-01-09 17:08:24 -08:00
isaacs
daf4666963 Now working on 0.8.18 2013-01-09 17:07:33 -08:00
isaacs
c4b080f82d Merge branch 'v0.8.17-release' into v0.8 2013-01-09 17:07:21 -08:00
isaacs
c50c33e939 2012.01.09, Version 0.8.17 (Stable)
* npm: Upgrade to v1.2.0
  - peerDependencies (Domenic Denicola)
  - node-gyp v0.8.2 (Nathan Rajlich)
  - Faster installs from github user/project shorthands (Nathan Zadoks)

* typed arrays: fix 32 bit size/index overflow (Ben Noordhuis)

* http: Improve performance of single-packet responses (Ben Noordhuis)

* install: fix openbsd man page location (Ben Noordhuis)

* http: bubble up parser errors to ClientRequest (Brian White)
v0.8.17
2013-01-09 16:55:12 -08:00
Ben Noordhuis
ed825f4888 typed arrays: fix 32 bit size/index overflow
Fix an out-of-bound read/write bug due to integer wrapping. Reported by
Dean McNamee.
2013-01-10 00:55:27 +01:00
isaacs
aa742ddf80 npm: Upgrade to v1.2.0 2013-01-09 15:21:30 -08:00
Fedor Indutny
7a2ae4c930 object_wrap: add missing HandleScope
by Sven Panne's suggestion, see [0] for details.

[0]: https://code.google.com/p/v8/issues/detail?id=2468
2013-01-09 12:16:04 +04:00
Ben Noordhuis
ad6769fc92 dgram: don't assert on send('string')
Raise a TypeError when the argument to send() or sendto() is anything
but a Buffer.

Fixes the following assertion:

  $ node -e 'require("dgram").createSocket("udp4").send("BAM")'
  node: ../../src/udp_wrap.cc:220: static v8::Handle<v8::Value>
  node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
  `Buffer::HasInstance(args[0])' failed.
  Aborted (core dumped)

Fixes #4496.
2013-01-08 04:32:40 +01:00
Johannes Ewald
872cb0d7fa doc: improve example of process.hrtime()
The example clarifies now that diff[0] * 1000000000 + diff[1] equals
the result in nanoseconds.
2013-01-04 23:06:40 +01:00
Tim Bradshaw
50e88d0b66 os: change CPU time from Integer to Number
CPU time values must be Numbers, not Integers, as they can be too large
for Integers on 32 bit platforms.
2012-12-31 18:09:36 +01:00
Ben Noordhuis
acc085e131 doc: add CONTRIBUTING.md 2012-12-31 01:50:48 +01:00
isaacs
44ceb5d8f5 blog: Post for v0.9.5 2012-12-29 17:26:32 -08:00
Ben Noordhuis
a7cc53067d deps: upgrade libuv to 4997738 2012-12-29 17:34:41 +01:00
Maciej Małecki
c2e71dd51d build: allow to specify custom tags
When building custom `node` versions (e.g., floating features/fixes from
different versions) it's often useful to specify a custom tag which
easily identifies build when invoking `node -v`.

Introduce a way to specify this tag in `node_version.h` file or by
running `./configure --tag="<tag>"`. Insert it right after the patch
version (and before `-pre`, if build is not a release).
2012-12-26 20:15:17 -08:00
isaacs
54740c8b24 lint 2012-12-26 15:26:53 -08:00
isaacs
6738e68592 blog: Post about v0.9.4 2012-12-21 12:37:39 -08:00
isaacs
d30e76e0e8 npm: upgrade to 1.1.70 2012-12-21 16:42:29 +00:00
isaacs
9d0103d22e blog: More streams2 wordsmithing 2012-12-21 00:46:40 +00:00
isaacs
0c867ae618 blog: Update blog post re streams2 2012-12-21 00:08:50 +00:00
Ben Noordhuis
5a19c07c08 http: pack response body buffer in first tcp packet
Apply the same optimization to res.end(buf) that is applied to res.end(str).

Speeds up `node benchmark/http_simple_auto -k -c 1 -n 25000 buffer/1`
(non-chunked response body) by about 750x. That's not a typo.

Chunked responses:

  $ cat tmp/http-chunked-client.js
  // Run `node benchmark/http_simple` in another terminal.
  var http = require('http'), url = require('url');
  var options = url.parse('http://127.0.0.1:8000/buffer/1/1');
  options.agent = new http.Agent({ maxSockets: 1 });
  for (var i = 0; i < 25000; ++i) http.get(options);

Before:

  $ time out/Release/node tmp/http-chunked-client.js
  real    16m40.411s
  user    0m9.184s
  sys     0m0.604s

After:

  $ time out/Release/node tmp/http-chunked-client.js
  real    0m5.386s
  user    0m2.768s
  sys     0m0.728s

That's still a 185x speed-up.

Fixes #4415.
2012-12-20 12:02:06 +01:00
Ben Noordhuis
ba407ce410 bench: use res.end() for chunked encoding
Use res.end() for the final chunk so we can benchmark the 'hot path' shortcut
in lib/http.js that packs the headers and the body into a single packet.
2012-12-20 11:44:10 +01:00
isaacs
04adf0e5a1 blog: post about streams2 feature 2012-12-18 08:45:03 -08:00
Nicolas Chambrier
496c0bd936 doc: add Google+ French community 2012-12-17 17:21:35 +01:00
Ben Noordhuis
53b826e6ae install: fix openbsd man page location
Man pages go into $PREFIX/man on OpenBSD, not $PREFIX/share/man.
2012-12-17 12:05:14 +01:00
Brian White
827b2a9b0b http: bubble up parser errors to ClientRequest
Make parser errors bubble up to the ClientRequest instead of the underlying
net.Socket object.

This is a back-port of commit c78678b from the master branch.

Fixes #3776.
2012-12-16 17:25:03 +01:00
isaacs
45cdb0e4c1 blog: Post for 0.8.16 2012-12-13 11:50:47 -08:00
isaacs
953673424a Now working on 0.8.17 2012-12-13 11:50:35 -08:00
isaacs
a18507ce11 Merge commit 'v0.8.16' into v0.8 2012-12-13 11:50:15 -08:00
isaacs
1c9c6277d5 2012.12.13, Version 0.8.16 (Stable)
* npm: Upgrade to 1.1.69

* fs: fix WriteStream/ReadStream fd leaks (Ben Noordhuis)

* crypto: fix leak in GetPeerCertificate (Fedor Indutny)

* buffer: Don't double-negate numeric buffer arg (Trevor Norris)

* net: More accurate IP address validation and IPv6 dotted notation. (Joshua Erickson)
v0.8.16
2012-12-13 11:49:39 -08:00
isaacs
b09f97068e npm: Upgrade to v1.1.69 2012-12-12 14:41:28 -08:00
Ben Noordhuis
d65832ccd0 fs: fix WriteStream fd leak
Close the file descriptor when a write operation fails.

Fixes #4387.
2012-12-12 09:46:22 +01:00
Ben Noordhuis
6e97b2cc17 fs: fix ReadStream fd leak
Close the file descriptor when a read operation fails.

Fixes #4387.
2012-12-12 09:46:22 +01:00
Ben Noordhuis
65d824b488 test: add common.mustCall function
Verifies that the callback gets invoked <n> times during the lifetime of the
test script.

This is a back-port of commit d0e6c3f from the master branch.
2012-12-12 09:46:09 +01:00
isaacs
92e92b0215 doc: Add nodejstr to community page 2012-12-10 16:56:49 -08:00
Ben Noordhuis
c79fd0e167 doc: remove broken require.extensions example
Fixes #4384.
2012-12-06 21:58:36 +01:00
Fedor Indutny
276245d26f crypto: fix leak in GetPeerCertificate 2012-12-03 20:30:16 +04:00
Ben Noordhuis
e5649d4b3d tools: fix platform detection on freebsd, sunos
This is a back-port of upstream gyp commit r1482.
2012-12-02 03:01:20 +01:00