Commit Graph

1938 Commits (10703774f01a4005fc74d6b4131c713259e81657)

Author SHA1 Message Date
Julien Gilli 0c7f6ca830 Merge remote-tracking branch 'upstream/v0.10' into merge-0-10-into-0-12
Conflicts:
	AUTHORS
	ChangeLog
	configure
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/README.md
	deps/uv/config-unix.mk
	deps/uv/include/uv-private/uv-win.h
	deps/uv/include/uv.h
	deps/uv/src/unix/internal.h
	deps/uv/src/unix/kqueue.c
	deps/uv/src/unix/stream.c
	deps/uv/src/uv-common.c
	deps/uv/src/uv-common.h
	deps/uv/src/version.c
	deps/uv/src/win/poll.c
	deps/uv/test/test-osx-select.c
	deps/v8/src/debug-debugger.js
	deps/v8/src/isolate.cc
	deps/v8/src/isolate.h
	deps/v8/src/mirror-debugger.js
	doc/api/buffer.markdown
	doc/api/child_process.markdown
	doc/api/dns.markdown
	doc/api/tls.markdown
	doc/api/url.markdown
	lib/_stream_writable.js
	lib/assert.js
	lib/child_process.js
	lib/crypto.js
	lib/dgram.js
	lib/http.js
	lib/net.js
	lib/timers.js
	lib/tls.js
	src/node.cc
	src/node.h
	src/node.js
	src/node_crypto.cc
	src/node_version.h
	test/common.js
	test/simple/test-child-process-spawn-typeerror.js
	tools/certdata.txt
2015-01-12 15:59:37 -08:00
James M Snell 102a861ec2 doc: clarify buffer api documentation
Better wording for start and end parameters, also document .length
should be considered readonly.

RE: #8857, #8859, #8913
PR: #8910
PR-URL: https://github.com/joyent/node/pull/8910

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:24:28 -08:00
James M Snell 48536394c9 doc: clarify add/removeListener semantics
Clarify that adding or removing a listener is not idempotent.

RE: #8853
PR: #8911
PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:12:48 -08:00
Jackson Tian 890baa03a8 doc: add details for http res/req end callback
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-19 13:02:47 -08:00
Julien Gilli 542234ad98 doc: improve dns module's documentation
Make the difference between dns.lookup and other functions even clearer.

PR: #8747
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-17 11:54:31 -08:00
Ben Burns 5b9e5bdd03 doc: clarify create{Read,Write}Stream fd option
Clarify the fd option: it is preferred to the path parameter, omits
the "open" event if given, and is available on WriteStreams as well.

PR-URL: https://github.com/joyent/node/issues/7707
Fixes: https://github.com/joyent/node/issues/7707
Fixes: https://github.com/joyent/node/issues/7708
Fixes: https://github.com/joyent/node/issues/4367
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 22:25:58 -08:00
Julien Gilli 0603c8345b docs: clarify url.format documentation
The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Fixes #8796.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 12:29:36 -08:00
silverwind d230fa9eb7 doc: fix typo secureOptions in tls
Documentation mentioned 'securityOptions', where it should have read
'secureOptions'.

Fixes #8608.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-11 23:27:49 -08:00
pkcs 8120015f40 doc: clearer log messages in net code samples
Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-08 15:23:22 -08:00
Alejandro Oviedo f5cb330ab1 docs: fix streams example for write() after end()
Currently there's an example using http.ServerResponse stream, which
has a known bug and will not throw an error while writing after end().
Changed to a writable stream from fs which behaves as expected.

fix #8814

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-06 19:27:05 -08:00
Brendan Ashworth 5e503f45d2 doc: fix grammar in tls and timers
Replace 'a' with 'an' where appropriate.
2014-12-05 14:12:48 -08:00
Brendan Ashworth 70195acbe3 doc: fix grammar and wording in tls and timers
In `tls.markdown`, there was a misuse of 'a' which has been replaced
with 'an'.

In `timers.markdown`...
  line 31: misuse of 'a', replaced with 'an'
  line 59: unclear wording, haywire 'a', added new comma
2014-12-05 12:30:40 -08:00
Jackson Tian 9653c4b8c7 doc: mention callback for http res/req write & end
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's write and end methods.
2014-12-05 10:59:40 -08:00
Trevor Norris b6559553a4 src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:33:26 -08:00
Carlos Campderrós 4815873bb5 doc: set logical umask in process.umask example
0644 seems to be the desired mode for new files (as it is a very weird
umask), and to achieve that the correct umask would be 0022.

PR-URL: https://github.com/joyent/node/pull/8039
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-02 22:35:36 -08:00
Yazhong Liu d312b6d15c url: support `path` for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 10:55:22 -08:00
Rory Bradford 2d17193f20 path: added parse() and format() functions
The parse() function splits a path and returns an object
with the different elements. The format() function is the
reverse of this and adds an objects corresponding path
elements to make up a string. Fixes #6976.

Fixes: https://github.com/joyent/node/issues/6976
PR-URL: https://github.com/joyent/node/pull/8750
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-11-20 16:21:11 -08:00
Timothy J Fontaine 6a90a06002 path: allow calling platform specific methods
Add path.posix and path.win32 which have the specific methods like
resolve and normalize so you can specifically normalize or resolve
based on the target platform.

PR-URL: https://github.com/joyent/node/pull/5661
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 16:10:55 -08:00
Steve Sharp 4dc8b26bbe doc: correct broken link in net.markdown
Fixes broken link to Readable Stream documentation.

Fixes: https://github.com/joyent/node/issues/8464
PR-URL: https://github.com/joyent/node/pull/8756
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 15:38:29 -08:00
MK Safi 6a6782343c doc: clarify return value of http.createServer
PR-URL: https://github.com/joyent/node/pull/6054
Reviewed-by: Isaac Z. Schlueter <i@izs.me>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-19 14:18:50 -08:00
Sam Roberts 3a08b7c3e0 doc: cover stdio option in child_process
- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-18 19:28:46 -08:00
Sam Roberts 13a992b1c2 doc: document the fds behind stdin/out/err
Its common knowledge on unix, but node documentation depends on knowing
this, as it exposes both streams named after stdio, and the fd numbers,
so make this explicit.

Fixes: https://github.com/joyent/node/pull/8624
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:19:21 -08:00
Artur Cistov adc0206de9 doc: fix typos in http.markdown
PR-URL: https://github.com/joyent/node/pull/4784
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-17 15:35:00 -08:00
Julien Gilli 5ff59453a4 doc: clarify dns.lookup vs dns.resolve
Clarify and emphasize the differences between dns.lookup and the rest of
the functions in the dns module.

PR-URL: https://github.com/joyent/node/pull/8726
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-14 12:33:34 -08:00
Eric Mill 88bd95cfef doc: update openssl commands to use best practices
This updates key size to 2048 and default hash function to sha256.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690
2014-11-11 20:39:57 +03:00
sudodoki fd2226894a doc: note ability to require files within packages
Adding note to api/modules.markdown about ability to
load arbitrary path from modules from node_module path
by adding reference to path after module name in call
to require()

PR-URL: https://github.com/joyent/node/pull/7794
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-11-09 21:46:35 -08:00
Chris Dickinson 03bae7bded doc: remove tls.createSecurePair deprecation
pending tls.TLSSocket growing the ability to work
with streams, createSecurePair will remain.

PR-URL: https://github.com/joyent/node/pull/8695
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-07 14:33:05 -08:00
Fedor Indutny d435f4b3eb Merge remote-tracking branch 'joyent/v0.10' into v0.10 2014-11-04 00:11:23 -05:00
cjihrig c2b4f4809b net: add pauseOnConnect option to createServer()
Currently when a server receives a new connection the underlying socket
handle begins reading data immediately. This causes problems when
sockets are passed between processes, as data can be read by the first
process and thus never read by the second process.

This commit allows sockets that are constructed with a handle to be
paused initially.

PR-URL: https://github.com/joyent/node/pull/8576
Fixes: https://github.com/joyent/node/issues/7905
Fixes: https://github.com/joyent/node/issues/7784
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 14:11:20 -07:00
Vladimir Kurchatkin 15aa47e261 docs: fix smalloc.dispose() example
Also couple of additions about dispose and limitations of smalloc'ed
objects.

Fixes: https://github.com/joyent/node/pull/8625
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 12:58:05 -07:00
Fedor Indutny 1349b680ba crypto: allow forcing SSLv2/v3 via secureProtocol
Force-enable SSLv2/v3 when `secureProtocol` is explicitly set
to `SSLv2_method` or `SSLv3_method`.

see discussion at #8551
2014-10-20 14:35:18 -07:00
Calvin Metcalf 7dbc024c85 doc: add note about key derivation
adds a note to the crypto docs passing along
the advice that openssl gives about what
key derivation function they recommend.

PR-URL: https://github.com/joyent/node/pull/8580
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-10-20 13:41:15 +04:00
Timothy J Fontaine 226c98649d doc: clarify poodle mitigation 2014-10-17 15:15:45 -07:00
Timothy J Fontaine d601c76f4d crypto: allow runtime opt in using SSLv2/SSLv3
This change disables SSLv2/SSLv3 use by default, and introduces a
command line flag to opt into using SSLv2/SSLv3.

SSLv2 and SSLv3 are considered unsafe, and should only be used in
situations where compatibility with other components is required and
they cannot be upgrade to support newer forms of TLS.
2014-10-15 17:36:05 -07:00
Fedor Indutny d6712917f5 doc: document why SSL2/SSL3 is disabled
PR-URL: https://github.com/joyent/node/pull/8551
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-10-15 19:39:56 +04:00
Swaagie 6a95e9f7e0 tls add secureOptions documentation
PR-URL: https://github.com/joyent/node/pull/8553
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-10-15 13:19:54 +04:00
Matthew Fitzsimmons 1524d48333 doc: update design to match nodejs.org 2014-10-13 14:17:39 -07:00
Wang Xinyong db7df57e03 doc: correct createSecureContext
Remove incorrect stablity indication of tls.createSecureContext, and
format stablity indication of crypto.createCredentials.

Fixes: e50749 "doc: document `tls.createSecureContext`"
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-09 11:46:58 -07:00
Stiliyan Lazarov 47f119cabf doc: fix wording and punctuation in modules
[trev.norris@gmail.com: break lines at 80 characters]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-10-08 16:48:31 -07:00
Trevor Norris 6462519d3c buffer, doc: misc. fix and cleanup
* Add official documentation that a Buffer instance is a viable
  argument when instantiating a new Buffer.
* Properly set the poolOffset when a buffer needs to be truncated.
* Add comments clarifying specific peculiar coding choices.
* Remove a level of unnecessary indentation.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-10-08 02:24:32 -07:00
Steve Mao 6e4bd494a5 doc: add missing semicolons
PR-URL: https://github.com/joyent/node/pull/8498
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-07 23:30:42 -07:00
Johnny Ray f04f3a0d01 streams: set default encoding for writable streams
Add API Writable#setDefaultEncoding().

PR-URL: https://github.com/joyent/node/pull/8483
Fixes: https://github.com/joyent/node/issues/7159
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-07 17:04:10 -07:00
Victor Widell 8392e8cdfb doc: improve readLine.pause()
The docs for readLine.pause are misleading. I seriously spent hours on this. If
it isn't a bug, at least it should be well documented.

Someone else stumbled on this too:
http://stackoverflow.com/questions/21341050/pausing-readline-in-node-js

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-10-06 19:24:29 -05:00
Steve Sharp 87ce067636 doc: Update net.markdown
Associates link to dns.lookup() with proper URL.

Fixes: https://github.com/joyent/node/issues/8018
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-10-06 19:24:21 -05:00
Yazhong Liu 83d7d9e6d8 buffer: add generic functions for (u)int ops
Add generic functions for (U)Int read/write operations on Buffers. These
support up to and including 48 bit reads and writes.

Include documentation and tests.

Additional work done by Trevor Norris to include 40 and 48 bit write
support. Because bitwise operations cannot be used on values greater
than 32 bits, the operations have been replaced with mathematical
calculations. Regardless, they are still faster than floating point
operations.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-03 01:31:20 -07:00
Julien Gilli 862cc28183 readline: should not require an output stream.
Passing null as the output stream to readline.Interface()'s constructor
is now supported. Any output written by readline is just discarded. It
makes it easier to use readline just as a line parser.

Fixes: https://github.com/joyent/node/issues/4408
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-01 15:00:02 -07:00
Gabriel Wicke b705b73e46 url: make query() consistent
Match the behavior of the slow path by setting url.query to an empty
object when the url contains no query, but query parsing is requested.

Also add a test for this case, and update the documents to clearly
reflect this behavior.

Fixes: https://github.com/joyent/node/issues/8332
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-01 12:23:01 -07:00
Julien Fontanet 95726b0fce doc: note stdout and stderr special behaviors.
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-10-01 11:45:23 -07:00
Trevor Norris f2a78de6ec doc: fix optional parameter parsing
The parameter parser specifically looked for the old bracket syntax.
This generated a lot of warnings when building the docs. Those warnings
have been fixed by changing the parsing logic.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-09-29 16:32:34 -07:00
Trevor Norris 51b6b6844e doc: fix brackets for optional parameters
Documentation incorrectly used bracket notation for optional parameters.
This caused inconsistencies in usage because of examples like the
following:

    fs.write(fd, data[, position[, encoding]], callback)

This simply fixes all uses of bracket notation in documentation.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-25 11:26:15 -07:00