Commit 84b47501 authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 0.6.18~dfsg1

parent 7bae1d20
2012.05.04 Version 0.6.17 (stable)
2012.05.15 Version 0.6.18 (stable)
* windows: skip GetFileAttributes call when opening a file (Bert Belder)
* crypto: add PKCS12/PFX support (Sambasiva Suda)
* #3240: child_process: delete NODE_CHANNEL_FD from env in spawn (Ben Noordhuis)
* windows: add test for path.normalize with UNC paths (Bert Belder)
* windows: make path.normalize convert all slashes to backslashes (Bert Belder)
* fs: Automatically close FSWatcher on error (Bert Belder)
* #3258: fs.ReadStream.pause() emits duplicate data event (koichik)
* pipe_wrap: don't assert() on pipe accept errors (Ben Noordhuis)
* Better exception output for module load and process.nextTick (Felix Geisendörfer)
* zlib: fix error reporting (Ben Noordhuis)
* http: Don't destroy on timeout (isaacs)
* #3231: http: Don't try to emit error on a null'ed req object (isaacs)
* #3236: http: Refactor ClientRequest.onSocket (isaacs)
2012.05.04 Version 0.6.17 (stable), 4ced23deaf36493f4303a18f6fdce768c58becc0
* Upgrade npm to 1.1.21
......
......@@ -32,7 +32,7 @@ install:
uninstall:
@$(WAF) uninstall
test: all node_modules/weak
test: all
$(PYTHON) tools/test.py --mode=release simple message
test-http1: all
......@@ -136,7 +136,7 @@ out/doc/api/%.html: doc/api/%.markdown
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
email.md: ChangeLog tools/email-footer.md
bash tools/changelog-head.sh > $@
bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@
cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
blog.html: email.md
......
......@@ -36,6 +36,11 @@
#include <pwd.h>
#include <termios.h>
#if __sun
# include <sys/port.h>
# include <port.h>
#endif
/* Note: May be cast to struct iovec. See writev(2). */
typedef struct {
char* base;
......@@ -52,6 +57,14 @@ typedef uid_t uv_uid_t;
typedef void* uv_lib_t;
#define UV_DYNAMIC /* empty */
#if defined(PORT_SOURCE_FILE)
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS \
ev_io fs_event_watcher; \
int fs_fd;
#else
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS
#endif
#define UV_LOOP_PRIVATE_FIELDS \
ares_channel channel; \
/* \
......@@ -60,7 +73,8 @@ typedef void* uv_lib_t;
* definition of ares_timeout(). \
*/ \
ev_timer timer; \
struct ev_loop* ev;
struct ev_loop* ev; \
UV_LOOP_PRIVATE_PLATFORM_FIELDS
#define UV_REQ_BUFSML_SIZE (4)
......@@ -206,12 +220,8 @@ typedef void* uv_lib_t;
#elif defined(__sun)
#include <sys/port.h>
#include <port.h>
#ifdef PORT_SOURCE_FILE
# define UV_FS_EVENT_PRIVATE_FIELDS \
ev_io event_watcher; \
uv_fs_event_cb cb; \
file_obj_t fo;
#else /* !PORT_SOURCE_FILE */
......
......@@ -19,7 +19,7 @@
*/
#include "uv.h"
#include "unix/internal.h"
#include "internal.h"
#include <stddef.h> /* NULL */
#include <stdio.h> /* printf */
......@@ -151,6 +151,9 @@ uv_loop_t* uv_loop_new(void) {
uv_loop_t* loop = calloc(1, sizeof(uv_loop_t));
loop->ev = ev_loop_new(0);
ev_set_userdata(loop->ev, loop);
#if HAVE_PORTS_FS
loop->fs_fd = -1;
#endif
return loop;
}
......@@ -163,6 +166,12 @@ void uv_loop_delete(uv_loop_t* loop) {
memset(loop, 0, sizeof *loop);
#endif
#if HAVE_PORTS_FS
if (loop->fs_fd != -1) {
uv__close(loop->fs_fd);
}
#endif
if (loop == default_loop_ptr)
default_loop_ptr = NULL;
else
......@@ -182,6 +191,9 @@ uv_loop_t* uv_default_loop(void) {
default_loop_struct.ev = ev_default_loop(EVBACKEND_KQUEUE);
#else
default_loop_struct.ev = ev_default_loop(EVFLAG_AUTO);
#endif
#if HAVE_PORTS_FS
default_loop_struct.fs_fd = -1;
#endif
ev_set_userdata(default_loop_struct.ev, default_loop_ptr);
}
......
......@@ -36,6 +36,11 @@
#if HAVE_PORTS_FS
# include <sys/port.h>
# include <port.h>
# define PORT_FIRED 0x69
# define PORT_UNUSED 0x0
# define PORT_LOADED 0x99
# define PORT_DELETED -1
#endif
......@@ -90,36 +95,41 @@ void uv_loadavg(double avg[3]) {
#if HAVE_PORTS_FS
static void uv__fs_event_rearm(uv_fs_event_t *handle) {
if (port_associate(handle->fd,
if (handle->fd == -1)
return;
if (port_associate(handle->loop->fs_fd,
PORT_SOURCE_FILE,
(uintptr_t) &handle->fo,
FILE_ATTRIB | FILE_MODIFIED,
NULL) == -1) {
handle) == -1) {
uv__set_sys_error(handle->loop, errno);
}
handle->fd = PORT_LOADED;
}
static void uv__fs_event_read(EV_P_ ev_io* w, int revents) {
uv_fs_event_t *handle;
uv_loop_t *loop_;
timespec_t timeout;
port_event_t pe;
int events;
int r;
handle = container_of(w, uv_fs_event_t, event_watcher);
loop_ = container_of(w, uv_loop_t, fs_event_watcher);
do {
/* TODO use port_getn() */
do {
memset(&timeout, 0, sizeof timeout);
r = port_get(handle->fd, &pe, &timeout);
r = port_get(loop_->fs_fd, &pe, &timeout);
}
while (r == -1 && errno == EINTR);
if (r == -1 && errno == ETIME)
break;
handle = (uv_fs_event_t *)pe.portev_user;
assert((r == 0) && "unexpected port_get() error");
events = 0;
......@@ -128,12 +138,12 @@ static void uv__fs_event_read(EV_P_ ev_io* w, int revents) {
if (pe.portev_events & ~(FILE_ATTRIB | FILE_MODIFIED))
events |= UV_RENAME;
assert(events != 0);
handle->fd = PORT_FIRED;
handle->cb(handle, NULL, events, 0);
}
while (handle->fd != -1);
while (handle->fd != PORT_DELETED);
if (handle->fd != -1)
if (handle->fd != PORT_DELETED)
uv__fs_event_rearm(handle);
}
......@@ -144,39 +154,45 @@ int uv_fs_event_init(uv_loop_t* loop,
uv_fs_event_cb cb,
int flags) {
int portfd;
int first_run = 0;
loop->counters.fs_event_init++;
/* We don't support any flags yet. */
assert(!flags);
if ((portfd = port_create()) == -1) {
uv__set_sys_error(loop, errno);
return -1;
if (loop->fs_fd == -1) {
if ((portfd = port_create()) == -1) {
uv__set_sys_error(loop, errno);
return -1;
}
loop->fs_fd = portfd;
first_run = 1;
}
uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
handle->filename = strdup(filename);
handle->fd = portfd;
handle->fd = PORT_UNUSED;
handle->cb = cb;
memset(&handle->fo, 0, sizeof handle->fo);
handle->fo.fo_name = handle->filename;
uv__fs_event_rearm(handle);
ev_io_init(&handle->event_watcher, uv__fs_event_read, portfd, EV_READ);
ev_io_start(loop->ev, &handle->event_watcher);
ev_unref(loop->ev);
if (first_run) {
ev_io_init(&loop->fs_event_watcher, uv__fs_event_read, portfd, EV_READ);
ev_io_start(loop->ev, &loop->fs_event_watcher);
ev_unref(loop->ev);
}
return 0;
}
void uv__fs_event_destroy(uv_fs_event_t* handle) {
ev_ref(handle->loop->ev);
ev_io_stop(handle->loop->ev, &handle->event_watcher);
uv__close(handle->fd);
handle->fd = -1;
if (handle->fd == PORT_FIRED) {
port_dissociate(handle->loop->fs_fd, PORT_SOURCE_FILE, (uintptr_t)&handle->fo);
}
handle->fd = PORT_DELETED;
free(handle->filename);
handle->filename = NULL;
handle->fo.fo_name = NULL;
......
......@@ -248,10 +248,8 @@ void fs__open(uv_fs_t* req, const wchar_t* path, int flags, int mode) {
goto end;
}
/* Figure out whether path is a file or a directory. */
if (GetFileAttributesW(path) & FILE_ATTRIBUTE_DIRECTORY) {
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
}
/* Setting this flag makes it possible to open a directory. */
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
file = CreateFileW(path,
access,
......
......@@ -197,6 +197,15 @@ inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp(
if (!done()) Advance();
}
template<typename Iterator>
inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp(
Isolate* isolate, ThreadLocalTop* top)
: iterator_(isolate, top) {
if (!done()) Advance();
}
template<typename Iterator>
inline JavaScriptFrame* JavaScriptFrameIteratorTemp<Iterator>::frame() const {
// TODO(1233797): The frame hierarchy needs to change. It's
......
......@@ -710,6 +710,8 @@ class JavaScriptFrameIteratorTemp BASE_EMBEDDED {
inline explicit JavaScriptFrameIteratorTemp(Isolate* isolate);
inline JavaScriptFrameIteratorTemp(Isolate* isolate, ThreadLocalTop* top);
// Skip frames until the frame with the given id is reached.
explicit JavaScriptFrameIteratorTemp(StackFrame::Id id) { AdvanceToId(id); }
......
......@@ -8201,6 +8201,31 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyRecompile) {
}
class ActivationsFinder : public ThreadVisitor {
public:
explicit ActivationsFinder(JSFunction* function)
: function_(function), has_activations_(false) {}
void VisitThread(Isolate* isolate, ThreadLocalTop* top) {
if (has_activations_) return;
for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) {
JavaScriptFrame* frame = it.frame();
if (frame->is_optimized() && frame->function() == function_) {
has_activations_ = true;
return;
}
}
}
bool has_activations() { return has_activations_; }
private:
JSFunction* function_;
bool has_activations_;
};
RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
......@@ -8247,17 +8272,24 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) {
return isolate->heap()->undefined_value();
}
// Count the number of optimized activations of the function.
int activations = 0;
// Find other optimized activations of the function.
bool has_other_activations = false;
while (!it.done()) {
JavaScriptFrame* frame = it.frame();
if (frame->is_optimized() && frame->function() == *function) {
activations++;
has_other_activations = true;
break;
}
it.Advance();
}
if (activations == 0) {
if (!has_other_activations) {
ActivationsFinder activations_finder(*function);
isolate->thread_manager()->IterateArchivedThreads(&activations_finder);
has_other_activations = activations_finder.has_activations();
}
if (!has_other_activations) {
if (FLAG_trace_deopt) {
PrintF("[removing optimized code for: ");
function->PrintName();
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Buffer Node.js v0.6.17 Manual &amp; Documentation</title>
<title>Buffer Node.js v0.6.18 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
<link rel="canonical" href="http://nodejs.org/api/buffer.html">
......@@ -31,7 +31,7 @@
<div id="column1" class="interior">
<header>
<h1>Node.js v0.6.17 Manual &amp; Documentation</h1>
<h1>Node.js v0.6.18 Manual &amp; Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -173,7 +173,7 @@ It can be constructed in a variety of ways.
<div class="signature"><ul>
<li><code>string</code> String - data to be written to buffer</li>
<li><code>offset</code> Number, Optional, Default: 0</li>
<li><code>length</code> Number, Optional</li>
<li><code>length</code> Number, Optional, Default: <code>buffer.length - offset</code></li>
<li><code>encoding</code> String, Optional, Default: &apos;utf8&apos;</li>
</div></ul>
<p>Writes <code>string</code> to the buffer at <code>offset</code> using the given encoding.
......@@ -197,7 +197,7 @@ next time <code>buf.write()</code> is called.
<div class="signature"><ul>
<li><code>encoding</code> String, Optional, Default: &apos;utf8&apos;</li>
<li><code>start</code> Number, Optional, Default: 0</li>
<li><code>end</code> Number, Optional</li>
<li><code>end</code> Number, Optional, Default: <code>buffer.length</code></li>
</div></ul>
<p>Decodes and returns a string from buffer data encoded with <code>encoding</code>
(defaults to <code>&apos;utf8&apos;</code>) beginning at <code>start</code> (defaults to <code>0</code>) and ending at
......@@ -279,7 +279,7 @@ console.log(buf.length);
<li><code>targetBuffer</code> Buffer object - Buffer to copy into</li>
<li><code>targetStart</code> Number, Optional, Default: 0</li>
<li><code>sourceStart</code> Number, Optional, Default: 0</li>
<li><code>sourceEnd</code> Number, Optional, Default: 0</li>
<li><code>sourceEnd</code> Number, Optional, Default: <code>buffer.length</code></li>
</div></ul>
<p>Does copy between buffers. The source and target regions can be overlapped.
<code>targetStart</code> and <code>sourceStart</code> default to <code>0</code>.
......@@ -305,7 +305,7 @@ console.log(buf2.toString(&apos;ascii&apos;, 0, 25));
<h3>buf.slice([start], [end])<span><a class="mark" href="#buffer_buf_slice_start_end" id="buffer_buf_slice_start_end">#</a></span></h3>
<div class="signature"><ul>
<li><code>start</code> Number, Optional, Default: 0</li>
<li><code>end</code> Number, Optional, Default: 0</li>
<li><code>end</code> Number, Optional, Default: <code>buffer.length</code></li>
</div></ul>
<p>Returns a new buffer which references the same memory as the old, but offset
and cropped by the <code>start</code> (defaults to <code>0</code>) and <code>end</code> (defaults to
......@@ -816,7 +816,7 @@ then Node will allocate a SlowBuffer slab for it directly.
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
</ul>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.17/LICENSE">license</a>.</p>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.18/LICENSE">license</a>.</p>
</div>
<script src="../sh_main.js"></script>
......
......@@ -33,10 +33,10 @@
"optional": true
},
{
"textRaw": "`length` Number, Optional ",
"textRaw": "`length` Number, Optional, Default: `buffer.length - offset` ",
"name": "length",
"optional": true,
"desc": "Number"
"desc": "Number, Optional, Default: `buffer.length - offset`",
"optional": true
},
{
"textRaw": "`encoding` String, Optional, Default: 'utf8' ",
......@@ -88,10 +88,10 @@
"optional": true
},
{
"textRaw": "`end` Number, Optional ",
"textRaw": "`end` Number, Optional, Default: `buffer.length` ",
"name": "end",
"optional": true,
"desc": "Number"
"desc": "Number, Optional, Default: `buffer.length`",
"optional": true
}
]
},
......@@ -139,9 +139,9 @@
"optional": true
},
{
"textRaw": "`sourceEnd` Number, Optional, Default: 0 ",
"textRaw": "`sourceEnd` Number, Optional, Default: `buffer.length` ",
"name": "sourceEnd",
"desc": "Number, Optional, Default: 0",
"desc": "Number, Optional, Default: `buffer.length`",
"optional": true
}
]
......@@ -182,9 +182,9 @@
"optional": true
},
{
"textRaw": "`end` Number, Optional, Default: 0 ",
"textRaw": "`end` Number, Optional, Default: `buffer.length` ",
"name": "end",
"desc": "Number, Optional, Default: 0",
"desc": "Number, Optional, Default: `buffer.length`",
"optional": true
}
]
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Child Process Node.js v0.6.17 Manual &amp; Documentation</title>
<title>Child Process Node.js v0.6.18-pre Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
<link rel="canonical" href="http://nodejs.org/api/child_process.html">
......@@ -31,7 +31,7 @@
<div id="column1" class="interior">
<header>
<h1>Node.js v0.6.17 Manual &amp; Documentation</h1>
<h1>Node.js v0.6.18-pre Manual &amp; Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -498,7 +498,7 @@ processes:
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
</ul>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.17/LICENSE">license</a>.</p>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.18-pre/LICENSE">license</a>.</p>
</div>
<script src="../sh_main.js"></script>
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Crypto Node.js v0.6.17 Manual &amp; Documentation</title>
<title>Crypto Node.js v0.6.18 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
<link rel="canonical" href="http://nodejs.org/api/crypto.html">
......@@ -31,7 +31,7 @@
<div id="column1" class="interior">
<header>
<h1>Node.js v0.6.17 Manual &amp; Documentation</h1>
<h1>Node.js v0.6.18 Manual &amp; Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -125,8 +125,10 @@ of a secure HTTPS net or http connection.
</p>
<ul>
<li><code>pfx</code> : A string or buffer holding the PFX or PKCS12 encoded private key, certificate and CA certificates</li>
<li><code>key</code> : a string holding the PEM encoded private key</li>
<li><code>cert</code> : a string holding the PEM encoded certificate</li>
<li><code>passphrase</code> : A string of passphrase for the private key or pfx</li>
<li><code>ca</code> : either a string or list of strings of PEM encoded CA certificates to trust.</li>
<li><code>ciphers</code>: a string describing the ciphers to use or exclude. Consult
<a href="http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT">http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT</a> for details
......@@ -471,7 +473,7 @@ try {
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
</ul>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.17/LICENSE">license</a>.</p>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.18/LICENSE">license</a>.</p>
</div>
<script src="../sh_main.js"></script>
......
......@@ -12,7 +12,7 @@
"textRaw": "crypto.createCredentials(details)",
"type": "method",
"name": "createCredentials",
"desc": "<p>Creates a credentials object, with the optional details being a dictionary with keys:\n\n</p>\n<ul>\n<li><code>key</code> : a string holding the PEM encoded private key</li>\n<li><code>cert</code> : a string holding the PEM encoded certificate</li>\n<li><code>ca</code> : either a string or list of strings of PEM encoded CA certificates to trust.</li>\n<li><code>ciphers</code>: a string describing the ciphers to use or exclude. Consult\n<a href=\"http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT\">http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT</a> for details\non the format.</li>\n</ul>\n<p>If no &apos;ca&apos; details are given, then node.js will use the default publicly trusted list of CAs as given in\n</p>\n<p><a href=\"http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt\">http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt</a>.\n\n\n</p>\n",
"desc": "<p>Creates a credentials object, with the optional details being a dictionary with keys:\n\n</p>\n<ul>\n<li><code>pfx</code> : A string or buffer holding the PFX or PKCS12 encoded private key, certificate and CA certificates</li>\n<li><code>key</code> : a string holding the PEM encoded private key</li>\n<li><code>cert</code> : a string holding the PEM encoded certificate</li>\n<li><code>passphrase</code> : A string of passphrase for the private key or pfx</li>\n<li><code>ca</code> : either a string or list of strings of PEM encoded CA certificates to trust.</li>\n<li><code>ciphers</code>: a string describing the ciphers to use or exclude. Consult\n<a href=\"http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT\">http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT</a> for details\non the format.</li>\n</ul>\n<p>If no &apos;ca&apos; details are given, then node.js will use the default publicly trusted list of CAs as given in\n</p>\n<p><a href=\"http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt\">http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt</a>.\n\n\n</p>\n",
"signatures": [
{
"params": [
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTTPS Node.js v0.6.17 Manual &amp; Documentation</title>
<title>HTTPS Node.js v0.6.18 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
<link rel="canonical" href="http://nodejs.org/api/https.html">
......@@ -31,7 +31,7 @@
<div id="column1" class="interior">
<header>
<h1>Node.js v0.6.17 Manual &amp; Documentation</h1>
<h1>Node.js v0.6.18 Manual &amp; Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -88,6 +88,20 @@ var options = {
cert: fs.readFileSync(&apos;test/fixtures/keys/agent2-cert.pem&apos;)
};
https.createServer(options, function (req, res) {
res.writeHead(200);
res.end(&quot;hello world\n&quot;);
}).listen(8000);</code></pre>
<p>Or
</p>
<pre><code>var https = require(&apos;https&apos;);
var fs = require(&apos;fs&apos;);
var options = {
pfx: fs.readFileSync(&apos;server.pfx&apos;)
};
https.createServer(options, function (req, res) {
res.writeHead(200);
res.end(&quot;hello world\n&quot;);
......@@ -157,8 +171,9 @@ specified. However, a <a href="#https.globalAgent">globalAgent</a> silently igno
</p>
<ul>
<li><code>pfx</code>: Certificate, Private key and CA certificates to use for SSL. Default <code>null</code>.</li>
<li><code>key</code>: Private key to use for SSL. Default <code>null</code>.</li>
<li><code>passphrase</code>: A string of passphrase for the private key. Default <code>null</code>.</li>
<li><code>passphrase</code>: A string of passphrase for the private key or pfx. Default <code>null</code>.</li>
<li><code>cert</code>: Public x509 certificate to use. Default <code>null</code>.</li>
<li><code>ca</code>: An authority certificate or array of authority certificates to check
the remote host against.</li>
......@@ -249,7 +264,7 @@ for all HTTPS client requests.
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
</ul>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.17/LICENSE">license</a>.</p>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.18/LICENSE">license</a>.</p>
</div>
<script src="../sh_main.js"></script>
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stream Node.js v0.6.17 Manual &amp; Documentation</title>
<title>Stream Node.js v0.6.18 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
<link rel="canonical" href="http://nodejs.org/api/stream.html">
......@@ -31,7 +31,7 @@
<div id="column1" class="interior">
<header>
<h1>Node.js v0.6.17 Manual &amp; Documentation</h1>
<h1>Node.js v0.6.18 Manual &amp; Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -56,7 +56,6 @@
<li><a href="#stream_stream_pause">stream.pause()</a></li>
<li><a href="#stream_stream_resume">stream.resume()</a></li>
<li><a href="#stream_stream_destroy">stream.destroy()</a></li>
<li><a href="#stream_stream_destroysoon">stream.destroySoon()</a></li>
<li><a href="#stream_stream_pipe_destination_options">stream.pipe(destination, [options])</a></li>
</ul>
</li>
......@@ -72,7 +71,7 @@
<li><a href="#stream_stream_end_string_encoding">stream.end(string, encoding)</a></li>
<li><a href="#stream_stream_end_buffer">stream.end(buffer)</a></li>
<li><a href="#stream_stream_destroy_1">stream.destroy()</a></li>
<li><a href="#stream_stream_destroysoon_1">stream.destroySoon()</a></li>
<li><a href="#stream_stream_destroysoon">stream.destroySoon()</a></li>
</ul>
</li>
</ul>
......@@ -156,11 +155,6 @@ occurred, the stream came to an <code>&apos;end&apos;</code>, or <code>destroy()
<h3>stream.destroy()<span><a class="mark" href="#stream_stream_destroy" id="stream_stream_destroy">#</a></span></h3>
<p>Closes the underlying file descriptor. Stream will not emit any more events.
</p>
<h3>stream.destroySoon()<span><a class="mark" href="#stream_stream_destroysoon" id="stream_stream_destroysoon">#</a></span></h3>
<p>After the write queue is drained, close the file descriptor.
</p>
<h3>stream.pipe(destination, [options])<span><a class="mark" href="#stream_stream_pipe_destination_options" id="stream_stream_pipe_destination_options">#</a></span></h3>
<p>This is a <code>Stream.prototype</code> method available on all <code>Stream</code>s.
......@@ -272,7 +266,7 @@ or FIN. This is useful to reduce the number of packets sent.
Any queued write data will not be sent.
</p>
<h3>stream.destroySoon()<span><a class="mark" href="#stream_stream_destroysoon_1" id="stream_stream_destroysoon_1">#</a></span></h3>
<h3>stream.destroySoon()<span><a class="mark" href="#stream_stream_destroysoon" id="stream_stream_destroysoon">#</a></span></h3>
<p>After the write queue is drained, close the file descriptor. <code>destroySoon()</code>
can still destroy straight away, as long as there is no data left in the queue
for writes.
......@@ -295,7 +289,7 @@ for writes.
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
</ul>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.17/LICENSE">license</a>.</p>
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.18/LICENSE">license</a>.</p>
</div>
<script src="../sh_main.js"></script>
......
......@@ -92,18 +92,7 @@
"textRaw": "stream.destroy()",
"type": "method",
"name": "destroy",
"desc": "<p>Closes the underlying file descriptor. Stream will not emit any more events.\n\n\n</p>\n",
"signatures": [
{
"params": []
}
]
},
{
"textRaw": "stream.destroySoon()",
"type": "method",
"name": "destroySoon",
"desc": "<p>After the write queue is drained, close the file descriptor.\n\n</p>\n",
"desc": "<p>Closes the underlying file descriptor. Stream will not emit any more events.\n\n</p>\n",
"signatures": [
{
"params": []
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>TLS (SSL) Node.js v0.6.17 Manual &amp; Documentation</title>
<title>TLS (SSL) Node.js v0.6.18 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
<link rel="canonical" href="http://nodejs.org/api/tls.html">
......@@ -31,7 +31,7 @@
<div id="column1" class="interior">
<header>
<h1>Node.js v0.6.17 Manual &amp; Documentation</h1>
<h1>Node.js v0.6.18 Manual &amp; Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -115,6 +115,17 @@ file. This is done with:
<code>test/fixtures/keys/Makefile</code> in the Node source code)