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

1604 Commits

Author SHA1 Message Date
Ben Noordhuis
808b7ada07 doc: fix broken links in blog footer
The blog lives at blog.nodejs.org while the main website lives at
nodejs.org. Ergo, use absolute URLs for links to the main website.

Fixes #5062.
2013-03-18 14:41:51 +01:00
JeongHoon Byun
f217b5ed62 doc: fix typo in crypto docs 2013-03-17 13:45:14 +01:00
Yi EungJun
852444a720 doc: https: Fix the link to tls.connect 2013-03-16 23:52:39 +01:00
koichik
1f53cfdeae doc: don't mark fs callbacks as optional
Refs #5005, #5008
2013-03-14 13:06:49 -07:00
Adam Malcontenti-Wilson
028c630ecd doc: change dgram to socket for properties of dgram.Socket
Fixes #4919.
2013-03-14 12:55:19 +01:00
Ben Noordhuis
fa05e8a270 doc: implicit fs callbacks don't throw in v0.10
But they will in v0.12.

Re #5005.
2013-03-13 15:34:18 -07:00
Ben Noordhuis
7b7235a232 doc: add note on process.title max length
Fixes #5006.
2013-03-13 23:27:16 +01:00
Ben Noordhuis
9af0085f70 doc: path.join() arguments must be strings
In v0.8, non-string arguments were ignored. v0.10 throws an exception.
2013-03-13 18:42:04 +01:00
isaacs
7a07b31a2f blog: Fix typo in typo fix 2013-03-13 10:15:30 -07:00
Nathan Rajlich
598b5e4593 blog: fix small typo in v0.10.0 release article 2013-03-12 19:00:48 -07:00
Ben Noordhuis
da10bb85ff doc: events: add 'removeListener' event section
Amends commit 84221fd by (also) documenting the 'removeListener' event
in a dedicated section, like the 'newListener' event.

Fixes #4977.
2013-03-12 00:07:18 +01:00
isaacs
228ad9357c blog: Post about v0.10.0 2013-03-11 10:19:19 -07:00
isaacs
061a7ddbff Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	src/node_version.h
2013-03-08 18:59:44 -08:00
isaacs
b3cbb16f41 zlib: Manage flush flags appropriately
If you call z.flush();z.write('foo'); then it would try to write 'foo'
before the flush was done, triggering an assertion in the zlib binding.

Closes #4950
2013-03-08 18:56:31 -08:00
Ben Noordhuis
96a314b68b buffer: strip high bits when converting to ascii
Consider the following example:

  console.log(Buffer('ú').toString('ascii'));

Before this commit, the contents of the buffer was used as-is and hence it
prints 'ú'.

Now, it prints 'C:'. Perhaps not much of an improvement but it conforms to what
the documentation says it does: strip off the high bits.

Fixes #4371.
2013-03-08 14:42:15 -08:00
Andreas Madsen
bdf7ac2c5d child_process: support sending dgram socket
child.send can send net servers and sockets. Now that we have support
for dgram clusters this functionality should be extended to include
dgram sockets.
2013-03-07 17:51:17 +01:00
Ben Noordhuis
71694361f9 doc: dgram: add v0.10 bind() behavior note
dgram.Socket#bind() is always asynchronous now. Add a note at the top
of the documentation that explains how to upgrade.

Fixes #4944.
2013-03-07 14:13:42 +01:00
Ben Noordhuis
924f603e26 doc: dgram: document bind() callback argument 2013-03-07 14:11:46 +01:00
isaacs
9c5812574f blog: Post for v0.8.22 2013-03-06 16:22:23 -08:00
isaacs
f780c6f598 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	deps/npm/html/api/bin.html
	deps/npm/html/api/bugs.html
	deps/npm/html/api/commands.html
	deps/npm/html/api/config.html
	deps/npm/html/api/deprecate.html
	deps/npm/html/api/docs.html
	deps/npm/html/api/edit.html
	deps/npm/html/api/explore.html
	deps/npm/html/api/help-search.html
	deps/npm/html/api/init.html
	deps/npm/html/api/install.html
	deps/npm/html/api/link.html
	deps/npm/html/api/load.html
	deps/npm/html/api/ls.html
	deps/npm/html/api/npm.html
	deps/npm/html/api/outdated.html
	deps/npm/html/api/owner.html
	deps/npm/html/api/pack.html
	deps/npm/html/api/prefix.html
	deps/npm/html/api/prune.html
	deps/npm/html/api/publish.html
	deps/npm/html/api/rebuild.html
	deps/npm/html/api/restart.html
	deps/npm/html/api/root.html
	deps/npm/html/api/run-script.html
	deps/npm/html/api/search.html
	deps/npm/html/api/shrinkwrap.html
	deps/npm/html/api/start.html
	deps/npm/html/api/stop.html
	deps/npm/html/api/submodule.html
	deps/npm/html/api/tag.html
	deps/npm/html/api/test.html
	deps/npm/html/api/uninstall.html
	deps/npm/html/api/unpublish.html
	deps/npm/html/api/update.html
	deps/npm/html/api/version.html
	deps/npm/html/api/view.html
	deps/npm/html/api/whoami.html
	deps/npm/html/doc/README.html
	deps/npm/html/doc/adduser.html
	deps/npm/html/doc/bin.html
	deps/npm/html/doc/bugs.html
	deps/npm/html/doc/build.html
	deps/npm/html/doc/bundle.html
	deps/npm/html/doc/cache.html
	deps/npm/html/doc/changelog.html
	deps/npm/html/doc/coding-style.html
	deps/npm/html/doc/completion.html
	deps/npm/html/doc/config.html
	deps/npm/html/doc/dedupe.html
	deps/npm/html/doc/deprecate.html
	deps/npm/html/doc/developers.html
	deps/npm/html/doc/disputes.html
	deps/npm/html/doc/docs.html
	deps/npm/html/doc/edit.html
	deps/npm/html/doc/explore.html
	deps/npm/html/doc/faq.html
	deps/npm/html/doc/folders.html
	deps/npm/html/doc/global.html
	deps/npm/html/doc/help-search.html
	deps/npm/html/doc/help.html
	deps/npm/html/doc/index.html
	deps/npm/html/doc/init.html
	deps/npm/html/doc/install.html
	deps/npm/html/doc/json.html
	deps/npm/html/doc/link.html
	deps/npm/html/doc/ls.html
	deps/npm/html/doc/npm.html
	deps/npm/html/doc/outdated.html
	deps/npm/html/doc/owner.html
	deps/npm/html/doc/pack.html
	deps/npm/html/doc/prefix.html
	deps/npm/html/doc/prune.html
	deps/npm/html/doc/publish.html
	deps/npm/html/doc/rebuild.html
	deps/npm/html/doc/registry.html
	deps/npm/html/doc/removing-npm.html
	deps/npm/html/doc/restart.html
	deps/npm/html/doc/rm.html
	deps/npm/html/doc/root.html
	deps/npm/html/doc/run-script.html
	deps/npm/html/doc/scripts.html
	deps/npm/html/doc/search.html
	deps/npm/html/doc/semver.html
	deps/npm/html/doc/shrinkwrap.html
	deps/npm/html/doc/star.html
	deps/npm/html/doc/stars.html
	deps/npm/html/doc/start.html
	deps/npm/html/doc/stop.html
	deps/npm/html/doc/submodule.html
	deps/npm/html/doc/tag.html
	deps/npm/html/doc/test.html
	deps/npm/html/doc/uninstall.html
	deps/npm/html/doc/unpublish.html
	deps/npm/html/doc/update.html
	deps/npm/html/doc/version.html
	deps/npm/html/doc/view.html
	deps/npm/html/doc/whoami.html
	deps/npm/man/man1/ls.1
	deps/npm/man/man1/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/npm-registry-client/lib/publish.js
	deps/npm/node_modules/npm-registry-client/package.json
	deps/npm/package.json
	doc/blog/feature/streams2.md
2013-03-06 15:43:02 -08:00
isaacs
277a2545d2 blog: Update streams2 feature post to match actual doc 2013-03-06 14:19:16 -08:00
isaacs
116d6c4402 blog: Post for 0.9.12 2013-03-06 13:57:57 -08:00
isaacs
d258fb0212 http: More useful setTimeout API on server
This adds the following to HTTP:

* server.setTimeout(msecs, callback)
  Sets all new connections to time out after the specified time, at
  which point it emits 'timeout' on the server, passing the socket as an
  argument.
  In this way, timeouts can be handled in one place consistently.
* req.setTimeout(), res.setTimeout()
  Essentially an alias to req/res.socket.setTimeout(), but without
  having to delve into a "buried" object.  Adds a listener on the
  req/res object, but not on the socket.
* server.timeout
  Number of milliseconds before incoming connections time out.
  (Default=1000*60*2, as before.)

Furthermore, if the user sets up their own timeout listener on either
the server, the request, or the response, then the default behavior
(destroying the socket) is suppressed.

Fix #3460
2013-03-06 12:43:48 -08:00
isaacs
b0f6789a78 stream: Remove bufferSize option
Now that highWaterMark increases when there are large reads, this
greatly reduces the number of calls necessary to _read(size), assuming
that _read actually respects the size argument.
2013-03-06 11:44:30 -08:00
isaacs
5038f40185 node: Add --throw-deprecation
Extremely handy when tracking down a flood of recursive nextTick warnings.
2013-03-06 11:44:29 -08:00
isaacs
426b4c6258 stream: _write takes an encoding argument
This vastly reduces the overhead of decodeStrings:false streams,
such as net and http.
2013-03-05 14:27:15 -08:00
isaacs
cd68d86c32 stream: Remove output function from _transform
Just use stream.push(outputChunk) instead.
2013-03-05 14:27:15 -08:00
Paolo Fragomeni
8e2376b376 Update domain.markdown 2013-03-05 08:15:54 -08:00
Ben Noordhuis
862f7b850d Merge remote-tracking branch 'origin/v0.8' 2013-03-05 15:43:03 +01:00
Ben Noordhuis
ecf9f606c9 doc: add url.resolve() usage examples
Fixes #4913.
2013-03-04 20:54:36 +01:00
Rod Vagg
a6a1659d85 link to LevelUP modules wiki page, not level-hooks 2013-03-03 22:12:53 -08:00
Rod Vagg
906f824bab link to LevelUP modules wiki page, not level-hooks 2013-03-03 22:12:09 -08:00
isaacs
e428bb7eae cluster: Rename destroy() to kill(signal=SIGTERM)
Fix #4133, bringing the cluster worker API more in line with the
child process API.
2013-03-03 17:26:38 -08:00
Aaron Cannon
0c57b31190 doc: Add crypto.pseudoRandomBytes, fix typo 2013-03-03 15:30:49 -08:00
Ben Noordhuis
2d51036fb9 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	doc/api/http.markdown
	test/simple/test-crypto.js
2013-03-02 23:13:35 +01:00
Trevor Norris
75305f3bab events: add check for listeners length
Ability to return just the length of listeners for a given type, using
EventEmitter.listenerCount(emitter, event). This will be a lot cheaper
than creating a copy of the listeners array just to check its length.
2013-03-01 17:36:47 -08:00
Lars-Magnus Skog
4b20f3440d doc change for Readable._read() 2013-03-01 16:33:48 -08:00
isaacs
fc22986023 doc: Clarify advisory-ness of stream._read() argument 2013-03-01 14:26:35 -08:00
Gil Pedersen
13c8bc8917 doc: Update to reflect new _read() interface 2013-03-01 14:23:51 -08:00
Evan Oxfeld
16ddc545bd doc: Fix readable.unshift() example
Slice the portion of the buffer to unshift back into the read queue
2013-03-01 14:21:34 -08:00
isaacs
be770a3839 blog: Post about v0.9.11 2013-03-01 11:24:46 -08:00
isaacs
0928a526dd fs: Support mode/flag options to read/append/writeFile
Fix #4841
2013-03-01 09:48:57 -08:00
isaacs
4926ffd14b doc: Provide 2 examples of SimpleProtocol parser
The first example uses Readable, and shows the use of
readable.unshift().  The second uses the Transform class, showing that
it's much simpler in this case.
2013-02-28 17:38:17 -08:00
Eugene Girshov
50ba0f27d9 doc: remove note about close event 2013-03-01 00:01:06 +01:00
Ben Noordhuis
cb87920ba9 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/src/unix/pipe.c
	lib/http.js
	src/node_version.h
2013-02-28 16:58:24 +01:00
Ben Noordhuis
522668b5d9 doc: update instructions on home page
Document how to run the example on the home page in more detail.

Apparently our Windows brethren are prone to double-clicking on the
binary instead of running it from the command line.

Fixes #4854.
2013-02-28 16:30:46 +01:00
isaacs
82357b87eb blog: Update with EINPROGRESS changelog item 2013-02-25 14:17:11 -08:00
isaacs
f8ae4446ee blog: Post for v0.8.21 2013-02-25 13:56:46 -08:00
Ben Noordhuis
22d3eff8f4 doc: add note about child process line buffering
Fixes #4808.
2013-02-22 01:19:40 +01:00
isaacs
3b2e9d2648 stream: remove lowWaterMark feature
It seems like a good idea on the face of it, but lowWaterMarks are
actually not useful, and in practice should always be set to zero.

It would be worthwhile for writers if we actually did some kind of
writev() type of thing, but actually this just delays calling write()
and the overhead of doing a bunch of Buffer copies is not worth the
slight benefit of calling write() fewer times.
2013-02-21 15:23:18 -08:00
isaacs
3267464586 blog: v0.9.10 2013-02-19 14:01:23 -08:00
isaacs
75df612cd7 doc: Use 'close' rather than 'exit' in spawn examples
Close #4515
2013-02-18 11:24:14 -08:00
isaacs
d75e39794b Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	lib/http.js
	src/node_version.h
	test/simple/test-http-header-response-splitting.js
2013-02-18 10:21:08 -08:00
Shigeki Ohtsu
401cef797d doc: add setImmediate execute timing description 2013-02-15 16:11:05 -08:00
isaacs
3f38069acf blog: Release v0.8.20 2013-02-15 11:24:20 -08:00
Ben Noordhuis
3e2be6f39f doc: clarify child_process.exec() stdio option
It only works for stdin, not stdout/stderr, for obvious reasons.
2013-02-14 19:42:14 +01:00
Dan Kohn
2e1ebbf2c5 doc: add prompt to fix repl_test.js example
Running repl.start without the prompt set produces this error:

repl.js:95
    throw new Error('An options Object, or a prompt String are required');
          ^
Error: An options Object, or a prompt String are required
    at new REPLServer (repl.js:95:11)
    at Object.exports.start (repl.js:321:14)
    at Object.<anonymous> (/Users/dan/Dropbox/Documents/dev/nextgen/repl_test.js:5:6)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-02-13 16:40:27 +01:00
Ben Noordhuis
3f7e88a852 buffer: accept negative indices in Buffer#slice()
A negative start or end parameter now indexes from the end of the
buffer. More in line with String#slice() and ArrayBuffer#slice().
2013-02-12 17:09:19 -08:00
isaacs
82ad5fbe9a blog: Forgot slug on peer-dependencies article 2013-02-12 16:30:25 -08:00
isaacs
6dcadb9fc8 blog: Peer Dependencies article
Thanks, @domenic
2013-02-12 12:03:52 -08:00
Ben Noordhuis
30b0bc4fa9 doc: update buffer/typed array documentation
Clarify that typed array constructors accept buffers as their first
argument but that the memory is not shared and why this was changed
in v0.9.
2013-02-10 21:57:32 +01:00
Nathan Rajlich
1ba39226b2 doc: document the writable.end() callback function
Support for it was added in a9c4a20331.
2013-02-09 10:34:18 -08:00
isaacs
2810b1ab00 blog: v0.9.9 is unstable, not stable 2013-02-07 10:35:35 -08:00
isaacs
e4d97b1dca blog: v0.9.9 2013-02-07 10:34:45 -08:00
Nikhil Marathe
6bcd9a4c94 Update http docs with http.IncomingMessage.
http.ServerRequest and http.ClientResponse are merged into http.IncomingMessage
which has fields for both, and acts as a Readable Stream and EventEmitter.

Fixes #3851.
2013-02-07 18:07:21 +04:00
isaacs
5cc3569f6d Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	deps/npm/html/api/bin.html
	deps/npm/html/api/bugs.html
	deps/npm/html/api/commands.html
	deps/npm/html/api/config.html
	deps/npm/html/api/deprecate.html
	deps/npm/html/api/docs.html
	deps/npm/html/api/edit.html
	deps/npm/html/api/explore.html
	deps/npm/html/api/help-search.html
	deps/npm/html/api/init.html
	deps/npm/html/api/install.html
	deps/npm/html/api/link.html
	deps/npm/html/api/load.html
	deps/npm/html/api/ls.html
	deps/npm/html/api/npm.html
	deps/npm/html/api/outdated.html
	deps/npm/html/api/owner.html
	deps/npm/html/api/pack.html
	deps/npm/html/api/prefix.html
	deps/npm/html/api/prune.html
	deps/npm/html/api/publish.html
	deps/npm/html/api/rebuild.html
	deps/npm/html/api/restart.html
	deps/npm/html/api/root.html
	deps/npm/html/api/run-script.html
	deps/npm/html/api/search.html
	deps/npm/html/api/shrinkwrap.html
	deps/npm/html/api/start.html
	deps/npm/html/api/stop.html
	deps/npm/html/api/submodule.html
	deps/npm/html/api/tag.html
	deps/npm/html/api/test.html
	deps/npm/html/api/uninstall.html
	deps/npm/html/api/unpublish.html
	deps/npm/html/api/update.html
	deps/npm/html/api/version.html
	deps/npm/html/api/view.html
	deps/npm/html/api/whoami.html
	deps/npm/html/doc/README.html
	deps/npm/html/doc/adduser.html
	deps/npm/html/doc/bin.html
	deps/npm/html/doc/bugs.html
	deps/npm/html/doc/build.html
	deps/npm/html/doc/bundle.html
	deps/npm/html/doc/cache.html
	deps/npm/html/doc/changelog.html
	deps/npm/html/doc/coding-style.html
	deps/npm/html/doc/completion.html
	deps/npm/html/doc/config.html
	deps/npm/html/doc/dedupe.html
	deps/npm/html/doc/deprecate.html
	deps/npm/html/doc/developers.html
	deps/npm/html/doc/disputes.html
	deps/npm/html/doc/docs.html
	deps/npm/html/doc/edit.html
	deps/npm/html/doc/explore.html
	deps/npm/html/doc/faq.html
	deps/npm/html/doc/folders.html
	deps/npm/html/doc/global.html
	deps/npm/html/doc/help-search.html
	deps/npm/html/doc/help.html
	deps/npm/html/doc/index.html
	deps/npm/html/doc/init.html
	deps/npm/html/doc/install.html
	deps/npm/html/doc/json.html
	deps/npm/html/doc/link.html
	deps/npm/html/doc/ls.html
	deps/npm/html/doc/npm.html
	deps/npm/html/doc/outdated.html
	deps/npm/html/doc/owner.html
	deps/npm/html/doc/pack.html
	deps/npm/html/doc/prefix.html
	deps/npm/html/doc/prune.html
	deps/npm/html/doc/publish.html
	deps/npm/html/doc/rebuild.html
	deps/npm/html/doc/registry.html
	deps/npm/html/doc/removing-npm.html
	deps/npm/html/doc/restart.html
	deps/npm/html/doc/rm.html
	deps/npm/html/doc/root.html
	deps/npm/html/doc/run-script.html
	deps/npm/html/doc/scripts.html
	deps/npm/html/doc/search.html
	deps/npm/html/doc/semver.html
	deps/npm/html/doc/shrinkwrap.html
	deps/npm/html/doc/star.html
	deps/npm/html/doc/start.html
	deps/npm/html/doc/stop.html
	deps/npm/html/doc/submodule.html
	deps/npm/html/doc/tag.html
	deps/npm/html/doc/test.html
	deps/npm/html/doc/uninstall.html
	deps/npm/html/doc/unpublish.html
	deps/npm/html/doc/update.html
	deps/npm/html/doc/version.html
	deps/npm/html/doc/view.html
	deps/npm/html/doc/whoami.html
	deps/npm/man/man1/global.1
	deps/npm/man/man1/ls.1
	deps/npm/man/man1/npm.1
	deps/npm/man/man1/rm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/glob/glob.js
	deps/npm/node_modules/glob/package.json
	deps/npm/node_modules/node-gyp/package.json
	deps/npm/node_modules/npm-registry-client/package.json
	deps/npm/node_modules/npmconf/package.json
	deps/npm/node_modules/read-installed/package.json
	deps/npm/node_modules/rimraf/package.json
	deps/npm/node_modules/rimraf/rimraf.js
	deps/npm/package.json
	deps/uv/src/win/error.c
	doc/api/crypto.markdown
	lib/zlib.js
	src/node_version.h
	src/node_zlib.cc
	test/simple/test-buffer.js
2013-02-06 16:29:30 -08:00
isaacs
13897279ae blog: v0.8.19 release 2013-02-06 09:48:20 -08:00
Ben Noordhuis
5fe05464cb doc: don't suggest to reuse net.Socket objects
Using Socket.prototype.connect() to reconnect an existing Socket object
is not reliable. Users should just create a new Socket object.

See #4698.
2013-02-05 12:50:48 +01:00
isaacs
9a488a667c blog: Correct shasums for v0.9.8 release 2013-02-02 11:14:42 -08:00
Ben Noordhuis
3fe6aba558 os: rename tmpDir() to tmpdir() for consistency
Make the casing consistent with the other os.* functions but keep
os.tmpDir() around as an alias.
2013-01-30 04:24:58 +01:00
Rick Yakubowski
5abde8161a doc: fix typo in cluster module documentation
Fix a small typo in the cluster.settings documentation.
2013-01-27 00:25:35 +01:00
isaacs
bdc7251b64 doc: fix line wrapping in addons.markdown 2013-01-25 14:27:46 -08:00
Rod Vagg
f210710795 doc: NODE_MODULE() to pass full module to addons
mainly to allow native addons to export single functions on `exports`
rather than being restricted to operating on an existing `exports`
object.

added link to addons repo in docs
2013-01-25 14:26:52 -08:00
Trevor Norris
49175e6ae2 buffer: clean up copy() asserts and tests
Argument checks were simplified by setting all undefined/NaN or out of
bounds values equal to their defaults.

Also copy() tests had a flaw that each buffer had the same bit pattern at
the same offset. So even if the copy failed, the bit-by-bit comparison
would have still been true. This was fixed by filling each buffer with a
unique value before copy operations.
2013-01-25 11:59:21 +01:00
Sugendran Ganess
83154aa15d doc: Connecting debugger to existing node process 2013-01-24 17:16:19 -08:00
Andy Burke
595b5974d7 Add bytesWritten to tls.CryptoStream
This adds a proxy for bytesWritten to the tls.CryptoStream.  This
change makes the connection object more similar between HTTP and
HTTPS requests in an effort to avoid confusion.

See issue #4650 for more background information.
2013-01-24 16:48:49 -08:00
Jacob Gable
34131af606 doc: fix typo in crypto Hash.digest() note
Added the word 'has' to the sentence.
Closes #4652.
2013-01-24 12:42:53 -08:00
isaacs
7f6054ca81 blog: Post for v0.9.8 2013-01-24 10:32:35 -08:00
Fedor Indutny
82f1d340c1 tls: make slab buffer's size configurable
see #4636
2013-01-24 08:47:07 -08:00
Raynos
444bbd4fa7 streams: Support objects other than Buffers
We detect for non-string and non-buffer values in onread and
turn the stream into an "objectMode" stream.

If we are in "objectMode" mode then howMuchToRead will
always return 1, state.length will always have 1 appended
to it when there is a new item and fromList always takes
the first value from the list.

This means that for object streams, the n in read(n) is
ignored and read() will always return a single value

Fixed a bug with unpipe where the pipe would break because
the flowing state was not reset to false.

Fixed a bug with sync cb(null, null) in _read which would
forget to end the readable stream
2013-01-24 07:49:27 -08:00
Trevor Norris
3d286b68be buffer: remove float write range checks
Removed range checks when writing float values, and removed a few
includes and defines. Also updated api docs to reflect that invalid 32
bit float is an unspecified behavior.
2013-01-23 13:55:04 +01:00
Tim
d5a5901346 doc: Fix syntax in cluster example code 2013-01-21 19:17:01 -08:00
Yi EungJun
33d22428fb doc: Add NODE_DEBUG env to the first example.
The first example in cluster.markdown requires NODE_DEBUG env to show
debug message.

And also fix the message because it was a little bit different with
the actual message.
2013-01-18 13:18:37 -08:00
isaacs
3d7818fc42 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	src/node_version.h
	test/simple/test-buffer.js
2013-01-18 12:58:16 -08:00
isaacs
9c2c845463 blog: Post for v0.8.18 release 2013-01-18 12:54:22 -08:00
isaacs
1c35ee8695 blog: Post for v0.9.7 release 2013-01-18 11:48:21 -08:00
isaacs
ee2fd79e43 doc: Remove mention of child.send 'track' option
Will be removed very soon.  No point making it public.
2013-01-18 11:04:10 -08:00
Fedor Indutny
4488a69fac child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want to receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-18 03:13:41 +04:00
Fedor Indutny
44cd121c63 Revert "child_process: do not keep list of sent sockets"
This reverts commit db5ee0b3de.
2013-01-18 03:13:10 +04:00
Fedor Indutny
db5ee0b3de child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want `server.connections` to be a reliable
  number, and receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-17 13:46:31 -08:00
Ryunosuke SATO
562d3f11f3 doc: modify documentation style about 'Stability: 5'
'Stability: 5' is described as 'Locked' not as 'API Locked'
in other documents.

For example:
- `/doc/api/assert.markdown`
- `/doc/api/util.markdown`

This word was injected in 192192a.
2013-01-17 13:51:21 +01:00
isaacs
4c9de9d716 blog: release v0.9.6 2013-01-11 11:24:37 -08:00
isaacs
97db62b4d9 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	Makefile
	src/node_version.h
2013-01-11 10:18:07 -08:00
isaacs
a993f740f0 stream: Add readable.push(chunk) method 2013-01-10 13:49:53 -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
Tim Bradshaw
e6acfed9cc doc: os.cpus() returns times in milliseconds 2013-01-08 05:38:36 +01:00
Bradley Meck
70ad9bbcbd child_process: make fork() execPath configurable
Allows for arbitrary path to executable spawned using `fork`. This
fixes some issues around running multiple versions of node with workers
and allows arbitrary IPC with compatible executables.

Fixes #3248.
2013-01-06 22:55:30 +01:00
James Hight
3f76419a04 net: add localAddress and localPort to Socket 2013-01-05 17:05:13 +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
Ben Noordhuis
a7d8c21bca Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	configure
	deps/uv/src/unix/core.c
	deps/uv/test/test-fs-event.c
	src/node_version.h
2013-01-03 20:02:31 +01:00
isaacs
44ceb5d8f5 blog: Post for v0.9.5 2012-12-29 17:26:32 -08:00
isaacs
ec8ebaf300 domain: use camelCase instead of snake_case
While it's true that error objects have a history of getting snake_case
properties attached by the host system, it's a point of confusion to
Node users that comes up a lot.  It's still 'experimental', so best to
change this sooner rather than later.
2012-12-29 10:37:31 -08:00
Luke Arduini
192192a09e Colorize API stabilitity index headers in docs
Noted in @shtylman's #3898, API stability notes are easy to overlook
in the html documentation. This can be especially troublesome if the API
is deprecated. This commit gives visual feedback by adding in a class
to the html docs when they're generated. The API headers with
corresponding colors are also listed in the 'About this Documentation'
page for easy reference.
2012-12-27 18:38:56 -08:00
Andreas Madsen
ce30683012 doc: document the finish event
Since the stream implementer is not expected to overwrite
.end() the finish event is necessary in order to know when
no more data can be written
2012-12-26 14:56:02 -08:00
isaacs
6738e68592 blog: Post about v0.9.4 2012-12-21 12:37:39 -08:00
isaacs
982981442d doc: Nudge formatting to make json generator happy
Starting a line with `**bold**` text makes it think that it's a link,
and get confused.

This should really be fixed properly in the doc generator, but for now,
it's not a major issue.  It's probably just a matter of updating marked.
2012-12-21 11:32:29 -08:00
isaacs
f119effc9f Merge remote-tracking branch 'ry/v0.8' 2012-12-21 11:08:32 -08: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
79ae8b7ae2 Merge remote-tracking branch 'origin/v0.8' 2012-12-20 12:39:04 +01:00
Farid Neshat
dcaebec208 fs: add autoClose=true option to fs.createReadStream 2012-12-20 11:25:39 +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
isaacs
20a88feb8f docs: streams2 2012-12-14 10:52:29 -08:00
isaacs
4a32d53155 doc: Crypto streaming interface 2012-12-14 10:52:27 -08:00
isaacs
77ed12fe7a Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/test/test-spawn.c
	deps/uv/uv.gyp
	src/cares_wrap.cc
	src/node.cc
	src/node_version.h
	test/simple/test-buffer.js
	tools/gyp/pylib/gyp/common.py
	tools/install.py
2012-12-13 16:57:58 -08:00
isaacs
45cdb0e4c1 blog: Post for 0.8.16 2012-12-13 11:50:47 -08: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
Ben Noordhuis
5b65638124 tls, https: add tls handshake timeout
Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.

Adds a new tls.Server and https.Server configuration option, handshakeTimeout.

Fixes #4355.
2012-12-06 17:39:24 +01:00
Ben Noordhuis
3ece130ea2 process: add getgroups(), setgroups(), initgroups()
DRY the getuid(), getgid(), etc. functions while we're at it.
2012-12-06 17:14:58 +01:00
Ben Noordhuis
a80434736b fs: fix 'object is not a function' callback errors
Use a default callback if the user omitted one. Avoids errors like the one
below:

  fs.js:777
      if (err) return callback(err);
                      ^
  TypeError: object is not a function
          at fs.appendFile (fs.js:777:21)
          at Object.oncomplete (fs.js:297:15)

This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile()
when the callback is omitted. Before, they silently swallowed errors.

Fixes #4352.
2012-12-04 08:05:55 +01:00
Lewuathe
4d0fcd515f Fix dropped html tag 2012-11-30 18:14:26 -08:00
Kyle Robinson Young
acad8d9a77 website: typo fixes 2012-11-29 23:00:09 +01:00
Ryunosuke SATO
83161455bd doc: Fix missing link target to 'https.request()' 2012-11-27 18:11:40 -08:00
isaacs
122ac4e1f2 blog: Post for v0.8.15 2012-11-26 09:20:07 -08:00
Trevor Norris
bb867c0fa6 doc: Add lines about additonal uses of Buffer
That Buffers can be used with Typed Array Views and DataViews. Included
are a couple simple examples.

Closes #4257.
2012-11-22 09:30:18 -08:00
Tim Kuijsten
6f9ed28fac doc: fix typo in setPrivateKey function signature 2012-11-20 18:02:56 +01:00
Stephen Gallagher
38809e3985 build: allow linking against system libuv 2012-11-16 23:34:13 +01:00
Nathan Rajlich
5e4e87ade5 os: add os.endianness() function 2012-11-08 12:31:45 -08:00
Stephen Gallagher
73ff653a8d build: allow linking against system c-ares 2012-11-06 00:18:35 +01:00
Stephen Gallagher
bfd78b69fc build: allow linking against system http_parser 2012-11-06 00:18:35 +01:00
Francois Marier
44dd2c392a doc: remove duplicate set of options 2012-10-30 01:20:17 +01:00
Francois Marier
326bce91d6 doc: reflect hostname v. host preference in examples
The documentation for http.request and https.request states that
`hostname` is preferred over `host` so the code examples should
use that option name.
2012-10-29 20:34:03 +01:00
isaacs
5f0a10ad21 blog: Correct shasums for v0.8.14 2012-10-25 14:42:47 -07:00
isaacs
7fe1671727 blog: Post for v0.8.14 2012-10-25 14:17:43 -07:00
isaacs
d130bb060e blog: Post for v0.8.13 2012-10-25 12:54:00 -07:00
Ben Noordhuis
9b61f570d8 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	configure
	deps/v8/build/common.gypi
2012-10-25 16:08:58 +02:00
isaacs
82a72e9591 blog: Post for v0.9.3 release 2012-10-24 10:08:58 -07:00
Olivier Lalonde
626db18635 doc: child_process: document uid and gid spawn() options 2012-10-24 01:24:00 +02:00
isaacs
f3621359f4 doc: OpenSSL is bundled now. 2012-10-23 10:48:51 -07:00
isaacs
76b0bdf720 crypto: Add crypto.DEFAULT_ENCODING (defaults to 'buffer')
This is a flag to make it easier for users to upgrade through the
breaking crypto change, and easier for us to switch it back if it's a
problem.

Explicitly set default encoding to 'buffer' in other tests, in case it
ever changes back.
2012-10-23 10:48:51 -07:00
isaacs
bfb9d5bbe6 crypto: Binding only accepts buffers 2012-10-23 10:48:50 -07:00
isaacs
9901b69c8e crypto: Move encoding logic to JS, default=buffer
crypto: Hash and Hmac default to buffers

crypto: Move Cipher encoding logic to JS

crypto: Move Cipheriv encoding logic to JS

crypto: Move Decipher encoding logic to JS

crypto: Move Decipheriv into JS, default to buffers

crypto: Move Sign class to JS

crypto: Better encoding handling in Hash.update

crypto: Move Verify class to JS

crypto: Move DiffieHellman to JS, default to buffers

crypto: Move DiffieHellmanGroup to JS, default to buffers

Also, create a test for this feature
2012-10-23 10:22:42 -07:00
Ben Noordhuis
d0227b0308 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	deps/openssl/openssl.gyp
2012-10-21 23:06:48 +02:00
isaacs
627f0d27e8 doc: Typo. s/arguemnt/argument/ 2012-10-16 10:59:23 -07:00
Jan Lehnardt
a7b5938715 docs: fix copy and paste error 2012-10-14 14:47:02 +02:00
Nathan Rajlich
4b238b4c2a Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/test/runner-win.c
	doc/api/process.markdown
	lib/repl.js
	src/node_crypto.cc
	src/node_version.h
2012-10-13 16:16:56 -07:00
Ben Noordhuis
4a23add90f doc: rectify http.ClientResponse close/end events
* The 'close' event doesn't emit an error object.

* It's possible for a 'close' event to come after an 'end' event, contrary to
  what the documentation said.

Fixes #4116.
2012-10-13 15:17:51 +02:00
Ben Noordhuis
14a6c4efb8 crypto: add crypto.getHashes() 2012-10-13 02:55:14 +02:00
Ben Noordhuis
f53441ab1f crypto: add crypto.getCiphers()
Returns a list of, unsurprisingly, the available ciphers.
2012-10-13 01:49:57 +02:00
Max Ogden
323bbdb0cb doc: set default background color to white 2012-10-13 00:54:21 +02:00
isaacs
b3536ae0a8 blog: Post about 0.8.12 2012-10-12 08:57:12 -07:00
isaacs
061f2075cf string_decoder: Add 'end' method, do base64 properly 2012-10-11 16:46:18 -07:00
isaacs
99b2368a6c doc: Reduce crypto stability to 2-Unstable 2012-10-11 08:32:46 -07:00
Nathan Rajlich
4eb5399bb2 util: add a "customInspect" option to util.inspect()
For disabling calling the custom `inspect()` function when defined on an object
that is being inspected.
2012-10-10 14:40:36 -07:00
Nathan Rajlich
07774e6b95 util: make inspect() accept an "options" argument
Consolidates all the formatting options into an "options" object argument.
This is so that we don't have to be constantly remembering the order of
the arguments and so that we can add more formatting options easily.

Closes #4085.
2012-10-10 13:31:47 -07:00
Ben Noordhuis
0ad005852c https: fix renegotation attack protection
Listen for the 'clientError' event that is emitted when a renegotation attack
is detected and close the connection.

Fixes test/pummel/test-https-ci-reneg-attack.js
2012-10-09 16:38:00 +02:00
Andreas Madsen
be5a8e24c2 doc: consistent use of the callback argument 2012-10-08 22:58:11 +02:00
Nathan Rajlich
f826b3269d doc: document the custom "inspect()" function behavior
Closes #3361.
2012-10-05 16:48:13 -07:00
isaacs
836a06fc4f Revert "http: make http.ServerResponse emit 'end'"
This reverts commit 790d651f0d.

This makes Duplex streams unworkable, and would only ever be a special
case for HTTP responses, which is not ideal.

Intead, we're going to just bless the 'finish' event for all Writable
streams in 0.10
2012-10-03 17:40:14 -07:00
Alex Kocharin
bf0bc3565b doc: better example for process.hrtime()
Fixes #3984.
2012-10-03 22:18:33 +02:00
Ben Noordhuis
b0d04ffbd8 doc: stream: clarify meaning of 'drain' some more
Courtesy of Lee Coltrane (@coltrane).
2012-10-03 13:38:03 +02:00
Ben Noordhuis
f624be4093 doc: stream: clarify meaning of 'drain' event 2012-10-03 00:49:27 +02:00
isaacs
b90c1502e5 doc: Correct stream.write fd mention
No streams actually work this way.
2012-10-01 14:30:02 -07:00
Paul Serby
41e53e5579 path: add platform specific path delimiter
Closes #3728
Closes #4071
2012-10-01 22:10:36 +02:00
isaacs
fa912c246c blog: s/LibUV/libuv/ 2012-09-30 15:47:27 -07:00
isaacs
d3e818cf8f blog: LXJS talk by @piscisaureus 2012-09-30 10:34:28 -07:00
isaacs
ae40f1c438 Merge remote-tracking branch 'ry/v0.8' into v0.8-merge
Conflicts:
	AUTHORS
	ChangeLog
	deps/openssl/openssl.gyp
	deps/uv/src/unix/linux/linux-core.c
	deps/uv/src/unix/process.c
	deps/uv/src/unix/stream.c
	deps/v8/src/arm/builtins-arm.cc
	deps/v8/src/arm/code-stubs-arm.cc
	deps/v8/src/arm/full-codegen-arm.cc
	lib/tls.js
	src/node_version.h
	test/simple/test-http-client-timeout-agent.js
2012-09-28 09:47:48 -07:00
Pavel Lang
b38277be26 http: add response.headersSent property
Boolean property getter. True if headers was sent, false otherwise.
2012-09-28 02:57:01 +02:00
isaacs
c08320c957 doc: Make the CLA more simple/sane
1. Emails should go to @isaacs, not emily.
2. Ask for the electronic signature first, not the printed faxed thing.
2012-09-27 13:25:55 -07:00
isaacs
dcc01df968 blog: Post about 0.8.11 2012-09-27 10:25:37 -07:00
isaacs
8ca44f9928 blog: Post about v0.8.10 2012-09-25 15:37:53 -07:00
Adam Blackburn
d5e9895ce0 doc: put API table of contents in alphabetical order 2012-09-25 14:38:36 +02:00
Ben Noordhuis
84221fd1d6 events: add 'removeListener' event 2012-09-22 03:48:59 +02:00
Ben Noordhuis
c4aedf8a2a doc: zlib: document flush() and reset() methods 2012-09-19 13:22:29 +02:00
Fedor Indutny
63ff449d87 crypto: bring module into modern age
Introduce 'buffer' encoding, allow returning and giving buffers as
arguments of 'crypto' routines.

Fix #3278
2012-09-18 10:58:37 +04:00
isaacs
43a2b29182 blog: Post for 0.9.2 2012-09-17 18:33:36 -07:00
Robin Lee
a08271c7a8 doc: fix three typos 2012-09-17 16:05:53 +02:00
Ben Noordhuis
35607f3a2d tls, https: validate server certificate by default
This commit changes the default value of the rejectUnauthorized option from
false to true.

What that means is that tls.connect(), https.get() and https.request() will
reject invalid server certificates from now on, including self-signed
certificates.

There is an escape hatch: if you set the NODE_TLS_REJECT_UNAUTHORIZED
environment variable to the literal string "0", node.js reverts to its
old behavior.

Fixes #3949.
2012-09-15 00:19:06 +02:00
isaacs
bb207c2827 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	ChangeLog
	src/node_version.h
	test/simple/test-util-inspect.js
2012-09-12 15:13:07 -07:00
Ben Noordhuis
58a5bc1ec7 doc: fs: clarfify fs.watch() documentation
fs.watch() is implemented on all supported platforms but, depending on the
object being watched, doesn't always work reliably (or at all).

Fixes #4005.
2012-09-12 17:08:32 +02:00
Ben Noordhuis
4870a4e3da doc: http: expand request.headers documentation 2012-09-12 02:46:53 +02:00
isaacs
d80de98e91 blog: Post for 0.8.9 2012-09-11 11:59:10 -07:00
isaacs
1c2982b94f Update doc and test for sunos/solaris switch 2012-09-11 10:57:25 -07:00
isaacs
6e0b8b169c doc: Fork me image should be full url 2012-09-11 08:45:25 -07:00
isaacs
e35cec5c05 doc: Put current version on homepage 2012-09-11 08:43:31 -07:00
isaacs
005ae23250 doc: Add Node Dublin to community page 2012-09-11 08:43:28 -07:00
Nathan Rajlich
dba47aefa5 docs: fix typo in Buffer#toJSON() docs 2012-09-09 11:15:45 -07:00
Nathan Rajlich
a4ef01df07 buffer: implement Buffer.prototype.toJSON()
Returns an Array-representation of the Buffer.
Closes #3905.
2012-09-09 11:04:16 -07:00
Pooya Karimian
0087bc6370 cluster.worker description and examples ere missing from the top level of docs 2012-09-06 22:00:05 +02:00
Fedor Indutny
8e0c830cd0 tls: async session storage 2012-09-05 02:01:54 +04:00
Ben Noordhuis
790d651f0d http: make http.ServerResponse emit 'end'
This used to be the internal 'finish' event. Make it public so API users will
know when the response has been sent completely.

Fixes #3855.
2012-09-04 22:07:48 +02:00
Bert Belder
6174ea6b4c doc: don't use &apos;
Ref: #3964
2012-09-04 21:15:39 +02:00
Ben Noordhuis
972cdf82f1 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	deps/uv/include/uv.h
	src/node_crypto.cc
2012-09-04 15:02:20 +02:00
Atsuya Takagi
9f57e422cf doc: fix typo in api/cluster 2012-09-04 00:41:40 +02:00
Ankur Oberoi
a57d31595d doc: fix grammar errors 2012-08-30 00:27:00 +02:00