PR-URL: https://github.com/nodejs/node/pull/4504
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4656
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Now returns a 417 error status or allows for an event listener on
the `checkExpectation` event. Before we were ignoring requests that
had misspelled `100-continue` values for expect headers.
This is a quick port of the work done here:
https://github.com/nodejs/node-v0.x-archive/pull/7132 by alFReD-NSH
with surrounding discussion here:
https://github.com/nodejs/node-v0.x-archive/issues/4651
Also updates all the instances of the deprecated
EventEmitter.listenerCount to the current self.listenerCount. Most
of these were in the new code ported over but there was another
legacy instance.
Refs: #2403
PR-URL: https://github.com/nodejs/node/pull/4501
Reviewed-By: James M Snell <jasnell@gmail.com>
Useful to have for reference, especially for onboarding
PR-URL: https://github.com/nodejs/node/pull/4636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell<jasnell@gmail.com>
Add support to fs.createWriteStream and fs.createWriteStream for an autoClose
option that behaves similarly to the autoClose option supported by
fs.createReadStream and fs.ReadStream.
When an instance of fs.createWriteStream created with autoClose === false finishes,
it is not destroyed. Its underlying fd is not closed and it is the
responsibility of the user to close it.
PR-URL: https://github.com/nodejs/node/pull/3679
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In order to make developers aware of node-core built-in
functionality, which might replace module APIs, we should
add an example of readline`s interface usage.
SEO will eventually aid this goal, since it is well searched
on Q&A sites.
PR-URL: https://github.com/nodejs/node/pull/4609
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>>
The docs were recently refactored, and some "above" and "below"
references were no longer accurate. This commit removes many
such references, and replaces others with links.
PR-URL: https://github.com/nodejs/node/pull/4499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
- Changed colors to match frontpage as close as possible.
- Links are slightly more horizontally padded as compared before to
accomodate for the hover effect.
- Slightly reduced the scroll indication height on the TOC.
- The main content is now offset using margin instead of the previous
border hack.
- remove empty footer that was rendering a dark bar on the bottom of
each page without any content.
PR-URL: https://github.com/nodejs/node/pull/4621
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Make default `clientError` behavior (close socket immediately)
overridable. With this APIs it is possible to write a custom error
handler, and to send, for example, a 400 HTTP response.
http.createServer(...).on('clientError', function(err, socket) {
socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
socket.destroy();
});
Fix: #4543
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
General improvements to crypto.markdown including new and
revised examples.
PR-URL: https://github.com/nodejs/node/pull/4435
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
tools/doc/html.js in make doc throws an error in checking a heading
level in the markdown file.
PR-URL: https://github.com/nodejs/node/pull/4537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
General improvements to dgram.markdown copy
PR-URL: https://github.com/nodejs/node/pull/4437
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
`setTimeout()`, `setInterval()` and `setIntermediate` currently
throw errors when receiving non-function objects as their first
argument, but only do so when trying to execute the callback,
i.e. after the waited time has passed. This may complicate
debugging when a lot of calls to `setTimeout()`/etc. are involved,
so failing as early as possible seems like a good idea.
`setTimeout()` historically ignored an falsy first
argument, while the other functions do not and throw instead.
This patch changes this behaviour to make all three match and
adds remarks in the corresponding documentation.
PR-URL: https://github.com/nodejs/node/pull/4362
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node/pull/4455
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
State a time unit for the timeout parameter in ClientRequest#setTimeout
PR-URL: https://github.com/nodejs/node/pull/4458
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
General improvements to debugger.markdown
PR-URL: https://github.com/nodejs/node/pull/4436
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
General improvements to events.markdown copy including a
bit of restructuring and improved examples
PR-URL: https://github.com/nodejs/node/pull/4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
General improvements to dns.markdown copy and examples
PR-URL: https://github.com/nodejs/node/pull/4449
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Several improvements including a few new examples
PR-URL: https://github.com/nodejs/node/pull/4428
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Copyedit the documentation for setTimeout() and enforce wrapping at 80
characters in the markdown file for nearby text.
PR-URL: https://github.com/nodejs/node/pull/4434
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
All the other properties get an h2/## but process.connected gets an
h3/### for no discernible reason. Change it to h2/## like the others.
PR-URL: https://github.com/nodejs/node/pull/4433
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
General improvements to assert.markdown copy including
new and improved examples
PR-URL: https://github.com/nodejs/node/pull/4360
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
General improvements to buffer.markdown including new examples,
a few fixes to existing examples, consistent formatting and
others
PR-URL: https://github.com/nodejs/node/pull/4370
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
General improvements to the documentation in addons.markdown.
PR-URL: https://github.com/nodejs/node/pull/4320
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency
PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The buffer's write function is documented below the
buf.toString function and all of the docs reference
"buf" instead of "buffer".
PR-URL: https://github.com/nodejs/node/pull/4324
Reviewed-By: James M Snell <jasnell@gmail.com>
The backlog parameter is supported by all variations of
net.Server.listen(), but wasn't consistently documented. This
commit brings the documentation into a more consistent state.
Refs: https://github.com/nodejs/node/pull/4056
PR-URL: https://github.com/nodejs/node/pull/4025
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
* Document that Symbol can used as event names.
* Add test for using Symbol as event names
PR-URL: https://github.com/nodejs/node/pull/4151
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>