diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2013-04-12 11:30:11 -0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2013-04-12 11:30:11 -0400 |
commit | 259839fe75dde67472b815d05637750360fd76bf (patch) | |
tree | 0ac2a31410fd7bc53bcd7ddecb0d52c60dd2b2f0 /doc | |
parent | f83afd3c74865182bce62843fe23d28b4f876638 (diff) | |
parent | 8ee43006b81b713db1a0ca190f5332edd45121c1 (diff) | |
download | android-node-v8-259839fe75dde67472b815d05637750360fd76bf.tar.gz android-node-v8-259839fe75dde67472b815d05637750360fd76bf.tar.bz2 android-node-v8-259839fe75dde67472b815d05637750360fd76bf.zip |
Merge branch 'v0.10'
Conflicts:
ChangeLog
deps/uv/src/version.c
src/node.h
src/node_crypto.cc
src/node_crypto_bio.cc
src/node_crypto_bio.h
src/node_object_wrap.h
src/node_version.h
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/fs.markdown | 8 | ||||
-rw-r--r-- | doc/api/http.markdown | 70 | ||||
-rw-r--r-- | doc/api/process.markdown | 17 | ||||
-rw-r--r-- | doc/api/stream.markdown | 19 | ||||
-rw-r--r-- | doc/blog/release/v0.8.23.md | 69 |
5 files changed, 113 insertions, 70 deletions
diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 8cc1a3ffe7..3a3e4c9ff7 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -345,6 +345,10 @@ Exclusive mode (`O_EXCL`) ensures that `path` is newly created. `fs.open()` fails if a file by that name already exists. On POSIX systems, symlinks are not followed. Exclusive mode may or may not work with network file systems. +On Linux, positional writes don't work when the file is opened in append mode. +The kernel ignores the position argument and always appends the data to +the end of the file. + ## fs.openSync(path, flags, [mode]) Synchronous open(2). @@ -387,6 +391,10 @@ Note that it is unsafe to use `fs.write` multiple times on the same file without waiting for the callback. For this scenario, `fs.createWriteStream` is strongly recommended. +On Linux, positional writes don't work when the file is opened in append mode. +The kernel ignores the position argument and always appends the data to +the end of the file. + ## fs.writeSync(fd, buffer, offset, length, position) Synchronous version of `fs.write()`. Returns the number of bytes written. diff --git a/doc/api/http.markdown b/doc/api/http.markdown index a6f0641d01..594d19bacc 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -557,28 +557,14 @@ headers have been received. The `'response'` event is executed with one argument which is an instance of `http.IncomingMessage`. During the `'response'` event, one can add listeners to the -response object; particularly to listen for the `'data'` event. Note that -the `'response'` event is called before any part of the response body is received, -so there is no need to worry about racing to catch the first part of the -body. As long as a listener for `'data'` is added during the `'response'` -event, the entire body will be caught. +response object; particularly to listen for the `'data'` event. - - // Good - request.on('response', function (response) { - response.on('data', function (chunk) { - console.log('BODY: ' + chunk); - }); - }); - - // Bad - misses all or part of the body - request.on('response', function (response) { - setTimeout(function () { - response.on('data', function (chunk) { - console.log('BODY: ' + chunk); - }); - }, 10); - }); +If no `'response'` handler is added, then the response will be +entirely discarded. However, if you add a `'response'` event handler, +then you **must** consume the data from the response object, either by +calling `response.read()` whenever there is a `'readable'` event, or +by adding a `'data'` handler, or by calling the `.resume()` method. +Until the data is consumed, the `'end'` event will not fire. Note: Node does not check whether Content-Length and the length of the body which has been transmitted are equal or not. @@ -774,26 +760,8 @@ An `IncomingMessage` object is created by `http.Server` or `http.ClientRequest` and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to access response status, headers and data. -It implements the [Readable Stream][] interface. `http.IncomingMessage` is an -[EventEmitter][] with the following events: - -### Event: 'data' - -`function (chunk) { }` - -Emitted when a piece of the message body is received. The chunk is a string if -an encoding has been set with `message.setEncoding()`, otherwise it's -a [Buffer][]. - -Note that the __data will be lost__ if there is no listener when a -`IncomingMessage` emits a `'data'` event. - -### Event: 'end' - -`function () { }` - -Emitted exactly once for each response. After that, no more `'data'` events -will be emitted on the response. +It implements the [Readable Stream][] interface, as well as the +following additional events, methods, and properties. ### Event: 'close' @@ -802,9 +770,8 @@ will be emitted on the response. Indicates that the underlaying connection was terminated before `response.end()` was called or able to flush. -Just like `'end'`, this event occurs only once per response, and no more -`'data'` events will fire afterwards. See [http.ServerResponse][]'s `'close'` -event for more information. +Just like `'end'`, this event occurs only once per response. See +[http.ServerResponse][]'s `'close'` event for more information. ### message.httpVersion @@ -840,21 +807,6 @@ The request/response trailers object. Only populated after the 'end' event. Calls `message.connection.setTimeout(msecs, callback)`. -### message.setEncoding([encoding]) - -Set the encoding for data emitted by the `'data'` event. See [stream.setEncoding()][] for more -information. - -Should be set before any `'data'` events have been emitted. - -### message.pause() - -Pauses request/response from emitting events. Useful to throttle back a download. - -### message.resume() - -Resumes a paused request/response. - ### message.method **Only valid for request obtained from `http.Server`.** diff --git a/doc/api/process.markdown b/doc/api/process.markdown index b0060c3ecc..7add27e96c 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -324,13 +324,16 @@ A property exposing version strings of node and its dependencies. console.log(process.versions); -Will output: - - { node: '0.4.12', - v8: '3.1.8.26', - ares: '1.7.4', - ev: '4.4', - openssl: '1.0.0e-fips' } +Will print something like: + + { http_parser: '1.0', + node: '0.10.4', + v8: '3.14.5.8', + ares: '1.9.0-DEV', + uv: '0.10.3', + zlib: '1.2.3', + modules: '11', + openssl: '1.0.1e' } ## process.config diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 2c9fc1c6c4..ce7656b8d7 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -184,20 +184,31 @@ stream._read = function(n) { * `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue * return {Boolean} Whether or not more pushes should be performed +Note: **This function should usually be called by Readable consumers, +NOT by implementors of Readable subclasses.** It does not indicate +the end of a `_read()` transaction in the way that +`readable.push(chunk)` does. If you find that you have to call +`this.unshift(chunk)` in your Readable class, then there's a good +chance you ought to be using the +[stream.Transform](#stream_class_stream_transform) class instead. + This is the corollary of `readable.push(chunk)`. Rather than putting the data at the *end* of the read queue, it puts it at the *front* of the read queue. -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. +This is useful in certain cases where a stream is being consumed by a +parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source, so that the stream can be +passed on to some other party. ```javascript // A parser for a simple data protocol. // The "header" is a JSON object, followed by 2 \n characters, and // then a message body. // -// Note: This can be done more simply as a Transform stream. See below. +// NOTE: This can be done more simply as a Transform stream! +// Using Readable directly for this is sub-optimal. See the +// alternative example below under the Transform section. function SimpleProtocol(source, options) { if (!(this instanceof SimpleProtocol)) diff --git a/doc/blog/release/v0.8.23.md b/doc/blog/release/v0.8.23.md new file mode 100644 index 0000000000..558890efac --- /dev/null +++ b/doc/blog/release/v0.8.23.md @@ -0,0 +1,69 @@ +date: Mon Apr 8 17:32:26 PDT 2013 +version: 0.8.23 +category: release +title: Node v0.8.23 (Legacy) +slug: node-v0-8-23-legacy + +2013.04.09, Version 0.8.23 (Legacy) + +* npm: Upgrade to v1.2.18 + +* http: Avoid EE warning on ECONNREFUSED handling (isaacs) + +* tls: Re-enable check of CN-ID in cert verification (Tobias Müllerleile) + +* child_process: fix sending utf-8 to child process (Ben Noordhuis) + +* crypto: check key type in GetPeerCertificate() (Ben Noordhuis) + +* win/openssl: mark assembled object files as seh safe (Bert Belder) + +* windows/msi: fix msi build issue with WiX 3.7/3.8 (Raymond Feng) + + +Source Code: http://nodejs.org/dist/v0.8.23/node-v0.8.23.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.23/node-v0.8.23.pkg + +Windows Installer: http://nodejs.org/dist/v0.8.23/node-v0.8.23-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.8.23/x64/node-v0.8.23-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.8.23/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.8.23/node-v0.8.23-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.8.23/node-v0.8.23-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.8.23/node-v0.8.23-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.8.23/node-v0.8.23-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.8.23/ + +Website: http://nodejs.org/docs/v0.8.23/ + +Documentation: http://nodejs.org/docs/v0.8.23/api/ + +Shasums: + +``` +64cf0081e4d5d7ac528ce938007f9a7d3d952896 node-v0.8.23-darwin-x64.tar.gz +698b9dd9ece94cde200c25d881700a23a510883e node-v0.8.23-darwin-x86.tar.gz +94ea21cb5425d712b92289a82e0f48541d163fef node-v0.8.23-linux-x64.tar.gz +c6880d51464904d782d6438bb451fdc85cb874eb node-v0.8.23-linux-x86.tar.gz +9da74301acd0e157a132392bc0e3dd9760400fbe node-v0.8.23-sunos-x64.tar.gz +dffe26030f95c6f4c1b39ca9eae7d0882b1caacc node-v0.8.23-sunos-x86.tar.gz +0b8534504bc6a00215e21e03650228a37400b228 node-v0.8.23-x86.msi +033d01b7675f557b9cb49148a860d62f015c63fd node-v0.8.23.pkg +13772b9c1060aae5441f11cd3fdbe4e4791612b9 node-v0.8.23.tar.gz +d0afaf05544c9fa8b4b6df5f1f03feb9167fb493 node.exe +13067ab2f18797536a38a76e5f8087ec54f45b6c node.exp +8a253e09bfa128b09ad0a0a507db8f7c96eba537 node.lib +51f36628dc6ec058966de7a9f3054617b0ddbb30 node.pdb +367967503a8963557f647bd9766a980f7c78ff93 x64/node-v0.8.23-x64.msi +e86d6b984a937b27e1809db551d2159aea19c3d5 x64/node.exe +29abfe7952dafde326ff52094ec49445f41f5366 x64/node.exp +d769b0e9af6975dcd860f3a57c3d3cc96c240e46 x64/node.lib +e4268618e8dea66f2d1fa9bf8b817ae1e7106337 x64/node.pdb +``` |