Compare commits

...

5853 Commits

Author SHA1 Message Date
isaacs
a299c97bbc 2012.08.22, Version 0.8.8 (Stable)
* V8: upgrade to 3.11.10.19

* npm: upgrade to 1.1.59

* windows: fix uninitialized memory access in uv_update_time() (Bert Belder)

* unix, windows: fix memory corruption in fs-poll.c (Ben Noordhuis)

* unix: fix integer overflow in uv_hrtime (Tim Holy)

* sunos: fix uv_cpu_info() on x86_64 (Ben Noordhuis)

* tls: update default cipher list (Ben Noordhuis)

* unix: Fix llvm and older gcc duplicate symbol warnings (Bert Belder)

* fs: fix use after free in stat watcher (Ben Noordhuis)

* build: Fix using manually compiled gcc on OS X (Nathan Rajlich)

* windows: make junctions work again (Bert Belder)
2012-08-22 11:03:20 -07:00
isaacs
c259499945 npm: Upgrade to 1.1.59 2012-08-22 11:03:15 -07:00
isaacs
ee200942dd lint 2012-08-22 11:03:14 -07:00
Ron Korving
2e1f2b535e doc: fix typo in cluster example code 2012-08-22 09:33:52 +02:00
isaacs
2f1985ca7d npm: Upgrade to 1.1.57 2012-08-21 17:38:21 -07:00
isaacs
024f4b12a5 npm: Upgrade to 1.1.56 2012-08-21 16:27:30 -07:00
isaacs
2bcb9ab7bc npm: Upgrade to 1.1.55 2012-08-21 15:29:37 -07:00
Ben Noordhuis
badbd1af27 tls: update default cipher list
Update the default cipher list from RC4-SHA:AES128-SHA:AES256-SHA
to ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH
in order to mitigate BEAST attacks.

The documentation suggested AES256-SHA but unfortunately that's a CBC cipher
and therefore susceptible to attacks.

Fixes #3900.
2012-08-21 22:27:13 +02:00
Ben Noordhuis
7c75ca7182 doc: cluster: setupMaster() can be called only once 2012-08-21 13:44:29 +02:00
Bert Belder
ef0ca2affd v8: reapply floating patches 2012-08-21 03:05:25 +02:00
Bert Belder
2d9239359d v8: upgrade to v3.11.10.19 2012-08-21 03:04:16 +02:00
Bert Belder
d38d7bea6c unix: don't explicitly instantiate v8::Persistent<x> templates
These explicit instantiations were added to make MSVC happy. It turns
out that some older versions of gcc and llvm now complain about duplicate
symbols, so we instantiate these templates only when MSVC is used.
2012-08-20 18:42:05 +02:00
Ben Noordhuis
b1ffbdc975 fs: fix use after free in stat watcher
The uv_fs_poll_t handle was stopped but not closed, leaving libuv's internal
handle queue in a corrupted state.
2012-08-20 17:29:58 +02:00
Ben Noordhuis
0844e2359b deps: upgrade libuv to 012cbda 2012-08-20 17:29:58 +02:00
Nathan Rajlich
be3a77bd42 build: don't use "-Wnewline-eof" on OS X
This is the only thing preventing a manually compiled version of GCC
(rather than Apple's provided llvm-gcc or heavily modified gcc 4.2)
from working properly, so we might as well enable support for that.

With this patch I was able to compile node using a manually compiled
gcc 4.7.1.

Closes #3887.
2012-08-20 08:18:14 -07:00
Bert Belder
9918e5d4f6 windows: make junctions work again
Closes GH-3879
2012-08-17 02:30:57 +02:00
Bert Belder
9263213d8e Avoid compiler warning about negating unsigned value 2012-08-17 01:08:06 +02:00
Bert Belder
e8fd808dfb windows: avoid MSVC warnings about templates not having a dll interface 2012-08-17 01:02:03 +02:00
isaacs
060141c58a website: Improved install button behavior
Just install whatever's best for the OS.

Detect host os and architecture from the navigator properties.  If we
can't make a good guess, then they get the tarball, and of course
everything we have is on the full download page.
2012-08-16 15:41:23 -07:00
isaacs
b7223abbdc v8: Reapply floating patches 2012-08-16 14:43:42 -07:00
isaacs
73976b6c9d v8: Upgrade to 3.11.10.18 2012-08-16 14:42:56 -07:00
isaacs
226d37bb68 blog: Fix binary links for 0.8.7 post 2012-08-15 18:56:48 -07:00
Nathan Rajlich
f9df96b950 email-footer: update the binary package links to x86/x64 2012-08-15 18:05:33 -07:00
isaacs
c0558ff774 website: fix font-size on 'explore' list items 2012-08-15 17:33:03 -07:00
isaacs
073c7b4d08 Now working on 0.8.8 2012-08-15 17:25:25 -07:00
isaacs
25de1c1feb Merge branch 'v0.8.7-release' into v0.8 2012-08-15 17:25:01 -07:00
isaacs
b6cf0454a9 blog: release 0.8.7 2012-08-15 17:23:59 -07:00
isaacs
f640c5d35c 2012.08.15, Version 0.8.7 (Stable)
* npm: Upgrade to 1.1.49

* website: download page (Golo Roden)

* crypto: fix uninitialized memory access in openssl (Ben Noordhuis)

* buffer, crypto: fix buffer decoding (Ben Noordhuis)

* build: compile with -fno-tree-vrp when gcc >= 4.0 (Ben Noordhuis)

* tls: handle multiple CN fields when verifying cert (Ben Noordhuis)

* doc: remove unused util from child_process (Kyle Robinson Young)

* build: rework -fvisibility=hidden detection (Ben Noordhuis)

* windows: don't duplicate invalid stdio handles (Bert Belder)

* windows: fix typos in process-stdio.c (Bert Belder)
2012-08-15 15:52:57 -07:00
isaacs
24ff8f4c79 website: Sharpen and clean up download page more
Retinaify the images!
2012-08-15 15:52:57 -07:00
isaacs
86778607c9 build: Don't set gcc_version for Windows 2012-08-15 11:29:34 -07:00
isaacs
afa57799e4 website: Use table for download page
Paragraphs of text are too wordy.

Use big pretty images and clickable blocky links.
2012-08-15 09:10:03 -07:00
Golo Roden
15c6c0eecc website: download page
- Improved styling of download links.
- index.html#download now redirects to /download/
- Added missing hyphens, and added the missing "and 64-bit" for the Mac
  Installer.
2012-08-15 09:09:23 -07:00
isaacs
3ccee08759 npm: Upgrade to 1.1.49
- node-gyp@0.6.5
- abstracted-out configs
- publishing over proxies
- bugfixes to all the deps
2012-08-14 20:27:28 -07:00
Ben Noordhuis
2c13cbbc0b crypto: fix uninitialized memory access in openssl
ASN1_STRING_to_UTF8() passes an ASN1_STRING to ASN1_STRING_set() but forgot to
initialize the `length` field.

Fixes the following valgrind error:

  $ valgrind -q --track-origins=yes --num-callers=19 \
      out/Debug/node test/simple/test-tls-client-abort.js
  ==2690== Conditional jump or move depends on uninitialised value(s)
  ==2690==    at 0x784B69: ASN1_STRING_set (asn1_lib.c:382)
  ==2690==    by 0x809564: ASN1_mbstring_ncopy (a_mbstr.c:204)
  ==2690==    by 0x8090F0: ASN1_mbstring_copy (a_mbstr.c:86)
  ==2690==    by 0x782F1F: ASN1_STRING_to_UTF8 (a_strex.c:570)
  ==2690==    by 0x78F090: asn1_string_canon (x_name.c:409)
  ==2690==    by 0x78EF17: x509_name_canon (x_name.c:354)
  ==2690==    by 0x78EA7D: x509_name_ex_d2i (x_name.c:210)
  ==2690==    by 0x788058: ASN1_item_ex_d2i (tasn_dec.c:239)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x787C93: ASN1_item_d2i (tasn_dec.c:136)
  ==2690==    by 0x78F5E4: d2i_X509 (x_x509.c:141)
  ==2690==    by 0x7C9B91: PEM_ASN1_read_bio (pem_oth.c:81)
  ==2690==    by 0x7CA506: PEM_read_bio_X509 (pem_x509.c:67)
  ==2690==    by 0x703C9A: node::crypto::SecureContext::AddRootCerts(v8::Arguments const&) (node_crypto.cc:497)
  ==2690==  Uninitialised value was created by a stack allocation
  ==2690==    at 0x782E89: ASN1_STRING_to_UTF8 (a_strex.c:560)
2012-08-15 02:15:47 +02:00
Ben Noordhuis
bcb5bdebe7 test: raise pummel/test-net-throttle write req size
pummel/test-net-throttle assumes that a couple of big write requests result in
some of them getting queued because the kernel's send buffer fills up.

Said assumption breaks on systems with large send buffers. Raise the size of
the write request to ameliorate the issue.

This is a back-port of commit 6770555 from the master branch.
2012-08-14 23:11:28 +02:00
Ben Noordhuis
786e1e8712 buffer, crypto: fix buffer decoding
Before this commit, DecodeWrite() mistakenly tried to convert buffers to
UTF-8 strings which:

  a) produced invalid character sequences when the buffer contained
     octets > 127, and
  b) lead to spurious test failures because DecodeWrite() wrote less bytes
     than DecodeBytes() said it would, with the remainder either containing
     zeros or garbage

Fix that by simply copying the buffer's data to the target buffer when the
encoding is BINARY or by converting the buffer to a binary string when it's
UTF8 or ASCII.

Fixes #3651, #3866.
2012-08-14 23:00:09 +02:00
Ben Noordhuis
100e163dda build: compile with -fno-tree-vrp when gcc >= 4.0 2012-08-13 15:33:27 +02:00
Ben Noordhuis
9f26130a0e deps: upgrade libuv to 2c3e8b6 2012-08-13 15:33:27 +02:00
Ben Noordhuis
6b18e88b68 tls: handle multiple CN fields when verifying cert
Fixes #3861.
2012-08-12 21:48:26 +02:00
Kyle Robinson Young
4ef808ec0a doc: remove unused util from child_process 2012-08-12 00:08:43 +02:00
Nathan Rajlich
64ac54a64d Makefile: add a better check to ensure a node "release"
Closes #3841.
Closes #3842.
2012-08-09 17:11:41 -07:00
isaacs
c82e2889e8 blog post for 0.8.6 2012-08-07 12:05:23 -07:00
isaacs
e8bc2edabf Now working on 0.8.7 2012-08-07 12:02:49 -07:00
isaacs
e8834dc1a1 Merge branch 'v0.8.6-release' into v0.8 2012-08-07 12:02:38 -07:00
isaacs
0544a586ca 2012.08.07, Version 0.8.6 (Stable)
* npm: Upgrade to v1.1.48

* Add 'make binary' to build binary tarballs for all Unixes (Nathan Rajlich)

* zlib: Emit 'close' on destroy(). (Dominic Tarr)

* child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon)

* installer: prevent ETXTBSY errors (Ben Noordhuis)

* installer: honor --without-npm, default install path (Ben Noordhuis)

* net: make pause work with connecting sockets (Bert Belder)

* installer: fix cross-compile installs (Ben Noordhuis)

* net: fix .listen({fd:0}) (Ben Noordhuis)

* windows: map WSANO_DATA to UV_ENOENT (Bert Belder)
2012-08-07 11:56:58 -07:00
isaacs
f11a3dfcd6 npm: Upgrade to 1.1.48
Fixes an issue with publishing readmes that are not called
'README.md', so that they still end up on the website
2012-08-06 19:09:58 -07:00
Nathan Rajlich
093be8b16b install: prevent a KeyError from being thrown when PORTABLE is not set 2012-08-06 13:22:05 -07:00
isaacs
caf69aa91a npm: Upgrade to 1.1.47 2012-08-06 13:07:31 -07:00
isaacs
9badc002b4 uv: Upgrade to dfb6be0 2012-08-06 12:40:40 -07:00
Nathan Rajlich
a23df7710a Merge branch 'binary-tarballs' into v0.8 2012-08-06 12:25:45 -07:00
Nathan Rajlich
cc6034ac86 email-footer: add links to the expected common binary packages
We can do other OSs like 32 and 64-bit OS X, but we should encourage
users to use the installer on OS X so we'll omit it here.
2012-08-06 11:57:47 -07:00
Nathan Rajlich
dc818135a5 Makefile: move the release verification logic into a make release-only target 2012-08-06 11:41:45 -07:00
Nathan Rajlich
8b11f29cf3 Makefile: properly set the ARCH variable when forcing a DESTCPU 2012-08-06 11:40:44 -07:00
Nathan Rajlich
dc9ae01ef7 Makefile: allow the dest-cpu to be specified for make binary
Needed for 64-bit Solaris, and 32-bit OS X
2012-08-06 11:40:44 -07:00
Nathan Rajlich
eadc2ec5c8 Makefile: add make binary helper target 2012-08-06 11:40:39 -07:00
Nathan Rajlich
bd10bf4418 Makefile: add make tar helper target 2012-08-06 11:40:01 -07:00
Nathan Rajlich
42aac41b93 Makefile: add target for precompiled binary tarballs
This target compiles node with "/" as the prefix and installs into a directory
like: "node-v0.8.6-darwin-x86_64". Then it creates a gzipped-tarball of that
directory, called something like: "node-v0.8.6-darwin-x86_64.tar.gz".
2012-08-06 10:22:08 -07:00
Nathan Rajlich
7a9db6cfb1 install: add a "portable" mode to the shebang-rewriting logic
This "portable" mode rewrites the npm shebang to use the "node" executable
in the same directory relative to the "npm" script. This makes the "npm"
script "just work" even when "node" is not in the user's $PATH.

This mode is necessary for the precompiled binary packages that may potentially
be extracted to anywhere. The regular shebang-rewriting logic would normally
set the npm script's shebang to "/bin/node" which will not be present on anyone's
machine. In the end, we want the precompiled packages to be as user-friendly as
possible.
2012-08-06 10:18:27 -07:00
Nathan Rajlich
6bdd4d0205 install: install the "wafadmin/Tools" files into the correct dir
Previously they were going into just "wafadmin" and node-waf wasn't working.
2012-08-06 10:16:09 -07:00
Kyle Robinson Young
bc7479d232 doc: fix typos in child_process 2012-08-06 00:13:56 +02:00
isaacs
4ff56aa15e doc: util.pump is deprecated. Use Stream.pipe 2012-08-05 14:47:23 -07:00
isaacs
7bb814f9db errnoException must be done immediately 2012-08-05 14:42:22 -07:00
isaacs
93be4ffd4b test-message: fix message output
1. The net changes add a stack frame to stdin errors.
2. The error line numbers were overly strict in many places.
2012-08-05 14:33:23 -07:00
Nathan Rajlich
3254caceef install: use os.path.join() to create the npm shebang
Prettier formatting for the shebang if the "prefix" ends with a /
2012-08-05 14:02:30 -07:00
Dominic Tarr
f4a4ef7a2d zlib: Emit 'close' on destroy(). 2012-08-04 13:04:15 -07:00
Tyler Neylon
b48684c6f1 child_process: Fix stdout=null when stdio=['pipe']
Previously, a command with a short stdio array would result in the child's
stdout and stderr objects set to null. For example:

var c = child_process.spawn(cmd, args, {stdio: ['pipe']});
// results in c.stdout === null.

The expected behavior is the above line functioning the same as this one:

var c = child_process.spawn(cmd, args, {stdio: ['pipe', null, null]});
// provides correct (non-null) c.stdout; as does the above, after this fix.
2012-08-04 11:30:58 -07:00
isaacs
a7f3288a87 blog post for 0.6.21 2012-08-04 11:30:44 -07:00
Nathan Rajlich
57f785151a install: install the "wafadmin" files into the correct directory
Before they were just being copied into "lib/node/".
Now they go into "lib/node/wafadmin/".
2012-08-04 00:10:58 -07:00
Ben Noordhuis
110e499fe7 installer: prevent ETXTBSY errors
The installer does what amounts to `cp -p`. If the node binary is in use at
the time of the copy, it'd fail with a ETXTBSY error. That's why it's unlinked
first now.
2012-08-04 02:41:34 +02:00
Ben Noordhuis
b21c8e0bfd installer: honor --without-npm, default install path
* honor the --without-waf and --without-npm configure switches

* a small logic bug made the installer script install to $PWD instead of
  /usr/local if --prefix= was not passed to configure
2012-08-04 02:18:18 +02:00
Bert Belder
5fdeebd94d net: make pause work with connecting sockets
This fixes the problem that calling pause() on a socket would not
actually prevent 'data' events from being emitted. It also replaces
the existing test by a more elaborate one.

Ref: #3118
2012-08-03 17:11:08 +02:00
isaacs
585388bbd8 blog: Fix date on 0.8.5 release 2012-08-02 15:00:57 -07:00
isaacs
575c12bba3 Blog post about 0.8.5 2012-08-02 14:59:47 -07:00
isaacs
02dae998c3 Now working on 0.8.6 2012-08-02 14:58:15 -07:00
isaacs
2bee3aeee9 Merge branch 'v0.8.5-release' into v0.8 2012-08-02 14:57:34 -07:00
isaacs
9b86a4453f 2012.08.02, Version 0.8.5 (Stable)
* node: tag Encode and friends NODE_EXTERN (Ben Noordhuis)

* fs: fix ReadStream / WriteStream missing callback (Gil Pedersen)

* fs: fix readFileSync("/proc/cpuinfo") regression (Ben Noordhuis)

* installer: don't assume bash is installed (Ben Noordhuis)

* Report errors properly from --eval and stdin (isaacs)

* assert: fix throws() throws an error without message property (koichik)

* cluster: fix libuv assert in net.listen() (Ben Noordhuis)

* build: always link sunos builds with libumem (Trent Mick)

* build: improve armv7 / hard-float detection (Adam Malcontenti-Wilson)

* https: Use host header as effective servername (isaacs)

* sunos: work around OS bug to prevent fs.watch() from spinning (Bryan Cantrill)

* linux: fix 'two watchers, one path' segfault (Ben Noordhuis)

* windows: fix memory leaks in many fs functions (Bert Belder)

* windows: don't allow directories to be opened for writing/appending (Bert Belder)

* windows: make fork() work even when not all stdio handles are valid (Bert Belder)

* windows: make unlink() not remove mount points, and improve performance (Bert Belder)

* build: Sign pkg installer for OS X (isaacs)
2012-08-02 13:56:50 -07:00
isaacs
2dd710e7ea build: Sign pkg installer for OS X
This makes the installer work on Mountain Lion.
2012-08-02 13:56:50 -07:00
Ben Noordhuis
9315377693 doc: improve cluster.workers documentation 2012-08-02 17:47:33 +02:00
isaacs
37537d5720 test: stdin error messages 2012-08-02 08:11:18 -07:00
isaacs
f5c07b65a0 npm: Upgrade to 1.1.46 2012-08-02 08:09:47 -07:00
Ben Noordhuis
50e00de92a installer: fix cross-compile installs
The old installer was a JS script, which didn't work if node had been
cross-compiled for another architecture. Replace it with a python script.

Fixes #3807.
2012-08-02 13:51:35 +02:00
Ben Noordhuis
34c750d7a9 net: fix .listen({fd:0}) 2012-08-02 13:37:02 +02:00
Ben Noordhuis
6db9e12de5 deps: remove openssl apps and tests
Shrinks the tarball by a few hundred kilobytes and fixes a broken symlinks
issue on Windows.

Fixes #3813.
2012-08-02 12:20:19 +02:00
Ben Noordhuis
53f3b128f5 node: tag Encode and friends NODE_EXTERN
Makes the symbols visible on Windows. They were already visible on Unices.

Fixes #3811.
2012-08-02 01:35:54 +02:00
Gil Pedersen
f1fba8d1f5 fs: fix ReadStream / WriteStream missing callback
The (undocumented) callback argument to .destroy() was not called if the
stream was no longer readable / writable.
2012-08-02 01:25:53 +02:00
Ben Noordhuis
23f09d7e02 fs: fix readFileSync("/proc/cpuinfo") regression
Don't use positional reads. Not all proc files support pread(), especially on
older linux kernels.

Fixes #3808.
2012-08-01 20:30:40 +02:00
isaacs
fd56981b4c blog: Remove all windows line endings once and for all 2012-08-01 10:14:17 -07:00
Dave Pacheco
fe659a6017 update profiling blog post to use shell redirection instead of -o 2012-08-01 10:11:36 -07:00
isaacs
f70be41d80 blog: Remove ^M chars from profiling-node-js blog post 2012-08-01 10:11:30 -07:00
Ben Noordhuis
cccce60b3e installer: don't assume bash is installed
Use `/bin/sh` instead of `bash` when running the relocate.sh script.
2012-08-01 13:39:12 +02:00
Bert Belder
285a46d1ca uv: upgrade to 6209fe5 2012-08-01 01:45:44 +02:00
Eugen Dueck
af699c47d1 doc: http: document res.write() drain return value 2012-08-01 01:45:09 +02:00
Bert Belder
2981f01b46 v8: don't show performance warnings when compiling with msvc
Patch sent upstream: http://codereview.chromium.org/10829109/
2012-08-01 00:52:37 +02:00
Bert Belder
9e2319f977 docs: remove unused require from example
Closes GH-3801
2012-07-31 21:38:58 +02:00
Bert Belder
80ab9a891a uv: upgrade to 69c2ef8 2012-07-31 21:26:26 +02:00
Ben Noordhuis
de16da532e deps, tools: remove stray reject files 2012-07-31 13:45:16 +02:00
Ben Noordhuis
2eb6a62f4f doc: document child_process.fork() limitation 2012-07-31 03:09:49 +02:00
isaacs
f8dab6acb6 doc: Remove timeout arg in child_process.fork
Fix #3784
2012-07-30 11:01:57 -07:00
Shigeki Ohtsu
5b37da2ac0 doc: fix domains example
Need `utf8` encoding for JSON.parse and fix to avoid JSON.parse error when only
one argument is passed in domain.bind
2012-07-30 19:15:46 +02:00
isaacs
b3cf3f35fc Report errors properly from --eval and stdin 2012-07-30 08:21:39 -07:00
koichik
72bc4dcda4 assert: fix throws() throws an error without message property
Fixes #2893.
2012-07-29 19:48:16 +09:00
Ben Noordhuis
aa0650f444 cluster: fix libuv assert in net.listen()
Problem: calling `server.listen()` (no port) on a net.Server triggered the
following libuv assertion:

  node: ../deps/uv/src/unix/stream.c:406: uv__write: Assertion `fd_to_send >= 0'
  failed.

Cause: uv_tcp_t handles are lazily initialized. Omitting the port made the
handle get initialized even more lazily. Too lazily - it wasn't initialized
when the handle was sent over to the child process.

Solution: implicitly bind to a random port in listen() when the port number
is omitted, it forces the handle to initialize. This is not a change in
behavior, listen() has always been identical to listen(0).

Fixes #3325.
2012-07-29 02:07:16 +02:00
Ben Noordhuis
879d329a5a deps: upgrade libuv to 4fe1916 2012-07-28 16:50:55 +02:00
Ben Noordhuis
d559bed0d5 node: use variadic functions in ev-emul.h
Fixes #3786.
2012-07-28 14:10:13 +02:00
Trent Mick
f70b138fcb always link sunos builds with libumem 2012-07-27 11:03:26 -07:00
Adam Malcontenti-Wilson
90efdb3a5b build: improve armv7 / hard-float detection 2012-07-26 23:38:34 +02:00
isaacs
b0c0111b04 https: Use host header as effective servername 2012-07-25 13:38:43 -07:00
Nathan Rajlich
9eddaebb79 assert: remove unnecessary use of __proto__
AssertionError already inherits from Error above using util.inherits(),
so this extra line was redundant.

test/simple/test-assert.js already tests for `instanceof`, and still passes.
2012-07-25 10:41:08 -07:00
isaacs
b207e24bcd Blog post for 0.8.4 2012-07-25 10:38:41 -07:00
isaacs
3d34590fba Now working on v0.8.5 2012-07-25 10:28:03 -07:00
isaacs
32141844f1 Merge branch 'v0.8.4-release' into v0.8 2012-07-25 10:26:03 -07:00
isaacs
8656c2654e Fix #3761 build: Default to V=1 2012-07-25 10:25:37 -07:00
isaacs
f98562fcd7 2012.07.25, Version 0.8.4 (Stable)
* V8: Upgrade to 3.11.10.17

* npm: Upgrade to 1.1.45

* net: fix Socket({ fd: 42 }) api (Ben Noordhuis)

* readline: Remove event listeners on close (isaacs)

* windows: correctly prep long path for fs.exists(Sync) (Bert Belder)

* debugger: wake up the event loop when a debugger command is dispatched (Peter Rybin)

* tls: verify server's identity (Fedor Indutny)

* net: ignore socket.setTimeout(Infinity or NaN) (Fedor Indutny)
2012-07-24 17:06:58 -07:00
isaacs
7fd3cb666b Build: add jslintfix 2012-07-24 17:06:57 -07:00
isaacs
5809426d75 net.js: lint 2012-07-24 17:05:31 -07:00
Ben Noordhuis
1513848f88 net: fix Socket({ fd: 42 }) api
Make the implementation match the documentation. This should work:

  var s = new net.Socket({ fd: 42, allowHalfOpen: true };

And now it does.
2012-07-24 15:53:22 -07:00
isaacs
e4c9c9f412 readline: Remove event listeners on close
Fix #3756
2012-07-24 15:36:53 -07:00
isaacs
2c487669f7 v8: Reapply floating patches 2012-07-24 14:19:50 -07:00
isaacs
f4f0daa44d V8: Upgrade to 3.11.10.17 2012-07-24 14:18:47 -07:00
isaacs
0a0002b480 npm: Upgrade to 1.1.45
This includes node-gyp 0.6.1
2012-07-24 12:34:13 -07:00
Bert Belder
43a0c88116 windows: correctly prep long path for fs.exists(Sync)
Closes GH-3739
2012-07-23 13:55:42 +02:00
Peter Rybin
688859afc0 debugger: wake up the event loop when a debugger command is dispatched
When the event loop was blocked in epoll / kqueue or similar, debugger
commands wouldn't be processed. This patch fixes that by adding an
uv_async handle which is triggered when a debugger command is
dispatched. The async handle's callback makes sure that V8 is entered.

Closes GH-3626
Closes GH-3718
2012-07-23 13:15:51 +02:00
Brian White
e06b5d7af7 http: remove duplicate assignments
Closes GH-3754
2012-07-23 11:35:52 +02:00
koichik
bc30c90af6 doc: remove duplicate section
Fixes #3750.
2012-07-22 02:33:06 +09:00
Fedor Indutny
42c6952edb tls: pass linting 2012-07-20 22:07:39 +04:00
Fedor Indutny
50122fed8a tls: fix 'hostless' tls connection verification
And fix last failing tests
2012-07-20 21:43:12 +04:00
Fedor Indutny
5950db197c tls: revert accidental API change
socket.authorizationError should always be string. Also make sni test
pass.
2012-07-20 21:10:23 +04:00
Fedor Indutny
4aa09d1e0e tls: localhost is valid against identity-check 2012-07-20 20:51:38 +04:00
Fedor Indutny
e43fe5c833 Revert "http/https: pass request to .createConnection()"
This reverts commit 53716eb0b5.
2012-07-20 20:51:02 +04:00
Fedor Indutny
eb2ca10462 tls: veryify server's identity 2012-07-20 01:49:31 +04:00
Fedor Indutny
53716eb0b5 http/https: pass request to .createConnection()
It's useful for passing some additional options of request object to the
underlying API
2012-07-20 01:49:30 +04:00
Fedor Indutny
1fa0bca2ad net: ignore socket.setTimeout(Infinity) (and NaN) 2012-07-20 01:49:30 +04:00
isaacs
d9057cc090 npm: Upgrade to 1.1.44 2012-07-19 13:03:28 -07:00
isaacs
f6484842b3 Blog post about v0.8.3 2012-07-19 10:20:44 -07:00
isaacs
02ff9741cc Now working on 0.8.4 2012-07-19 10:19:45 -07:00
isaacs
4439f7b879 Merge branch 'v0.8.3-release' into v0.8 2012-07-19 10:19:04 -07:00
isaacs
60bf2d6cb3 2012.07.19, Version 0.8.3 (Stable)
* V8: upgrade to 3.11.10.15

* npm: Upgrade to 1.1.43

* net: fix net.Server.listen({fd:x}) error reporting (Ben Noordhuis)

* net: fix bogus errno reporting (Ben Noordhuis)

* build: Move npm shebang logic into an npm script (isaacs)

* build: fix add-on loading on freebsd (Ben Noordhuis)

* build: disable unsafe optimizations (Ben Noordhuis)

* build: fix spurious mksnapshot crashes for good (Ben Noordhuis)

* build: speed up genv8constants (Dave Pacheco)

* fs: make unwatchFile() remove a specific listener (Ben Noordhuis)

* domain: Remove first arg from intercepted fn (Toshihiro Nakamura)

* domain: Fix memory leak on error (isaacs)

* events: Fix memory leak from removeAllListeners (Nathan Rajlich)

* zlib: Fix memory leak in Unzip class. (isaacs)

* crypto: Fix memory leak in DecipherUpdate() (Ben Noordhuis)
2012-07-19 10:01:56 -07:00
isaacs
0c91b0e48e uv: Upgrade to 94355e4 2012-07-19 09:33:02 -07:00
isaacs
845b9e92d8 uv: Upgrade to 94355e4 2012-07-19 09:32:46 -07:00
Ben Noordhuis
b2648934f0 build: unbreak ustack on smartos
I disabled the -ffunction-sections and -fdata-sections switches in 202df30
because they're horribly buggy with some gcc/binutils combos.

However, it turns out that the dtrace/ustack post-processing tool requires
that V8 is compiled with said switches and was broken because of it.

This commit turns them on again on SunOS systems. Let's hope for the best.
2012-07-19 18:20:34 +02:00
Ben Noordhuis
5a5e128165 build: link with -rdynamic, not -Wl,--export-dynamic
The system linker on SunOS doesn't understand --export-dynamic.
2012-07-19 00:08:37 +02:00
Ben Noordhuis
98b1ce91f6 build: fix mksnapshot crash on sunos
Unconditionally compile V8 with -fno-strict-aliasing on all platforms.

gcc 4.5.2 on sunos generates bad code when -fstrict-aliasing is enabled, which
undoubtedly means that there are more buggy versions of gcc out there.

-fstrict-aliasing does not give a significant performance boost so let's just
disable it.

Fixes #3736.
2012-07-18 23:26:00 +02:00
Ben Noordhuis
beb7425c18 doc: build requires GNU make 3.81+ 2012-07-18 14:23:39 +02:00
Ben Noordhuis
f6f2d42ee9 node: make ev-emul.h compile with -Wextra -Werror
Explicitly cast double to int64_t, it was making add-ons that compile with
`-Wall -Wextra -Werror` fail to build.

Don't use fully variadic macros, gcc in uber-strict mode rejects them.
2012-07-18 13:56:09 +02:00
Ben Noordhuis
e8af340557 doc: advise *strongly* against uncaughtException 2012-07-18 03:46:39 +02:00
isaacs
e1fb7b76e9 uv: Upgrade to b49d6f7 2012-07-17 17:09:34 -07:00
Dave Pacheco
648fdc56a0 tools: speed up genv8constants
genv8constants was much slower than necessary due to lack of pipe buffering.
2012-07-18 00:56:02 +02:00
isaacs
868ffed77c v8: Reapply floating patches 2012-07-17 11:44:01 -07:00
isaacs
a0a0062d61 v8: upgrade to 3.11.10.15 2012-07-17 11:43:02 -07:00
isaacs
7397ab2cf1 uv: Upgrade to a9f6f06 2012-07-17 11:40:13 -07:00
isaacs
c383befd25 npm: Upgrade to 1.1.43 2012-07-17 11:37:39 -07:00
isaacs
d6b78d0e37 domain: Fix stack leak on error 2012-07-16 18:04:55 -07:00
Mike Morearty
19aa05fab8 doc: fix bug in child_process.spawn() sample code 2012-07-16 02:27:01 +02:00
Bert Belder
23dc099299 benchmark: add single process tls connection benchmark 2012-07-14 01:43:34 +02:00
George Shank
8721667a2f doc: update 'Fork me at Github' ribbon
Replace 'Fork me at Github' ribbon with a new one fitting the website's color
scheme.
2012-07-13 14:09:06 -07:00
isaacs
ef1b7dd3d7 build: Move npm shebang logic into an npm script
This allows us to run npm's scripts/relocate.sh script whenever
necessary, if for example node has been 'make install'ed into one
folder, and then you wish to move it into another one.
2012-07-13 12:08:17 -07:00
isaacs
9d4362403c npm: upgrade to 1.1.41 2012-07-13 12:08:17 -07:00
Ben Noordhuis
acbfc40888 build: fix add-on loading on freebsd
Link with -Wl,--export-dynamic, makes symbols from the node binary visible to
binary add-ons.

Fixes "undefined symbol: _ZN2v811HandleScopeC1Ev" errors when loading add-ons
on FreeBSD and likely other BSDs.

Fixes #3623.
2012-07-13 01:57:00 +02:00
Nathan Rajlich
713b9249e1 Revert "events: don't delete the listeners array in removeListener()"
This reverts commit 928ea564d1.

Keeping the original Array instance in-place essentially causes a memory leak
on EventEmitters that use an infinite number of event names (an incrementing
counter, for example), which isn't an unreasonable thing to want to do.

Fixes #3702.
2012-07-12 15:43:35 -07:00
Ben Noordhuis
3a6314dbe1 net: fix net.Server.listen({fd:x}) error reporting
* don't assert when fd isn't an open file descriptor

* don't die with a ReferenceError when fd isn't a file descriptor
  you can listen() on

Fixes #3699.
2012-07-12 18:18:38 +02:00
Ben Noordhuis
5d97d72753 net: fix bogus errno reporting
_listen2() emits the error on the next tick. The errno value may have changed
by then.
2012-07-12 16:56:44 +02:00
Ben Noordhuis
c6bb361b84 build: partially fix configure on ARM
V8 on ARM requires that armv7 is set. We don't have a good way to detect the
CPU model right now so we pick a default and hope that it works okay for the
majority of people.

Non-scientific sampling - the ARM hardware I have lying around the house -
suggests that ARMv5 and ARMv6 are still most common so armv7=0 it is.

This obviously needs to be revisited sometime in the future.
2012-07-12 16:29:46 +02:00
Ben Noordhuis
202df30aab build: disable unsafe optimizations
Compile at -O2 and disable optimizations that trigger gcc bugs.

Some people still reported mksnapshot crashes after commit b40f813 ("build: fix
spurious mksnapshot crashes for good" - so much for that).

Average performance of the -O2 binary is on par with the -O3 binary. Variance
on the http_simple bytes/8 benchmark appears to be slightly greater but small
enough that the possibly of it being noise cannot be excluded.

The new binary very slightly but consistently outperforms the -O3 binary (by
about 0.5%) on the mostly CPU-bound bytes/102400 benchmark. That could be an
artifact of the system I benchmarked it on, a Core 2 Duo with a puny 32 kB of
L1 instruction cache. The smaller binary seems to play nicer with the cache.
2012-07-12 16:17:25 +02:00
Bert Belder
d2e40f66cc Merge branch 'v0.6' into v0.8 2012-07-12 03:30:04 +02:00
isaacs
b6e916db58 Now working on 0.6.21 2012-07-11 10:15:03 -07:00
Philipp Hagemeister
1d99441d37 tools: fix shebang in tools/doc/generate.js 2012-07-11 14:36:43 +02:00
Ben Noordhuis
b40f813bab build: fix spurious mksnapshot crashes for good
A variety of gcc bugs made mksnapshot crash with either a segmentation fault
or a 'pure virtual method callled' run-time error.

After much wailing and gnashing of teeth I managed to deduce that the bugs
show up when:

  1. gcc 4.5.2 for i386-pc-solaris2.11 is used and -fstrict-aliasing is
     enabled, or

  2. gcc version 4.4.6 for x86_64-redhat-linux is used and
     -ffunction-sections -finline-functions at -O2 or higher is enabled

Therefore, disable -ffunction-sections and -fdata-sections unconditionally
and disable -fstrict-aliasing only on Solaris.

The -ffunction-sections and -fdata-sections switches were nonsense anyway
because we don't link with -Wl,--gc-sections.
2012-07-11 03:52:13 +02:00
isaacs
bf561c52a5 Blog post for v0.6.20 2012-07-10 17:05:54 -07:00
isaacs
952e513379 2012.07.10 Version 0.6.20 (maintenance)
* npm: Upgrade to 1.1.37 (isaacs)

* benchmark: Backport improvements made in master (isaacs)

* build: always link with -lz (Trent Mick)

* core: use proper #include directives (Ben Noordhuis)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* windows: don't print error when GetConsoleTitleW returns an empty string (Bert Belder)
2012-07-10 16:25:12 -07:00
isaacs
17061d981e .gitignore: Don't ignore node_modules (breaks npm) 2012-07-10 16:16:43 -07:00
isaacs
ae5a209b11 npm: Upgrade to 1.1.37 2012-07-10 16:16:25 -07:00
isaacs
fecebe1dbf build: Regenerate docs for tarball and releases
Related: https://twitter.com/kapeli/status/222477400880070658
2012-07-10 08:02:30 -07:00
Ivan Torres
8146f2e607 doc: clarify fs.symlink and fs.symlinkSync parameters 2012-07-10 16:36:08 +02:00
isaacs
71078f91ed Now working on 0.8.3 2012-07-09 10:25:17 -07:00
isaacs
a4da6300c8 v0.8.2 blog post 2012-07-09 10:24:34 -07:00
isaacs
9547ee90db Merge branch 'v0.8.2-release' into v0.8
Conflicts:
	AUTHORS
2012-07-09 10:23:49 -07:00
Toshihiro Nakamura
6530310ed5 domain: Remove first arg from intercepted fn
Fix to remove the first-arg, in case arguments length is more than 2
Add domain.intercept() test about first-arg removal
2012-07-09 09:37:46 -07:00
Bert Belder
2a8380ce57 Update AUTHORS 2012-07-09 17:28:30 +02:00
Bert Belder
f4369d76c8 Add a .mailmap file, and clean up AUTHORS somewhat
* A mailmap makes it easier to keep track of contributors.
* Changes to the AUTHORS file:
  - fix misspellings
  - add missing/incomplete names
  - remove duplicate mentions
* No names were added to or removed from the AUTHORS list.
2012-07-09 16:55:09 +02:00
Justin Plock
fba1e48fae doc: cluster: worker.pid is now worker.process.pid 2012-07-09 15:57:44 +02:00
Ben Noordhuis
63c2391984 test: make test-fs-watch-file write to tmp dir
Write temp files to test/tmp, not test/fixtures.
2012-07-09 15:48:43 +02:00
Ben Noordhuis
5b5362aa8d fs: make unwatchFile() remove a specific listener
Before this commit, `fs.unwatchFile(path)` removed *all* listeners for `path`.

The function is overloaded now: `fs.unwatchFile(path)` still removes all
listeners, but `fs.unwatchFile(path, cb)` lets you remove a specific listener.

Fixes #3660.
2012-07-09 15:48:43 +02:00
isaacs
bf539f9bfd zlib: Call inflateEnd for UNZIP. Fixes memory leak.
Fix #2595
2012-07-08 22:22:01 -07:00
Nathan Rajlich
d3d83d7b90 process: throw a TypeError when anything but an Array is passed to hrtime()
Fixes #3664.
2012-07-08 20:53:19 -07:00
Ben Noordhuis
26f1bc8e8c crypto: fix DecipherUpdate() memory leak
Fix a memory leak in the the code path that deals with partial hex strings.
2012-07-08 14:45:55 +02:00
isaacs
cc6084b9ac 2012.07.09, Version 0.8.2 (Stable)
* npm: Upgrade to 1.1.36

* readline: don't use Function#call() (Nathan Rajlich)

* Code cleanup to pass 'use strict' (Jonas Westerlund)

* module: add filename to require() json errors (TJ Holowaychuk)

* readline: fix for unicode prompts (Tim Macfarlane)

* timers: fix handling of large timeouts (Ben Noordhuis)

* repl: fix passing an empty line inserting "undefined" into the buffer (Nathan Rajlich)

* repl: fix crashes when buffering command (Maciej Małecki)

* build: rename strict_aliasing to node_no_strict_aliasing (Ben Noordhuis)

* build: disable -fstrict-aliasing for any gcc < 4.6.0 (Ben Noordhuis)

* build: detect cc version with -dumpversion (Ben Noordhuis)

* build: handle output of localized gcc or clang (Ben Noordhuis)

* unix: fix memory corruption in freebsd.c (Ben Noordhuis)

* unix: fix 'zero handles, one request' busy loop (Ben Noordhuis)

* unix: fix busy loop on unexpected tcp message (Ben Noordhuis)

* unix: fix EINPROGRESS busy loop (Ben Noordhuis)
2012-07-07 15:15:17 -07:00
isaacs
c4e9226bdb Fix test-require-json on Windows 2012-07-07 15:15:17 -07:00
Bert Belder
1c1ad9bcf4 v8: reapply floating patches 2012-07-07 23:45:02 +02:00
isaacs
5b5c8b6005 v8: Upgrade to 3.11.10.14 2012-07-07 23:45:00 +02:00
Bert Belder
3e5139fd2f Fix the Windows build 2012-07-07 23:40:12 +02:00
Bert Belder
c6843f40c8 gitignore: ignore .svn directories 2012-07-07 23:19:12 +02:00
isaacs
c49888bd84 Now working on 0.8.2 2012-07-07 13:42:25 -07:00
isaacs
59a40fc8ed npm: Upgrade to 1.1.36 2012-07-07 12:40:06 -07:00
isaacs
559a98f0d7 doc: Formatting and grammar on stream api doc 2012-07-07 09:53:33 -07:00
Dominic Tarr
7accaeb490 correct documentation of Stream#destroy 2012-07-07 09:51:00 -07:00
Nathan Rajlich
8a9e8d60d2 readline: don't use Function#call()
It wasn't necessary.
2012-07-06 19:41:01 -07:00
Jonas Westerlund
2297d638c1 Forgotten commit: add arguments to handleGroup 2012-07-06 19:28:35 -07:00
Jonas Westerlund
a9b0bcfafe Assign to property of global, instead of implicit global variable
Fixes crash in strict mode.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
c7bc4cacde Use unicode escape sequences instead of octal
The latter is illegal in strict mode.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
4cfdc57712 Inline timeout function, avoiding declaration in conditional
Moving it out would require an anonymous function, or bind(), anyway.
Luckily It's a tiny function. Fixes crash in strict mode.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
7e7d5d38ea Move function declaration out of conditional
Also avoid using eval as identifier.
Fixes crashes in strict mode.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
0b0b72c2fa Move function declaration to top-level
Gets rid of a strict mode error and a few levels of indentation.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
e5bb8391a8 Do not assign to properties that only have getters
It is an error in strict mode, and silent failure otherwise.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
93d4259cf0 Avoid redeclaring variable
Capitalize the constructor to avoid redeclaration.
Fixes strict mode error.
2012-07-06 19:28:35 -07:00
Jonas Westerlund
e11b6b8f75 Remove octal escape sequences and avoid reserved keyword
Both are errors in strict mode.
2012-07-06 19:28:35 -07:00
TJ Holowaychuk
ed7fb149a2 module: add filename to require() json errors
Otherwise it can be quite difficult to figure out which file is busted.

Closes #3580.
2012-07-06 15:26:41 -07:00
Tim Macfarlane
0dba28b5c2 readline: fix for unicode prompts
prompt length is char length, not byte length
2012-07-06 02:14:47 +02:00
Ben Noordhuis
0c47219a72 timers: fix handling of large timeouts
Don't use the double-negate trick to coalesce the timeout argument into a
number, it produces the wrong result for very large timeouts.

Example:

    setTimeout(cb, 1e10); // doesn't work, ~~1e10 == 1410065408
2012-07-05 23:07:27 +02:00
Nathan Rajlich
9126dd2d90 repl: fix passing an empty line inserting "undefined" into the buffer
There was a possiblity of insering the string "undefined" into the repl's
command buffer, which would cause interesting results while evaluating.
2012-07-04 11:51:24 -07:00
Maciej Małecki
6a11f3edf4 repl: fix crashes when buffering command
Wrong order of operands was causing problems while trying to use command
buffering:

    > {
    ...   a: 3,
    ...

    repl.js:284
            if (cmd.trim().match(/^npm /) && !self.bufferedCommand) {
                    ^
    TypeError: Cannot call method 'trim' of undefined
        at finish (repl.js:284:17)
        at REPLServer.self.eval (repl.js:118:5)
        at rli.on.e (repl.js:260:20)
        at REPLServer.self.eval (repl.js:118:5)
        at Interface.<anonymous> (repl.js:250:12)
        at Interface.EventEmitter.emit (events.js:88:17)
        at Interface._onLine (readline.js:183:10)
        at Interface._line (readline.js:502:8)
        at Interface._ttyWrite (readline.js:720:14)
        at ReadStream.<anonymous> (readline.js:105:12)

Test included.

Closes #3515.
Closes #3517.
Closes #3621.
2012-07-04 11:22:10 -07:00
Ben Noordhuis
4fbe7a5fab deps: upgrade libuv to be09be7 2012-07-04 14:08:07 +02:00
Ben Noordhuis
fc4e12b8f1 tools: update gyp to r1426 2012-07-03 20:56:35 +02:00
Ben Noordhuis
5da78905a6 deps: upgrade libuv to 5031a5b 2012-07-03 20:56:26 +02:00
Ben Noordhuis
b1cce04646 build: rename strict_aliasing to node_no_strict_aliasing
Make the variable naming consistent with the other strict aliasing var,
v8_no_strict_aliasing.
2012-07-03 15:28:45 +02:00
Ben Noordhuis
b731c96679 build: disable -fstrict-aliasing for any gcc < 4.6.0
It has been conclusively demonstrated that the -fstrict-aliasing bugs in gcc's
optimizer are not limited to the 4.5.x releases only.

Fixes #3601 among others.
2012-07-03 15:19:17 +02:00
Ben Noordhuis
a0add91987 build: detect cc version with -dumpversion
The heuristic introduced in f78ce08 ("build: handle output of localized gcc or
clang") does not handle "branded" versions of gcc, i.e. a gcc whose output has
been customized by the distro vendor.

Fixes #3601.
2012-07-03 15:15:28 +02:00
Ben Noordhuis
a25a27817f deps: upgrade libuv to cc1b3de 2012-07-02 00:07:11 +02:00
Ben Noordhuis
b53cd9798f doc: document setTimeout / setInterval behavior 2012-07-01 20:09:55 +02:00
Ben Noordhuis
f78ce087ba build: handle output of localized gcc or clang
Before this commit, we used to scan the output of `$CC -v` for strings like
"gcc version x.y.z".

It was pointed out that this approach fails with localized versions of gcc
because those print (for example) "gcc versión x.y.z".

Use the output of `$CC --version` instead and only look at the first line.
2012-06-30 17:49:37 +02:00
Ben Noordhuis
f315029268 build: rename openssl configure switches
For consistency's sake, rename:

  --openssl-use-sys
  --openssl-includes
  --openssl-libpath

To:

  --shared-openssl
  --shared-openssl-includes
  --shared-openssl-libpath

And add --shared-openssl-libname while we're at it.

The old switches still work but `./configure --help` won't print them.

Fixes #3591.
2012-06-30 04:30:49 +02:00
Ben Noordhuis
7e5aeac28f deps: upgrade libuv to 3b8c0da 2012-06-30 03:27:54 +02:00
Ben Noordhuis
b9abb64fbb doc: fs.lchmod() is only available on OS X 2012-06-30 02:23:31 +02:00
isaacs
bc71874262 Blog post about 0.8.1 2012-06-29 10:20:25 -07:00
isaacs
cb64adaadc Merge branch 'v0.8.1-release' into v0.8 2012-06-29 10:14:58 -07:00
isaacs
2134aa3d5c 2012.06.29, Version 0.8.1 (stable)
* V8: upgrade to v3.11.10.12

* npm: upgrade to v1.1.33
  - Support for parallel use of the cache folder
  - Retry on registry timeouts or network failures (Trent Mick)
  - Reduce 'engines' failures to a warning
  - Use new zsh completion if aviailable (Jeremy Cantrell)

* Fix #3577 Un-break require('sys')

* util: speed up formatting of large arrays/objects (Ben Noordhuis)

* windows: make fs.realpath(Sync) work with UNC paths (Bert Belder)

* build: fix --shared-v8 option (Ben Noordhuis)

* doc: `detached` is a boolean (Andreas Madsen)

* build: use proper python interpreter (Ben Noordhuis)

* build: expand ~ in `./configure --prefix=~/a/b/c` (Ben Noordhuis)

* build: handle CC env var with spaces (Gabriel de Perthuis)

* build: fix V8 build when compiling with gcc 4.5 (Ben Noordhuis)

* build: fix --shared-v8 option (Ben Noordhuis)

* windows msi: Fix icon issue which caused huge file size (Bert Belder)

* unix: assume that dlopen() may clobber dlerror() (Ben Noordhuis)

* sunos: fix memory corruption bugs (Ben Noordhuis)

* windows: better (f)utimes and (f)stat (Bert Belder)
2012-06-29 02:11:19 -07:00
isaacs
40f70673c6 blog: Require posts to have a date 2012-06-29 01:22:10 -07:00
isaacs
b919e29871 blog: Direct bugs/feature feedback to issues 2012-06-29 01:20:59 -07:00
isaacs
5193d59219 blog: Don't print 'undefined' for missing author/category 2012-06-29 01:20:13 -07:00
isaacs
103921dac0 blog css: Styling of nested lists 2012-06-29 00:45:55 -07:00
isaacs
1747eeff1a homepage: Update Claudio's title/link 2012-06-28 22:23:53 -07:00
isaacs
3e0757c101 lint 2012-06-28 22:06:53 -07:00
isaacs
3644b0bc96 uv: upgrade to 5b8a112 2012-06-28 19:11:30 -07:00
isaacs
c721604d25 npm: Upgrade to 1.1.33
Support for parallel use of the cache folder
Retry on registry timeouts or network failures
Reduce 'engines' failures to a warning
Use new zsh completion if aviailable
2012-06-28 19:08:32 -07:00
isaacs
f2a9ed4873 Fix #3577 Un-break require('sys') 2012-06-28 10:14:03 -07:00
Bert Belder
3ea2a618ad uv: upgrade to 4a88b3b 2012-06-28 16:17:56 +02:00
isaacs
37bdd36d70 blog: Show 0.8.0 even after 0.8.1 ships
The 0.(even).0 releases typically have benchmarks and other interesting
stuff, since that's a milestone.
2012-06-27 23:32:50 -07:00
Ben Noordhuis
6531f187d8 util: speed up formatting of large arrays/objects
Don't .indexOf() into the keys array. V8 is smart but not so smart that it
knows how to turn the linear scan into a O(1) lookup.

Fixes #3562.
2012-06-28 03:51:42 +02:00
Ben Noordhuis
be3afd0bec doc: remove references to deprecated fs api
The string-based versions of fs.read() and fs.write() have been deprecated
since before v0.2.0.
2012-06-28 03:50:48 +02:00
Ben Noordhuis
d5f13f6c08 build: use proper python interpreter
Make configure start gyp with the same python interpreter that is used to
run configure itself.

Fixes an issue where configure fails with a SyntaxError because the user
has multiple python binaries on his $PATH and the default one is too old.
2012-06-28 01:07:45 +02:00
Gabriel
9e72b7b65c build: handle CC env var with spaces
For example:

    CC='ccache gcc' ./configure
2012-06-27 19:52:01 +02:00
Bert Belder
0cdeb8ed96 windows: make fs.realpath(Sync) work with UNC paths
Closes #3542
2012-06-27 01:59:25 +02:00
Ben Noordhuis
f00c8bcef8 build: fix --shared-v8 option 2012-06-27 00:35:16 +02:00
isaacs
21aa0df8b2 realpath: No sync cb() calling allowed. 2012-06-26 15:20:26 -07:00
Ben Noordhuis
1e50282ae8 deps: upgrade libuv to 4d42af2 2012-06-26 23:38:35 +02:00
Tim Oxley
69f594d22c Added % difference for perf benchmarks in 0.8 post 2012-06-26 10:54:20 -07:00
Bert Belder
10448487e5 configure: don't fail if compiler_version() doesn't work
This fixes the Windows build.
2012-06-26 19:23:24 +02:00
Andreas Madsen
401ff10295 doc: detached is a boolean 2012-06-26 17:30:07 +02:00
Ben Noordhuis
06c82c5069 build: expand ~ in ./configure --prefix=~/a/b/c 2012-06-26 16:35:14 +02:00
Ben Noordhuis
07e5877144 build: disable strict aliasing in v8 with gcc 4.5.x
The gcc 4.5.x have various bugs that make V8 crash in various and interesting
ways when -fstrict-aliasing is in effect.
2012-06-26 03:01:46 +02:00
Bert Belder
f60def5e9a v8: reapply floating patches 2012-06-26 02:03:49 +02:00
Bert Belder
74872b0dc9 v8: upgrade to version 3.11.10.12 2012-06-26 02:03:24 +02:00
Andreas Madsen
3d51646c4b doc: replace references to cluster.autoFork 2012-06-25 23:17:18 +02:00
Bert Belder
41a4b734d3 windows: remove 256x256 version of the icon
Nobody needs that anyway, it's just eating up space.
2012-06-25 18:40:48 +02:00
Bert Belder
3f932c52b0 windows msi: don't use .exe file as icon
This makes the installer nice and small again.
2012-06-25 18:40:12 +02:00
koichik
d7825b3c1d docs: add punycode to TOC
Refs #3301.
2012-06-25 09:07:57 -07:00
isaacs
7823474022 blog post for v0.8.0 2012-06-25 07:59:14 -07:00
isaacs
b07b391304 Now working on 0.8.1 2012-06-25 07:58:03 -07:00
isaacs
5feea97b53 Merge branch 'v0.8.0-release' into v0.8 2012-06-25 07:57:45 -07:00
isaacs
8b8a7a7f9b 2012.06.25, Version 0.8.0 (stable)
* V8: upgrade to v3.11.10.10

* npm: Upgrade to 1.1.32

* Deprecate iowatcher (Ben Noordhuis)

* windows: update icon (Bert Belder)

* http: Hush 'MUST NOT have a body' warnings to debug() (isaacs)

* Move blog.nodejs.org content into repository (isaacs)

* Fix #3503: stdin: resume() on pipe(dest) (isaacs)

* crypto: fix error reporting in SetKey() (Fedor Indutny)

* Add --no-deprecation and --trace-deprecation command-line flags
* (isaacs)

* fs: fix fs.watchFile() (Ben Noordhuis)

* fs: Fix fs.readfile() on pipes (isaacs)

* Rename GYP variable node_use_system_openssl to be consistent (Ryan
* Dahl)
2012-06-25 07:37:20 -07:00
isaacs
9a7158de18 Hotfix for #3528 Add strdup in uv_cpu_info 2012-06-25 07:37:19 -07:00
Mathias Bynens
839bf025a8 docs: Switch to the asynchronous Google Analytics snippet
The old snippet needlessly uses `document.write`. Let’s use the
optimized version of the most recent, asynchronous GA snippet:
http://mathiasbynens.be/notes/async-analytics-snippet
2012-06-23 11:54:51 -07:00
isaacs
8a946c2ee7 benchmark: Backport improvements made in master
Ported to v0.6 for easier comparison in the 0.8.0 blog post.
2012-06-23 10:03:12 -07:00
isaacs
38250f6403 npm: Upgrade to 1.1.32 2012-06-22 15:14:12 -07:00
Bert Belder
1b114162ab uv: upgrade to 0387c23 2012-06-22 20:53:04 +02:00
isaacs
2603cc564d blog: add RSS link tag for discovery 2012-06-22 09:04:14 -07:00
isaacs
d34fea59e1 blog: Generate RSS feeds 2012-06-22 08:49:20 -07:00
isaacs
91835966eb npm: Upgrade to 1.1.31 2012-06-22 07:45:21 -07:00
isaacs
5565366a33 uv: Upgrade to 171e2f71b9 2012-06-22 07:44:40 -07:00
Bert Belder
a1b274108f windows msi: use .url files for documentation and website shortcuts 2012-06-22 15:24:23 +02:00
Bert Belder
399731e3a0 windows msi: add npm dir to user PATH only
The NPM folder is personal to the user. It shouldn't be added to the
system-wide path.
2012-06-22 15:24:22 +02:00
Bert Belder
2dccebd4b8 windows msi: set icon for add/remove programs dialog 2012-06-22 15:24:21 +02:00
Bert Belder
3bab12197f windows: fix/improve nodejsvars.bat
- Fix: it didn't work for the x86 version of node
- Also add NPM to path
- Also print node version
- Don't change dir to home dir if not started from the start menu
2012-06-22 15:24:21 +02:00
isaacs
de89bbb00c blog: Show category in post metadata 2012-06-21 19:45:11 -07:00
isaacs
441e792849 stdin.pipe: Replace forgotten opts member 2012-06-21 19:36:17 -07:00
isaacs
6014a62b3e blog: Missing title tag 2012-06-21 19:20:09 -07:00
isaacs
ff2a1b86c3 blog: Minor tweaks to style and some data conversion cleanup 2012-06-21 19:15:03 -07:00
Joe Shaw
38250f9aef authors: update email address
Closes #3507.
2012-06-22 02:09:45 +02:00
isaacs
9df5fda777 Merge branch 'blog' 2012-06-21 16:19:56 -07:00
isaacs
8f1a38d916 Generate static HTML blog content out of markdown 2012-06-21 16:18:17 -07:00
isaacs
ddf52bd347 Initial blog source
Exported from WP and cleaned up a bit.
2012-06-21 16:18:17 -07:00
isaacs
c6f7fd7e47 Merge branch 'stdin-resume-pipe' 2012-06-21 16:18:00 -07:00
isaacs
5ec056633f Fix #3503: stdin: resume() on pipe(dest) 2012-06-21 16:16:30 -07:00
Fedor Indutny
af52bc4fe6 crypto: fix error reporting in SetKey() 2012-06-21 16:06:06 -07:00
isaacs
fce7c958ed test: add deprecation fixture 2012-06-21 14:47:25 -07:00
isaacs
8988af58f4 Externalize node::no_deprecation 2012-06-21 13:55:40 -07:00
isaacs
48c3d20041 Apply --no-deprecation to C++ warnings as well 2012-06-21 12:29:33 -07:00
isaacs
5b39929d47 Add --no-deprecation and --trace-deprecation flags 2012-06-21 12:05:33 -07:00
isaacs
260695afd0 http: Hush 'MUST NOT have a body' warnings to debug() 2012-06-21 12:05:33 -07:00
Bert Belder
6e5217d320 Fix bug in io benchmark 2012-06-21 20:52:38 +02:00
Ben Noordhuis
1bf704a571 iowatcher: add deprecation warning 2012-06-21 17:55:05 +02:00
Ben Noordhuis
8708bb0280 doc: update fs.watchFile() docs 2012-06-21 15:03:49 +02:00
Ben Noordhuis
ef1ffcb717 fs: make fs.watchFile() interval default to 5007 2012-06-21 15:03:21 +02:00
Ben Noordhuis
f0ce98441f fs: make fs.watchFile() work on windows 2012-06-21 03:05:18 +02:00
Ben Noordhuis
d98a8578d6 test: add another fs.watchFile() test 2012-06-21 02:50:13 +02:00
Ben Noordhuis
09150b0616 node: replace NODE_STAT_STRUCT with uv_statbuf_t 2012-06-21 02:42:28 +02:00
Bert Belder
ae7a3cddae uv: upgrade to da59427 2012-06-21 02:39:13 +02:00
Karl Skomski
57d53a47e8 Use parent SlowBuffer, if any, when Buffer is sliced
Closes #3416
Closes #3477
2012-06-21 01:46:04 +02:00
Fedor Indutny
81a889fd88 v8: fix postmortem debugging tools build 2012-06-21 00:35:52 +02:00
Bert Belder
6b8ae8e66d v8: reapply floating patches 2012-06-21 00:35:46 +02:00
Bert Belder
6b26583e84 v8: upgrade to v3.11.10.10 2012-06-21 00:33:44 +02:00
Ryan Dahl
fe464a2fea Rename GYP variable node_use_system_openssl to be consistent 2012-06-20 22:38:30 +02:00
isaacs
1d3d02c70d Fix fs.readfile('/dev/stdin')
There is no need for fs.readFile() to be using pread rather than read.
The default semantics of read() are such that subsequent reads are where
we want them anyway.
2012-06-20 10:28:44 -07:00
Bert Belder
7887e68ff7 uv: upgrade to 6e8eb332 2012-06-20 04:23:32 +02:00
isaacs
e4017402ef Now working on 0.8.0 2012-06-19 17:03:12 -07:00
isaacs
fbc2ad5815 Merge branch 'v0.7.12-release' 2012-06-19 17:01:11 -07:00
Bert Belder
26b11915b1 test-domain: fix the test to work on Windows
On Windows, full pathnames are stored in the Error object when
a file i/o error happens. This is not the case on Unix. Before
this fix the test would break because of these full paths.
2012-06-20 01:07:57 +02:00
Bert Belder
7a4dfb6aa8 test-cluster-worker-kill: use SIGKILL instead of SIGHUP
In this test sending SIGKILL has the same effect as sending SIGHUP,
but SIGKILL has the advantage that it works on Windows too.
2012-06-20 00:56:33 +02:00
Bert Belder
3795d77113 windows: listen(pipe_name) is not supported when running cluster
- Added a note to the cluster module documentation.
- Disabled test-cluster-http-pipe.
2012-06-20 00:53:01 +02:00
Bert Belder
41d5fefc10 windows: update icon 2012-06-19 23:51:38 +02:00
isaacs
a72120190a 2012.06.19, Version 0.7.12 (unstable)
* npm: Upgrade to 1.1.30
  - Improved 'npm init'
  - Fix the 'cb never called' error from 'oudated' and 'update'
  - Add --save-bundle|-B config
  - Fix isaacs/npm#2465: Make npm script and windows shims cygwin-aware
  - Fix isaacs/npm#2452 Use --save(-dev|-optional) in npm rm
  - `logstream` option to replace removed `logfd` (Rod Vagg)
  - Read default descriptions from README.md files

* Shims to support deprecated ev_* and eio_* methods (Ben Noordhuis)

* #3118 net.Socket: Delay pause/resume until after connect (isaacs)

* #3465 Add ./configure --no-ifaddrs flag (isaacs)

* child_process: add .stdin stream to forks (Fedor Indutny)

* build: fix `make install DESTDIR=/path` (Ben Noordhuis)

* tls: fix off-by-one error in renegotiation check (Ben Noordhuis)

* crypto: Fix diffie-hellman key generation UTF-8 errors (Fedor Indutny)

* node: change the constructor name of process from EventEmitter to process (Andreas Madsen)

* net: Prevent property access throws during close (Reid Burke)

* querystring: improved speed and code cleanup (Felix Böhm)

* sunos: fix assertion errors breaking fs.watch() (Fedor Indutny)

* unix: stat: detect sub-second changes (Ben Noordhuis)

* add stat() based file watcher (Ben Noordhuis)
2012-06-19 14:07:49 -07:00
isaacs
f105f2f2fd trivial: Doc typo and lint fix 2012-06-19 14:07:48 -07:00
isaacs
252f034b30 email-footer: Label Windows x64 installer properly 2012-06-19 14:07:48 -07:00
Ben Noordhuis
067be2b3fe node: fix namespacing issue in ev-emul.h
Always use C linkage, prevent accidental name mangling.
2012-06-19 23:04:59 +02:00
Bert Belder
3f687dbddf uv: upgrade to b496c122 2012-06-19 21:12:48 +02:00
Bert Belder
5e1d844f3d uv: upgrade to 67090653 2012-06-19 20:48:02 +02:00
isaacs
6ba1c625cd npm: Upgrade to 1.1.30 2012-06-19 09:53:26 -07:00
verwaest@chromium.org
8a6ef65c2c Fixing bugs in promotion of elements transitions (r1175). - Fixed invalid memory access when reading enum-cache from descriptor array with elements transitions but 0 real descriptors. - Fixed infinite recursion in the intrusive map iterator when visiting elements transitions. - Properly cached non-fastmode elements transitions.
Review URL: https://chromiumcodereview.appspot.com/10565030

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:52 +02:00
jkummerow@chromium.org
7282ce9014 Remove unused-but-set variable from objects.cc.
This fixes compilation with newer GCCs.

R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/10568006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:51 +02:00
erik.corry@gmail.com
f94b85db83 Revert part of 11727 as it sometimes tanked V8 benchmark (raytrace) performance for reasons that are not obvious. Now we make objects into fast-case objects when they are made prototypes for other objects, but we do not mark objects that are already fast case with a bit that helps keep them in fast case. Review URL: https://chromiumcodereview.appspot.com/10556004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:50 +02:00
danno@chromium.org
bf682afb98 MIPS: Fix packed-element.js test on ARM with no snap
Port r11826 (5be3568a)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10559002
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:49 +02:00
Ben Noordhuis
8966480c0e Revert "build: fix make install DESTDIR=/path"
This reverts commit f80513974e.

The reverted commit made DESTDIR behave more like we want it to but it was
pointed out in #3489 that it makes life a lot harder for distro package
maintainers.

Those guys and gals already have a hard enough time as it is, let's not make
their jobs even more hellish.
2012-06-19 17:50:34 +02:00
Ben Noordhuis
7de6eba061 node: preemptively unbreak windows build
No one has complained about it so far but I'm sure MSVC doesn't like things
like __attribute__((unused)). Include the libev and libeio shims only on
non-Windows platforms.
2012-06-19 13:51:00 +02:00
isaacs
edb62dd902 npm: Upgrade to 1.1.29 2012-06-18 18:08:48 -07:00
isaacs
10fa526fa0 Update npm's license
Adds the Gubblebum Blocky copyright statement
2012-06-18 18:08:45 -07:00
isaacs
5cfe0b86d5 eio-emul: Cast eio_custom method to void(*)(eio_req*) 2012-06-18 17:48:16 -07:00
Trent Mick
dd1c3d72e2 build: always link with -lz
Fix building with a shared zlib: ensure link with '-lz'.

Configuring for a shared zlib:

    LDFLAGS="-L/opt/local/lib -R/opt/local/lib" \
        ./configure --shared-zlib \
        --shared-zlib-includes=/opt/local/include \
        --shared-zlib-libpath=/opt/local/lib

and building would fail on SmartOS because the link would not include '-lz'.
This doesn't fail on Mac (at least in my setup) because you get lucky with the
openssl libs reported from the Homebrew pkg-config:

    $ pkg-config --libs openssl
    -lssl -lcrypto -lz

On SmartOS, the pkgsrc libs for openssl are:

    $ pkg-config --libs openssl
    -Wl,-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto -lsocket -lnsl -ldl

The patch has no adverse effect on the Mac build (by control case).
2012-06-19 02:23:19 +02:00
Ben Noordhuis
1b22f5376b build: install eio-emul.h 2012-06-19 02:15:29 +02:00
Ben Noordhuis
f405517de1 build: install ev-emul.h 2012-06-19 02:15:29 +02:00
isaacs
1df222f179 Fix breakage introduced in de65ba7 2012-06-18 16:04:36 -07:00
isaacs
de65ba7aba net.Socket: Delay pause/resume until after connect
Fix #3118
2012-06-18 15:17:20 -07:00
Trent Mick
196207c228 node: remove unused flags and files
Drop vestigial `process.installPrefix`, `node --vars`, NODE_CFLAGS and
NODE_PREFIX.

Also removed unused node_config.h.in (replaced with config.gypi a while back).
2012-06-18 23:56:42 +02:00
isaacs
0ef6cfd39b Fix #3465 Add ./configure --no-ifaddrs flag
For Old Solaris.
2012-06-18 14:52:12 -07:00
isaacs
d0111aa0c4 uv: Upgrade to 382f2a26 2012-06-18 14:51:41 -07:00
Fedor Indutny
0a89e8b838 child_process: add .stdin stream to forks
Remove test as it doesn't make any sense after the latest stdio API
changes.
2012-06-19 01:46:28 +04:00
Fedor Indutny
057b80611f uv: upgrade to 61a6e06e 2012-06-19 01:03:11 +04:00
Bert Belder
30ab1f567d test-eio-limit: bump the number of allowed background tasks to 200
This makes the test pass on Windows.
2012-06-18 15:58:43 +02:00
Bert Belder
1b7d23e81e Fix test-cluster-message so it passes on Windows
The test was relying on a particular order of events that cannot be
guaranteed.

Also fixes some typos.
2012-06-18 15:36:26 +02:00
Ben Noordhuis
f80513974e build: fix make install DESTDIR=/path
Install to $DESTDIR, not $DESTDIR/$PREFIX.

Example: if DESTDIR=/opt/node, install to /opt/node, not /opt/node/usr/local.
2012-06-18 15:13:39 +02:00
Ben Noordhuis
ff552ddbaa tls: fix off-by-one error in renegotiation check
Make CLIENT_RENEG_LIMIT inclusive instead of exclusive, i.e. a limit of 2
means the peer can renegotiate twice, not just once.

Update pummel/test-tls-ci-reneg-attack accordingly and make it less timing
sensitive (and run faster) while we're at it.
2012-06-18 04:31:40 +02:00
Ben Noordhuis
eef57dddf4 core: use proper #include directives 2012-06-18 02:35:14 +02:00
Fedor Indutny
ae5b0e1fc1 crypto: add padding to diffie-hellman key
DH_size returns number of bytes in a prime number, DH_compute_key returns number
of bytes in a remainder of exponent, which may have less bytes than a prime
number. Therefore add 0-padding to the allocated buffer.

Fixes #3372
2012-06-18 00:59:31 +04:00
Andreas Madsen
6d70a4ae16 node: change the constructor name of process from EventEmitter to process 2012-06-17 13:14:11 -07:00
Maciej Małecki
3db2e034c4 events: cache domain module locally
It's faster than calling `require` every time we create an
`EventEmitter`.
2012-06-17 13:07:20 -07:00
Reid Burke
71a2a2caa6 net: Prevent property access throws during close
Fix #3455.

The remoteAddress and remotePort properties are
dynamically retrieved from _getpeername().

While _getpeername() checks if the _handle is
null, it is also possible for the tcp_wrapped
_handle.getpeername() to return null on error.

Such a condition happens when the remote closes
and one of these properties is accessed before
_handle is set to null.
2012-06-17 13:00:00 -07:00
isaacs
b0b707cb6e npm: Upgrade to 1.1.27
- severely enhanced 'npm init'
- upgraded node-gyp
2012-06-17 12:04:35 -07:00
isaacs
d614d161c7 test: Don't reuse common.PORT in test-child-process-fork-net
This fixes #3447
2012-06-16 16:26:22 -07:00
isaacs
41421ff9da Make listenFD just DTRT after warning 2012-06-16 16:26:16 -07:00
Bert Belder
55ef9ef680 Revert "Check if a stream has a valid fd before read_start"
uv_stream_t.fd is a private field which exists only on unix.
This reverts commit 8d5c1201f2.
2012-06-16 20:14:21 +02:00
isaacs
a90bc78534 Revert "DNS: Support NAPTR queries"
This reverts commit 91bf18fcc5.
2012-06-16 11:02:49 -07:00
ssuda
91bf18fcc5 DNS: Support NAPTR queries
Adding support for NAPTR records
fixes #3170
2012-06-16 10:56:49 -07:00
Felix Böhm
3a5798b097 querystring: improved speed and code cleanup 2012-06-16 10:43:17 -07:00
isaacs
e74a733024 Fix #3448 Use listen callback in test-regress-GH-1697 2012-06-16 10:19:34 -07:00
Charlie McConnell
8a068ce849 s/exit/close/ in test-child-process-stdout-flush, fixes #3449 2012-06-16 09:43:04 -07:00
isaacs
bc18bf4ec0 Add test-stdin-pause-resume-sync
This is the last bit needed to Close #3346
2012-06-16 09:05:28 -07:00
Karl Skomski
8d5c1201f2 Check if a stream has a valid fd before read_start
Closes #3118
2012-06-16 09:00:20 -07:00
isaacs
bdd57f0756 Makefile: Refuse to build release from unclean repo
Root cause of an error during the 0.7.11 release
2012-06-16 08:51:33 -07:00
Charlie McConnell
145612c2f5 test: skip test-http-full-response on ab errors
If we get errors from ab or apr, skip the test and move on.

Fix #3451
2012-06-16 08:38:47 -07:00
isaacs
c49f3b5df6 email footer: Change Windows msi paths for x86 and x64 2012-06-15 12:50:37 -07:00
isaacs
2b15cf57dd Now working on 0.7.12 2012-06-15 12:47:08 -07:00
isaacs
de2eb600b3 Merge branch 'v0.7.11-release' 2012-06-15 12:46:55 -07:00
isaacs
1f93aa5d5d 2012.06.15, Version 0.7.11 (unstable)
* V8: Upgrade to v3.11.10

* npm: Upgrade to 1.1.26

* doc: Improve cross-linking in API docs markdown (Ben Kelly)

* Fix #3425: removeAllListeners should delete array (Reid Burke)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* Add Buffer.concat method (isaacs)

* windows: make symlinks tolerant to forward slashes (Bert Belder)

* build: Add node.d and node.1 to installer (isaacs)

* cluster: rename worker.unqiueID to worker.id (Andreas Madsen)

* Windows: Enable ETW events on Windows for existing DTrace probes. (Igor Zinkovsky)

* test: bundle node-weak in test/gc so that it doesn't need to be downloaded (Nathan Rajlich)

* Make many tests pass on Windows (Bert Belder)

* Fix #3388 Support listening on file descriptors (isaacs)

* Fix #3407 Add os.tmpDir() (isaacs)

* Unbreak the snapshotted build on Windows (Bert Belder)

* Clean up child_process.kill throws (Bert Belder)

* crypto: make cipher/decipher accept buffer args (Ben Noordhuis)
2012-06-15 12:10:43 -07:00
isaacs
911b0fddd3 Upgrade npm to 1.1.26 2012-06-15 10:00:30 -07:00
Andreas Madsen
1e0ce5d1bd domain: the EventEmitter constructor is now always called in nodecore 2012-06-15 09:49:05 -07:00
Ben Kelly
c6185c8484 doc: Improve cross-linking in API docs markdown
Cross-link EventEmitter references in API docs to events.html

Fix broken cross-reference links with wrong anchor names in API docs.
2012-06-15 09:44:37 -07:00
isaacs
a111390c56 zlib: use Buffer.concat() 2012-06-15 09:44:37 -07:00
Bert Belder
8ccb3cbdba test-domain-implicit-fs: make it pass on windows
The error message is slightly different on windows. However there was no
need to verify the exact error message - there are assert()s that check
all the properties of the error object.
2012-06-15 18:34:27 +02:00
isaacs
283d735e2b doc: Include zlib constants 2012-06-14 22:17:39 -07:00
isaacs
e72addcf8e event: Document the mutability of listeners() 2012-06-14 17:26:51 -07:00
Nathan Rajlich
032fc42e64 readline: don't cache the "keypress" listeners
it's not safe to since `removeAllListeners()` will detach the returned
Array from the stream instance if that's ever called by the user.
2012-06-14 17:26:50 -07:00
Reid Burke
c9a1b5d162 Fix #3425: removeAllListeners should delete array
When removeAllListeners is called, the listeners array
is deleted to maintain compatibility with v0.6.

Reverts "events: don't delete the listeners array"

This reverts commit 78dc13fbf9.

Conflicts:

	test/simple/test-event-emitter-remove-all-listeners.js
2012-06-14 17:26:50 -07:00
Bert Belder
13400e3e58 windows: make symlinks tolerant to forward slashes
Closes #3440
2012-06-15 01:37:24 +02:00
isaacs
412c1ab5bc Fix test-fs-realpath on Windows
Also, in the process, fix a bug in fs.realpath on Windows.

If the user has permission to create symlinks, then use symlinks.  If
not, then skip over all the tests that cannot be run using Junctions
instead.
2012-06-14 16:15:12 -07:00
danno@chromium.org
00247d53db Fix Kraken regression due to optimistic monomorphic element transitions
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10539141

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 00:40:35 +02:00
mstarzinger@chromium.org
c231321cd3 Fix assertion for map code cache of shared maps.
R=danno@chromium.org
TEST=mjsunit/compare-known-objects-slow

Review URL: https://chromiumcodereview.appspot.com/10548046

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 00:35:37 +02:00
Bert Belder
7f896889ba uv: upgrade to b1649b6f 2012-06-14 21:23:37 +02:00
isaacs
a0a5c4c5af doc: update v8-options in man page 2012-06-14 10:39:05 -07:00
isaacs
8bec3febd8 build: Add node.d and node.1 to installer 2012-06-14 10:39:05 -07:00
isaacs
f70fa3bae6 v8: Replace 'echo -n' with 'echo' in build commands 2012-06-14 10:11:55 -07:00
Bert Belder
58b8b3fa07 uv: upgrade to 5d5688f2 2012-06-14 18:36:49 +02:00
Bert Belder
ca003f4f3e license2rtf: collapse whitespace 2012-06-14 18:36:49 +02:00
Andreas Madsen
c2c08196d8 cluster: rename worker.unqiueID to worker.id 2012-06-14 09:32:56 -07:00
isaacs
dd85a8c183 Update message test for new v8 behavior 2012-06-14 08:37:44 -07:00
Bert Belder
34b0b6a613 test-bad-unicode: update to reflect V8 3.11 behavior 2012-06-14 16:06:53 +02:00
Igor Zinkovsky
39d2337859 Windows: don't fire GC ETW events without ETW consumers 2012-06-14 15:26:47 +02:00
Nathan Rajlich
05fe70b582 test: use the debug build of node-weak when necessary 2012-06-13 17:58:28 -07:00
Nathan Rajlich
c752f6c013 test: add a .gitignore file to ignore weak's compiled "build" dir 2012-06-13 17:58:28 -07:00
Bert Belder
511e328727 LICENSE: add node-weak 2012-06-14 02:52:57 +02:00
Bert Belder
4a1698c6ba LICENSE: punctuation fixes 2012-06-14 02:52:55 +02:00
yangguo@chromium.org
54b74b8e85 Remove faster ticks for debug mode.
This solves the problem that code runs very slow when the debugger is enabled.

BUG=v8:2179
TEST=

Review URL: https://chromiumcodereview.appspot.com/10544135

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 02:16:27 +02:00
Bert Belder
2701a6bd48 Unbreak the snapshotted build on Windows
The v8 team apparently decided that all build products should go
into ./build/«type», and updated their common.gypi file to do so.
Unfortunately v8's common.gypi is only used for some targets. All
the other targets would still look in the old place to find their
their dependencies, which effectively broke the build.

In the long run it would be good for node to send all build
output to ./build too, on all platforms.
2012-06-14 01:51:13 +02:00
Fedor Indutny
fac6c69456 v8: fix postmortem debugging tools build 2012-06-14 01:37:15 +02:00
Bert Belder
ac64c9e546 v8: reapply floating patches
Note that 26f754d9 ('fix error handling in SendConnectMessage') is no
longer necessary; it was properly fixed upstream in V8 r11609.
2012-06-14 01:37:14 +02:00
mstarzinger@chromium.org
48893af7bb Fix performance regression caused by r11202.
R=erik.corry@gmail.com
BUG=v8:2156,v8:2034
TEST=mjsunit/regress/regress-2156,mjsunit/regress/regress-2034

Review URL: https://chromiumcodereview.appspot.com/10539131

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 01:37:14 +02:00
Bert Belder
50464cd4f4 v8: upgrade to v3.11.10 2012-06-14 01:37:13 +02:00
Bert Belder
09be360a0f Inherited FDs should not accidentally be inherited by child processes
This makes test-child-process-detached pass on Windows.
2012-06-14 01:28:51 +02:00
Bert Belder
37d75ba241 uv: upgrade to 4d7f1e18 2012-06-14 01:27:31 +02:00
Bert Belder
029e01bb80 vcbuild.bat: add duplicate arg-ok label to work around cmd.exe bug 2012-06-14 00:56:43 +02:00
Nathan Rajlich
6a8b5b36b4 test: bundle node-weak in test/gc so that it doesn't need to be downloaded 2012-06-14 00:56:35 +02:00
Igor Zinkovsky
35a1421e96 Windows: Enable ETW events.
This commit enables ETW events to be fired on Windows for existing
DTrace probes.  ETW instrumentation is enabled by default.  It
is possible to build node.exe without ETW instrumentation by
using --without-etw option with configure script.
2012-06-13 15:36:08 -07:00
Bert Belder
74c8041fb6 test-child-process-spawn-loop: make it pass on Windows.
It wasn't waiting for the child process' stderr to close, so not an
assertion was made *before* all the data that the child process sent
was received by node.
2012-06-13 22:12:30 +02:00
isaacs
e733dc3bc3 Fix #3388 Support listening on file descriptors
This implements server.listen({ fd: <filedescriptor> }).  The fd should
refer to an underlying resource that is already bound and listening, and
causes the new server to also accept connections on it.

Not supported on Windows.  Raises ENOTSUP.
2012-06-13 12:24:45 -07:00
Bert Belder
0187b657ae Move resource files to src/res.
tools/msvs/res is not an appropriate place.
2012-06-13 17:40:50 +02:00
isaacs
a11bf99ce0 Fix #3407 os.tmpDir() 2012-06-12 19:08:47 -07:00
Bert Belder
0dba4ad0f9 tests: make all message tests pass on Windows 2012-06-13 03:02:53 +02:00
Bert Belder
5209dad907 test-net-timeout: make it pass on Windows
The test didn't take into account that some time might pass before
libuv makes close callbacks. This is now fixed.
2012-06-13 02:49:33 +02:00
Bert Belder
e4f4c63370 uv: upgrade to 9f44b0e3 2012-06-13 01:35:51 +02:00
Bert Belder
b866a96cfa test-child-process-kill: make it pass on windows
The test would fail if the child process writes anything to the stdout.
This doesn't happen on unix, since `cat` is spawned. However, on Windows
`cmd` is started, which *does* write stuff to it's stdout. This
meanlingless assert is now removed.
2012-06-12 23:30:57 +02:00
Bert Belder
10f85fadfe Fix child_process.kill oddities
* When the process is already dead, but the `exit` signal wasn't raised
  yet, the ESRCH error should be ignored.

* When an invalid signal is specified, kill() should throw.

* Like process.kill(), child_process.kill() now preserves a `0` signal
  which can be used to check the liveliness of the child process.

* process.kill() and child_process.kill() will now return true if the
  signal was actually delivered, and false otherwise.

* When an `exec`-ed process is automatically killed because a time or
  buffer limit is exceeded, and the kill() fails, this error should be
  reported through the `exec` callback.

Fixes: #3409
2012-06-12 23:30:56 +02:00
Bert Belder
b53b8b8ae7 test-exec: make it work on Windows 2012-06-12 23:30:54 +02:00
Ben Noordhuis
8963a5228d doc: update crypto cipher/decipher docs 2012-06-12 22:02:35 +02:00
Ben Noordhuis
900196e135 crypto: make cipher/decipher accept buffer args 2012-06-12 21:50:05 +02:00
Bert Belder
a55faeac18 uv: upgrade to b7e150ee 2012-06-12 19:54:56 +02:00
Bert Belder
cbeeea62cf Revert "uv: upgrade to b7e150ee"
Upgrade wasn't done correctly.
This reverts commit b615077bab.
2012-06-12 19:52:38 +02:00
Bert Belder
b615077bab uv: upgrade to b7e150ee 2012-06-12 17:06:54 +02:00
Ben Noordhuis
0385b17ce0 fs: fix infinite loop in fs.readFileSync()
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFileSync() was busy reading in the file.
2012-06-12 16:31:49 +02:00
Ben Noordhuis
408bfece51 fs: fix infinite loop in fs.readFile()
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFile() was busy reading in the file.
2012-06-12 16:31:44 +02:00
Bert Belder
bb2ce1a108 cluster: don't silently drop messages when the write queue gets big 2012-06-12 15:57:27 +02:00
Shigeki Ohtsu
e3a2dd1b13 fs: fix fs.readFileSync to work on real empty file 2012-06-12 15:02:39 +02:00
Shigeki Ohtsu
4eb2804db9 fs: fix typo in fs.readFile of lying size=0 stat 2012-06-12 15:02:39 +02:00
Bert Belder
517cea3636 test-net-connect-econnrefused: don't take forever to complete 2012-06-12 02:22:30 +02:00
Bert Belder
b27a4cbe2a test-module-loading: convert backslashes to forward slashes
This makes the test pass on Windows.
2012-06-12 02:04:44 +02:00
Bert Belder
094f742657 test-http-get-pipeline-problem: don't fail if there are stray files in the temp dir 2012-06-12 01:56:48 +02:00
Bert Belder
00ba1cbce1 test-net-write-slow: increase the socket timeout period
In Windows the callbacks arrive in slightly different order. A bunch
of write operations complete immediately, and after that there is a
gap of a few hundred ms. This causes the timeout timer to fire, which
is not really warranted; the first few write operations just finished a
little quicker than expected.
2012-06-12 01:43:45 +02:00
isaacs
6ce013dd4b fix fs.readFile with lying size=0 stat results 2012-06-11 15:54:28 -07:00
isaacs
d53cdc5378 Add Buffer.concat method
We write out this loop a lot of places throughout node.
It clearly needs to be an API method.
2012-06-11 15:51:23 -07:00
Bert Belder
cfa28690db cluster: don't silently drop messages when the write queue gets big 2012-06-11 23:46:17 +02:00
Bert Belder
2301eb69b1 v8: force inlining of v8::internal::DescriptorArray methods 2012-06-11 21:24:29 +02:00
yangguo@chromium.org
33be3016fb Force inlining CopyChars and String::Get.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10332054

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 21:24:27 +02:00
Charlie McConnell
2eb181d28c child_process: fix test implementation for options.detached 2012-06-11 10:27:51 -07:00
isaacs
25e8ea17e1 Do not gitignore npm's node_modules 2012-06-11 09:54:39 -07:00
isaacs
1358632e67 Remove auto-unref
cc: @AvianFlu @AndreasMadsen
2012-06-11 09:07:42 -07:00
isaacs
e9aa57e8bd Now working on 0.7.11 2012-06-11 08:58:33 -07:00
isaacs
4f235ef87f Merge branch 'v0.7.10-release' 2012-06-11 08:57:32 -07:00
isaacs
8d9766a9df 2012.06.11, Version 0.7.10 (unstable)
* Roll V8 back to 3.9.24.31

* build: x64 target should always pass -m64 (Robert Mustacchi)

* add NODE_EXTERN to node::Start (Joel Brandt)

* repl: Warn about running npm commands (isaacs)

* slab_allocator: fix crash in dtor if V8 is dead (Ben Noordhuis)

* slab_allocator: fix leak of Persistent handles (Shigeki Ohtsu)

* windows/msi: add node.js prompt to startmenu (Jeroen Janssen)

* windows/msi: fix adding node to PATH (Jeroen Janssen)

* windows/msi: add start menu links when installing (Jeroen Janssen)

* windows: don't install x64 version into the 'program files (x86)' folder (Matt Gollob)

* domain: Fix #3379 domain.intercept no longer passes error arg to cb (Marc Harter)

* fs: make callbacks run in global context (Ben Noordhuis)

* fs: enable fs.realpath on windows (isaacs)

* child_process: expose UV_PROCESS_DETACHED as options.detached (Charlie McConnell)

* child_process: new stdio API for .spawn() method (Fedor Indutny)

* child_process: spawn().ref() and spawn().unref() (Fedor Indutny)

* Upgrade npm to 1.1.25
- Enable npm link on windows
- Properly remove sh-shim on Windows
- Abstract out registry client and logger
2012-06-11 08:19:55 -07:00
isaacs
76f6a4abb4 Remove dep symlinks from tarball 2012-06-11 08:19:55 -07:00
Bert Belder
5432a1d985 process_wrap: set duplex flags when creating a pipe 2012-06-11 08:13:36 -07:00
isaacs
54a4f99c4e lint 2012-06-11 08:13:36 -07:00
isaacs
13198357e9 Upgrade npm to 1.1.25 2012-06-11 08:13:36 -07:00
Nuno Job
284816ee9f test: add test for bad unicode sequences
This was a regression in 0.7.9.
2012-06-09 20:30:16 +02:00
isaacs
65242abc3b Fix fs.realpath tests so that they actually run 2012-06-09 09:43:47 -07:00
isaacs
131a67e7ef Fix #3394 fs.realpath: Properly cache symlink targets 2012-06-09 09:43:47 -07:00
isaacs
424bca15c8 Fix fs.realpath to work on Windows
1. Make the isRoot check valid
2. Don't cache results based on dev/ino, since those are alwasy 0 on
windows.
2012-06-09 09:43:46 -07:00
isaacs
6332a4cf00 Expose posix realpath on windows as well 2012-06-09 09:43:46 -07:00
Andreas Madsen
60b45dcbb6 domain: document and test dispose event 2012-06-09 18:15:38 +02:00
Andreas Madsen
535e109a3a domain: run now return callback result
both domain.bind and domain.intercept act this way
2012-06-09 18:15:38 +02:00
Andreas Madsen
77cfbd9f2d domain: dry decorate using util._extend 2012-06-09 18:15:38 +02:00
Ben Noordhuis
26f754d9dd v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-06-09 08:10:03 -07:00
isaacs
c08357c32f v8: Floating patches 2012-06-09 08:09:58 -07:00
isaacs
940a6863ea Roll V8 back to 3.9.24.31 2012-06-09 08:09:42 -07:00
Marc Harter
569acea0ee Fix #3379 prevent domain.intercept passing 1st arg to cb 2012-06-08 23:32:13 -07:00
Charlie McConnell
4b021a3541 child_process: expose UV_PROCESS_DETACHED as options.detached 2012-06-08 22:57:22 -07:00
Bert Belder
5046f8501c Revert "Unbreak the Windows build"
It is not needed for v8 3.10, and actually breaks the build.
This reverts commit bd33fea732.
2012-06-08 20:46:34 +02:00
Robert Mustacchi
f62441367f x64 target should always pass -m64 2012-06-07 17:54:56 -07:00
isaacs
0435f9b28c v8: Don't use 'echo -n' in configure script 2012-06-07 17:54:22 -07:00
Bert Belder
bd33fea732 Unbreak the Windows build
The v8 team apparently decided that all build products should go
into ./build/«type», and updated their common.gypi file to do so.
Unfortunately v8's common.gypi is only used for some targets. All
the other targets would still look in the old place to find their
their dependencies, which effectively broke the build.

In the long run it would be good for node to send all build
output to ./build too, on all platforms.

Conflicts:

	deps/v8/build/common.gypi
2012-06-07 17:54:22 -07:00
Ben Noordhuis
1fb9cfcdb1 v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-06-07 17:54:21 -07:00
isaacs
43ff46becf v8: Floating patches 2012-06-07 17:54:21 -07:00
isaacs
46b09e4190 Roll V8 back to 3.10.8.13 2012-06-07 17:54:21 -07:00
Fedor Indutny
3116522e7c child_process: spawn().ref() and spawn().unref() 2012-06-07 23:20:56 +04:00
Bert Belder
f482236665 windows: don't print error when GetConsoleTitleW returns an empty string 2012-06-07 19:44:31 +02:00
isaacs
c45522df4c build: Prevent duplication of doc/api folder 2012-06-06 15:02:23 -07:00
isaacs
f9abf5e0e2 build: Prevent duplication of doc/api folder 2012-06-06 15:01:47 -07:00
Ben Noordhuis
463d6bac8b fs: make callbacks run in global context
Callbacks that were passed to the binding layer ran in the context of the
(internal) binding object. Make sure they run in the global context.

Before:

  fs.symlink('a', 'b', function() {
    console.log(this); // prints "{ oncomplete: [Function] }"
  });

After:

  fs.symlink('a', 'b', function() {
    console.log(this); // prints "{ <global object> }"
  });
2012-06-06 21:49:39 +02:00
Ben Noordhuis
c381662cac fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
2012-06-06 21:08:38 +02:00
isaacs
1285cd9011 Now working on 0.6.20 2012-06-06 09:58:46 -07:00
isaacs
79d77cfd81 Merge branch 'v0.6.19-release' into v0.6 2012-06-06 09:58:24 -07:00
Joel Brandt
b9c5eee7d9 add NODE_EXTERN to node::Start 2012-06-06 05:31:09 +02:00
Ben Noordhuis
5f41140535 deps: upgrade libuv to 649ad50 2012-06-06 05:31:08 +02:00
isaacs
debf552ed2 2012.06.06 Version 0.6.19 (stable)
* npm: upgrade to 1.1.24

* fs: no end emit after createReadStream.pause() (Andreas Madsen)

* vm: cleanup module memory leakage (Marcel Laverdet)

* unix: fix loop starvation under high network load (Ben Noordhuis)

* unix: remove abort() in ev_unref() (Ben Noordhuis)

* windows/tty: never report error after forcibly aborting line-buffered read (Bert Belder)

* windows: skip GetFileAttributes call when opening a file (Bert Belder)
2012-06-05 17:46:27 -07:00
isaacs
e5d3ea7771 Upgrade npm to 1.1.24 2012-06-05 17:46:27 -07:00
isaacs
28e851c169 Warn about running npm in the repl 2012-06-05 12:35:49 -07:00
Nathan Rajlich
c69d7f1a6c test: make the node-weak install build agaist this repo
This prevents node-gyp from attempting to download dev header files from
nodejs.org. Instead, the files in this repo will be used to build the module.
2012-06-05 10:25:39 -07:00
Ben Noordhuis
cb76999bad deps: upgrade libuv to 06e0319 2012-06-05 17:07:43 +02:00
Ben Noordhuis
0a2076b26a deps: upgrade libuv to c8c9fe1 2012-06-05 16:48:17 +02:00
Ben Noordhuis
27061cc9f4 udp_wrap, stream_wrap: lazy init slab allocator
Create slab allocator when binding is initialized.

Add an AtExit handler to destroy the slab before the VM shuts down, it can't be
disposed when V8 is dead and Valgrind will complain about memory leaks.
2012-06-05 16:48:17 +02:00
Ben Noordhuis
cc0e7efb37 slab_allocator: fix crash in dtor if V8 is dead
Don't try to dispose the persistent handles if the VM is already dead, it
triggers an assertion inside V8.
2012-06-05 16:27:57 +02:00
Shigeki Ohtsu
208d1715a7 slab_allocator: fix leak of Persistent handles 2012-06-05 15:45:08 +02:00
koichik
0742f5629c Revert "punycode: Update to v1.0.0"
This reverts commit 483edbdf1a.
Fixes #3359.
2012-06-05 22:10:37 +09:00
isaacs
b9e40fbaac Upgrade npm to 1.1.24 2012-06-04 17:32:59 -07:00
isaacs
cc36cc5999 build: Don't clobber symlinked npm 2012-06-04 17:32:59 -07:00
Bert Belder
4f6882e898 windows/msi: minor installer tweaks 2012-06-04 21:39:58 +02:00
Jeroen Janssen
01432403af windows/msi: add node.js prompt to startmenu 2012-06-04 21:39:51 +02:00
isaacs
04e484c484 v8: Don't use 'echo -n' in configure script 2012-06-04 11:10:31 -07:00
Ben Noordhuis
f0a561fe67 net: rename flag FLAG_SHUTDOWNQUED 2012-06-04 15:02:09 +02:00
Jeroen Janssen
7161ecd31b windows/msi: fix adding node to PATH
Closes #3366
2012-06-04 14:16:39 +02:00
Bert Belder
0699f5bfb4 Improve child process stdio documentation 2012-06-04 14:12:59 +02:00
Jeroen Janssen
943448772e windows/msi: add start menu links when installing 2012-06-03 00:45:39 +02:00
Jeroen Janssen
e2126e05e7 windows/msi: cleanup WiX project files
The current WiX project files do some manual processing and generation
which WiX supports doing out of the box. This patch will use the
HeatDirectory task to generate the npm.wxs file and use the auto GUID
generation. I also changed the msi filename generation to include the
version number to match the currently used name for released msi files.

Closes #3360
2012-06-02 18:39:41 +02:00
Bert Belder
3b6a00b664 Unbreak the Windows build
The v8 team apparently decided that all build products should go
into ./build/«type», and updated their common.gypi file to do so.
Unfortunately v8's common.gypi is only used for some targets. All
the other targets would still look in the old place to find their
their dependencies, which effectively broke the build.

In the long run it would be good for node to send all build
output to ./build too, on all platforms.
2012-06-02 16:06:00 +02:00
isaacs
e0f5d8e86d test: v8 stack trace messages changed slightly 2012-06-01 22:31:05 -07:00
Ben Noordhuis
eabf3c8d0f v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-06-01 22:31:04 -07:00
isaacs
7946ad2634 v8: Floating patches 2012-06-01 22:31:04 -07:00
isaacs
cbdf3393a2 Upgrade v8 to 3.11.7 2012-06-01 22:31:04 -07:00
Fedor Indutny
0262b6d2a5 child_process: new stdio API for .spawn() method 2012-06-02 12:12:48 +07:00
Simon Sturmer
9a998d5e24 http: don't lowercase http req header until later
Don't lowercase the request header until we're in the _addHeaderLine method,
makes it easier to intercept the raw request headers.
2012-06-02 03:07:43 +02:00
Matt Gollob
9fe39ede9f windows: don't install x64 version into the 'program files (x86)' folder
* Update nodemsi.sln and .wixproj to include support for x64 platform
  - Add ProgramFilesFolderId to the DefineConstants property for each
    configuration/platform's property group with the appropriate value
    (ProgramFilesFolder for x86 builds, ProgramFiles64Folder for x64
    builds)

* Update product.wxs:
  - update the Id value for the "Program Files" Directory element to
    use a preprocessor constant.
  - remove hard-coded platform from the Package element.  MSI platform
    will be automatically detected based on MSBuild's Platform property.
    (This was already supported in the Wix MSBuild targets, we just
    weren't taking advantage of it.)

*  Update vcbuild.bat to set MSBuild's Platform property appropriately,
   defaulting to x86 if not explicitly supplied by the user. Note that
   creating an x64 build requires that vcbuild.bat be run from a VS
   64-bit command prompt.

Closes #3312
Closes #3356
2012-06-02 02:18:09 +02:00
Bert Belder
8a52a16847 windows: add icon to node.exe
The icon could definitely be nicer, patches welcome.
Credits to Nathan Rajlich for putting together this one.
2012-06-02 02:01:57 +02:00
isaacs
434404e3bb website: Add nodejs.es to localized sites 2012-06-01 10:21:02 -07:00
Fedor Indutny
af98fc9d5f child_process: new stdio API for .spawn() method 2012-06-01 20:52:13 +04:00
Bert Belder
30a0e58d63 uv: upgrade to 87dbffbd 2012-06-01 20:19:42 +04:00
Erwin van der Koogh
ccc854d14e doc: remove all references to setsid
Fixes #2299.
2012-05-31 15:38:05 +02:00
Ben Noordhuis
b337577cf1 test: update pummel/test-exec
ChildProcess.prototype._internal is called ChildProcess.prototype._handle now.
2012-05-31 01:46:56 +02:00
isaacs
dc8b488bbe Now working on 0.7.10 2012-05-29 10:08:24 -07:00
isaacs
a9e40281e7 Merge branch 'v0.7.9-release' 2012-05-29 10:07:44 -07:00
Fedor Indutny
761e0c460a deps: upgrade libuv to 7556590 2012-05-29 18:26:40 +04:00
Andreas Madsen
2ae9b69871 fs: no end emit after createReadStream.pause()
In case a fd option is given to fs.createReadStream a read will instantly
happen. But in the edge case where fd point to an empty file and .pause()
was executed instantly, the end event would emit since no async wait was
between fs.createReadStream and the file read there emits end.

This is a cherry-pick of commit 1f3e4a7 into the v0.6 branch.
2012-05-29 15:34:01 +02:00
Ben Noordhuis
fa9aa1c961 net: fix 'close' event emit order
The server 'close' event was emitted before the last client 'close' event. Not
exactly fatal but potentially confusing.

Before this commit the order looked something like [client, server, client],
now it looks like [client, client, server].

See #3340 for more details.
2012-05-29 13:05:51 +02:00
isaacs
782277f11a 2012.05.28, Version 0.7.9 (unstable)
* Upgrade V8 to 3.11.1

* Upgrade npm to 1.1.23

* uv: rework reference counting scheme (Ben Noordhuis)

* uv: add interface for joining external event loops (Bert Belder)

* repl, readline: Handle Ctrl+Z and SIGCONT better (Nathan Rajlich)

* fs: 64bit offsets for fs calls (Igor Zinkovsky)

* fs: add sync open flags 'rs' and 'rs+' (Kevin Bowman)

* windows: enable creating directory junctions with fs.symlink (Igor Zinkovsky, Bert Belder)

* windows: fix fs.lstat to properly detect symlinks. (Igor Zinkovsky)

* Fix #3270 Escape url.parse delims (isaacs)

* http: make http.get() accept a URL (Adam Malcontenti-Wilson)

* Cleanup vm module memory leakage (Marcel Laverdet)

* Optimize writing strings with Socket.write (Bert Belder)

* add support for CESU-8 and UTF-16LE encodings (koichik)

* path: add path.sep to get the path separator. (Yi, EungJun)

* net, http: add backlog parameter to .listen() (Erik Dubbelboer)

* debugger: support mirroring Date objects (Fedor Indutny)

* addon: add AtExit() function (Ben Noordhuis)

* net: signal localAddress bind failure in connect (Brian Schroeder)

* util: handle non-string return value in .inspect() (Alex Kocharin)
2012-05-28 20:03:03 -07:00
isaacs
8a411bae66 Revert "tests: kill process group on failure"
This reverts commit 0cebfc8ddb.
2012-05-28 20:02:49 -07:00
isaacs
719376730d upgrade npm to 1.1.23
This also upgrades node-gyp to 0.4.3
2012-05-28 20:02:39 -07:00
Ben Noordhuis
0bd410a66a deps: cherry-pick libuv commit 4690204
libuv cannot be upgraded right now (API change in upstream libuv) but this
commit fixes a segmentation fault on SunOS systems, hence the cherry-pick.
2012-05-28 22:10:38 +00:00
Shigeki Ohtsu
f721d02c8a http: fix duplicated variable declaration 2012-05-28 23:26:02 +02:00
Maciej Małecki
c96df0e37a stream: don't call cleanup twice on end and close 2012-05-28 01:35:36 +02:00
Ben Noordhuis
0fd2834539 deps: upgrade libuv to 2ec0986 2012-05-28 00:32:16 +02:00
Andreas Madsen
1f3e4a76f9 fs: no end emit after createReadStream.pause()
In case a fd option is given to fs.createReadStream a read will instantly
happen. But in the edge case where fd point to an empty file and .pause()
was executed instantly, the end event would emit since no async wait was
between fs.createReadStream and the file read there emits end.
2012-05-27 20:00:19 +02:00
Jeroen Janssen
82bcdbb8aa doc: add npm search to appendix
Fixes #3327.
2012-05-26 19:41:37 +09:00
Jeroen Janssen
1fc2c3823c doc: updated JavaScript casing where relevant
Fixes #3326.
2012-05-26 19:34:13 +09:00
Ben Noordhuis
578f69bcf4 deps: upgrade libuv to 28766dc 2012-05-25 14:02:35 +02:00
Ben Noordhuis
5ff2ae8389 bench: start a worker for each CPU 2012-05-25 00:35:10 +02:00
Ben Noordhuis
7535e3930a bench: add http_simple_auto benchmark
Starts a server and benchmarks it with ab.
2012-05-25 00:35:07 +02:00
isaacs
24de89bd0e Upgrade uv to 604802a 2012-05-24 14:26:32 -07:00
Igor Zinkovsky
b4ed3c1969 remove NODE_USE_64BIT_UV_FS_API 2012-05-24 11:49:51 -07:00
Jeroen Janssen
66e12dbd69 doc: update possible values for process.platform 2012-05-24 18:55:08 +02:00
Ben Noordhuis
078763a94c test: update addons .gitignore 2012-05-24 14:07:09 +02:00
Igor Zinkovsky
39e25528eb windows: enable creating directory junctions with fs.symlink 2012-05-24 01:15:15 -07:00
Mathias Bynens
a2fcc47772 doc: add punycode.js documentation 2012-05-23 04:04:12 +02:00
Jeroen Janssen
f079c0bd9f doc: process get/setuid and get/setgid are POSIX only
Fixes #3302
2012-05-23 04:01:45 +02:00
Ben Noordhuis
1358bac6d1 deps: upgrade libuv to 5b9c451 2012-05-23 04:01:19 +02:00
Igor Zinkovsky
dff467d982 update uv to 2df831723fad25d2d97b824b2e52c65082af2723 2012-05-22 16:49:19 -07:00
Igor Zinkovsky
6e435da7f9 remove race from test-child-process-fork-exec-argv test 2012-05-22 13:59:40 -07:00
Ben Noordhuis
0888cdd412 test: fix bad comment 2012-05-22 16:14:30 +02:00
Ben Noordhuis
989ae81c71 test: fix simple/test-process-active-wraps
Said test relies a great deal on internals and implementation details (I should
know, I wrote it). Patch it up to work with libuv's new refcounting scheme.
2012-05-22 16:14:30 +02:00
Ben Noordhuis
039fac633e deps: upgrade libuv to a478847
The event loop's reference counting scheme in this version of libuv has changed.
Update the libuv bindings to reflect that fact.
2012-05-22 16:14:24 +02:00
Nathan Rajlich
a608f65b24 repl: preserve the cursor when redisplaying the prompt on SIGCONT
Otherwise the cursor position was being reset to 0, even when there was
already part of a line, which was strange.

Part of #3295.
2012-05-21 21:09:46 -03:00
Nathan Rajlich
3f69c71157 readline: explicitly disable and re-enable "raw mode" on Ctrl+Z
Fixes #3295.
2012-05-21 21:09:46 -03:00
Nathan Rajlich
2b9967fbcc readline: move the "setRawMode" logic into a private function 2012-05-21 21:09:46 -03:00
Oleg Efimov
45de259b43 Make UNWRAP macro generic. 2012-05-21 23:29:06 +02:00
Andreas Madsen
81a4edcf6a cluster: remove NODE_UNIQUE_ID from env on startup
In case a worker would spawn a new subprocess with process.env, NODE_UNIQUE_ID
would have been a part of the env. Making the new subprocess believe it is a
worker, this would result in some confusion if the subprocess where to listen to
a port, since the server handle request would then be relayed to the worker.

This patch removes the NODE_UNIQUE_ID flag from process.env on startup so any
subprocess spawned by a worker is a normal process with no cluster stuff.
2012-05-21 23:27:44 +02:00
Oleg Efimov
968b49ba0a Check for tabs in source line in DisplayExceptionLine
Fix for joyent/node#3280
2012-05-21 18:30:16 +02:00
Marcel Laverdet
7865c5c51d vm: cleanup module memory leakage
There are some paths here that led to dangling contexts. By being smarter with
handle management we can get rid of all the cleanup code and fix those issues.

This is a backport of commit 7063575.
2012-05-21 01:30:58 +02:00
Ben Noordhuis
ca642b020d test: add http 'data after timeout' test
See #3234. TDB if this is or is not the desired behavior.
2012-05-21 00:31:28 +02:00
isaacs
75670d3f63 test: wait for 'close' event for stdout
At the 'exit' event, it is sometimes not done writing to stdout.
2012-05-20 09:40:10 -03:00
isaacs
d0c010e39b test: root can connect to chmod'd pipes 2012-05-20 09:24:47 -03:00
isaacs
b48f7f7eac test: Solaris is not as granular with rename fs watch events 2012-05-20 00:17:18 -03:00
Andreas Madsen
a039bad299 fs.watch should not require a listener arguments
Since fs.watch returns an event emitter where the change event is exactly
the same as the listener callback, the argument should be required
2012-05-19 18:58:28 -03:00
Ben Noordhuis
18b94ea838 doc: improve fs.open() docs 2012-05-17 06:18:25 +02:00
Kevin Bowman
ccc4e547ea doc: document fs 'rs+' open mode 2012-05-17 06:05:33 +02:00
isaacs
1a2255ab44 Faster fs.readFile and fs.readFileSync 2012-05-16 20:04:44 -07:00
isaacs
ee6c11876a benchmark for fs.readfile 2012-05-16 20:04:44 -07:00
isaacs
a3753b496e Revert "Fix #3242 Actually deprecate 'binary' buffer encoding"
This reverts commit 5979f096d1.

Related:
- #3279
- #3278
2012-05-16 16:32:37 -07:00
isaacs
9fc7283a40 Fix #3270 Escape url.parse delims
Rather than omitting them.
2012-05-16 15:41:28 -07:00
isaacs
c393853b4e build: Set strict_aliasing on SunOS always
A build failure was introduced on c9676c9147
in SmartOS systems.  This makes it build properly.
2012-05-16 14:49:51 -07:00
isaacs
564172510d Revert "test: stack overflow output"
This reverts commit f8519e10b8.

Recent update to V8 fixes the problem where it incorrectly reports the
line number as 0 for thrown RangeErrors.
2012-05-16 14:44:15 -07:00
isaacs
3b95d88bf2 v8: s/echo -n/echo/. Not all sh's are bash. 2012-05-16 14:22:57 -07:00
isaacs
2cca7488bf Patches floating on V8 2012-05-16 14:22:57 -07:00
isaacs
3f3f958c14 Upgrade V8 to 3.11.1 2012-05-16 14:22:33 -07:00
Adam Malcontenti-Wilson
4099d1eeba http: make http.get() accept a URL
http.get() now accepts either a URL (as a string) or an options object.
2012-05-16 16:43:18 +02:00
Ben Noordhuis
05b81f333c doc: clarify stream 'close' event 2012-05-16 16:08:18 +02:00
isaacs
1665b4a2a3 lint 2012-05-15 18:04:43 -07:00
Kevin Bowman
dfcdd5b8aa fs: add sync open flags 'rs' and 'rs+' 2012-05-16 00:14:46 +02:00
isaacs
643f00d3f9 Merge branch 'master' into v0.6-merge
Conflicts:
	src/node.cc
2012-05-15 14:21:22 -07:00
isaacs
faa4d9ff5f Re-apply http fixes from v0.6 branch properly 2012-05-15 14:19:46 -07:00
Sadique Ali
c9676c9147 build: improve c compiler detection 2012-05-15 22:51:17 +02:00
Ben Noordhuis
9ae6d8fee3 http: fix client request.end() EPIPE race
request.end() would sometimes try to write a zero-length buffer to the socket.
Don't do that, it triggers an unnecessary EPIPE when the other end has closed
the connection.

Fixes #3257.
2012-05-15 22:05:36 +02:00
isaacs
f8519e10b8 test: stack overflow output 2012-05-15 13:03:56 -07:00
isaacs
9611354f08 lint 2012-05-15 13:03:43 -07:00
Ben Noordhuis
e813e3491e node: make _getActiveHandles() return user objects
Before this commit, process._getActiveHandles() returned a list of internal
handles. Now, it returns the user objects that handles are attached to.

For example, a tcp_wrap handle will now return its parent net.Socket object.

It works for all handle types except timers because timer handles are shared
across multiple user objects.
2012-05-15 21:01:36 +02:00
Ben Noordhuis
88d7a10128 test: verify that connect reqs are cleaned up 2012-05-15 21:00:27 +02:00
Ben Noordhuis
5f0406534c process: add _getActiveHandles(), _getActiveRequests()
* process._getActiveHandles() returns a list containing all active handles
  (timers, sockets, etc.) that have not been unref'd.

* process._getActiveRequests() returns a list of active requests (in-flight
  actions like connecting to a remote host, writing data to a socket, etc.).
2012-05-15 21:00:27 +02:00
Ben Noordhuis
636add246c req_wrap: share process_symbol, domain_symbol
Share persistent strings process_symbol and domain_symbol across compilation
units. Avoids redefinition errors when src/node.cc includes src/req_wrap.h.
2012-05-15 20:59:43 +02:00
isaacs
5164ae3838 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	deps/uv/include/uv-private/uv-unix.h
	deps/uv/src/unix/core.c
	deps/uv/src/unix/sunos.c
	deps/v8/src/runtime.cc
	doc/api/crypto.markdown
	lib/http.js
	src/node_version.h
	test/gc/test-http-client-timeout.js
	wscript
2012-05-15 11:37:34 -07:00
isaacs
01103d077b Guard against emitting 'end' twice on http responses
Conflicts:

	lib/http.js
2012-05-15 11:29:32 -07:00
isaacs
a98e845516 Break up huge function in ClientRequest.onSocket
Conflicts:

	lib/http.js
2012-05-15 11:26:47 -07:00
isaacs
f19f980724 Now working on 0.6.19 2012-05-15 10:21:57 -07:00
isaacs
2498d15dde Merge branch 'v0.6.18-release' into v0.6 2012-05-15 10:21:40 -07:00
Ben Noordhuis
a3908f47f1 child_process: hook up handle wrap to owning object 2012-05-15 16:59:01 +02:00
Ben Noordhuis
4ec77e2e28 child_process: rename field _internal to _handle
Consistent with how other classes that are built around HandleWraps call it.
2012-05-15 16:59:01 +02:00
Ben Noordhuis
f66f793c07 net: hook up handle wrap to owning object 2012-05-15 16:59:00 +02:00
Ben Noordhuis
25aea2a072 fs: hook up handle wrap to owning object 2012-05-15 16:56:49 +02:00
Ben Noordhuis
d2eaabd0df dgram: hook up handle wrap to owning object 2012-05-15 16:56:48 +02:00
isaacs
4bc1d395de 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-14 17:30:00 -07:00
isaacs
8068f9bf38 Escape leading # signs in 'make email.md' 2012-05-14 17:29:47 -07:00
isaacs
14a5b45c06 Guard against emitting 'end' twice on http responses 2012-05-14 17:22:45 -07:00
isaacs
ea4b1c1c0c Upgrade libuv to bc4126b 2012-05-14 12:01:38 -07:00
Ben Noordhuis
9b42d7daaf test: add https + .pfx client/server test 2012-05-14 17:34:33 +02:00
ssuda
fb7348ae06 crypto: add PKCS12/PFX support
Fixes #2845.
2012-05-14 17:12:59 +02:00
Andreas Madsen
dceebbfa31 child_process: allow sending a net Socket and Server object using child.send
child_process.fork() support sending native hander object, this patch add support for sending
net.Server and net.Socket object by converting the object to a native handle object and back
to a useful object again.

Note when sending a Socket there was emitted by a net Server object, the server.connections
property becomes null, because it is no longer possible to known when it is destroyed.
2012-05-14 07:47:52 -07:00
Andreas Madsen
49f16c4575 doc: move child.send details from child_process.fork to child.send 2012-05-14 07:47:52 -07:00
rsolomo
d40415912f net: make isIP() return 0 on empty input 2012-05-14 16:09:04 +02:00
Ben Noordhuis
bd907174e8 node: delete NODE_CHANNEL_FD from env
Prevents accidental inheritance by child processes. If the child process is a
node process, it would try to set up a channel with the parent and consequently
never quit because the channel kept the event loop alive.

Fixes #3240.
2012-05-14 07:19:11 +02:00
Bert Belder
a475e62a3e Windows: add test for path.normalize with UNC paths 2012-05-13 03:29:44 +02:00
Bert Belder
d91004a73d Windows: make path.normalize convert all slashes to backslashes
Closes #3066
2012-05-13 03:18:09 +02:00
Bert Belder
d8351a2ef4 Automatically close FSWatcher on error
Closes #3250
2012-05-13 03:16:19 +02:00
koichik
5f9ffa17b1 fs: fix ReadStream.pause() emits duplicate data event
Fixes #3258.
2012-05-12 10:24:46 +09:00
Nathan Rajlich
38542f76a9 buffer: make SlowBuffer inherit from Buffer
This frees us from manually having to copy over functions to SlowBuffer's
prototype (which has bitten us multiple times in the past).

As an added bonus, the `inspect()` function is now shared between Buffer
and SlowBuffer, removing some duplicate code.

Closes #3228.
2012-05-11 17:27:40 -07:00
isaacs
9239088e87 500 is a magic number for the GC for some reason 2012-05-11 15:01:38 -07:00
isaacs
07d8a4650e Break up huge function in ClientRequest.onSocket 2012-05-11 15:01:38 -07:00
Ben Noordhuis
884499d37e build: fix cross-compiling
Take arch cflags in account when building libuv.
2012-05-11 19:01:30 +02:00
isaacs
a811a4a130 Fix #3058 querystring: Fix incorrect handling of empty keys 2012-05-11 08:49:03 -07:00
Shigeki Ohtsu
cc8cfb145a doc: fix typo in buffer documentation
Fixes #3253.
2012-05-11 20:00:53 +09:00
Ben Noordhuis
12fc9fa8a7 test: add failing dgram refcount test
Idle UDP sockets (reading nor writing) should not keep the event loop alive.
This will get fixed in v0.8 one way or the other.
2012-05-11 04:39:23 +02:00
Ben Noordhuis
68f63fe9ec child_process: make copy of options arg
Make a copy of the options object that the user passes in, we modify it.
2012-05-10 16:54:19 +02:00
Ben Noordhuis
928d28a7b3 util: make _extend() more robust
Add a better 'is object?' check, the old one let values like true slip through.
2012-05-10 16:49:37 +02:00
vegorov@chromium.org
52f0c37d09 Runtime_NotifyDeoptimized should search for function activation in all thread stacks.
R=fschneider@chromium.org
BUG=v8:1763

Review URL: http://codereview.chromium.org/8240004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@9588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-10 01:05:10 +02:00
isaacs
07be9fc3a6 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	Makefile
	lib/zlib.js
	src/node.cc
	src/node.js
2012-05-09 15:12:13 -07:00
Philip Tellis
493beb23f2 doc: fs.ReadableStream does not have a destroySoon method 2012-05-09 23:32:50 +02:00
Ben Noordhuis
3883f22ad1 pipe_wrap: don't assert() on pipe accept errors
Pass errors to the onconnection callback.
2012-05-09 23:30:48 +02:00
Felix Geisendörfer
bf9d8e9214 Fix exception output for module load exceptions
So instead of:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^

You will now see:

path/to/foo.js:1
throw new Error('bar');
      ^

This is a sub-set of isaacs patch here:

https://github.com/joyent/node/issues/3235

The difference is that this patch purely adresses the exception output,
but does not try to make any behavior changes / improvements.
2012-05-09 11:54:43 -07:00
Felix Geisendörfer
814033365b Fix process.nextTick throw call sites
This patch now reports the proper throw call site for exceptions
triggered within process.nextTick. So instead of this:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^

You will now see:

mydir/myscript.js:15
  throw new Error('My Error');
          ^

From my testing this patch causes no performance regressions, but does
greatly simplify processing the nextTickQueue.
2012-05-09 11:54:43 -07:00
isaacs
5979f096d1 Fix #3242 Actually deprecate 'binary' buffer encoding 2012-05-09 10:08:54 -07:00
Alex Kocharin
e85927119c util: handle non-string return value in .inspect() 2012-05-09 16:44:44 +02:00
Ben Noordhuis
7d2e68fdbd stream_wrap: fix compilation errors 2012-05-09 06:06:42 +02:00
Bert Belder
b673d0670f Net.js: fix UCS2 write crash due to inconsistent naming 2012-05-09 04:58:26 +02:00
Ben Noordhuis
ee437c0557 zlib: fix error reporting
This commit is a back-port of the changes on the master branch.

Fixes #3230.
2012-05-09 04:44:04 +02:00
Bert Belder
4624cf1214 stream_wrap.cc: fix typo 2012-05-09 04:34:41 +02:00
Bert Belder
27ddd14e9f net.js: make Socket.bytesWritten work again
Earlier string write optimizations broke it.
2012-05-09 04:00:07 +02:00
Bert Belder
726ebad9bc StreamWrap::WriteBuffer: remove superfluous arguments 2012-05-09 04:00:02 +02:00
Bert Belder
0e57aafbb1 Optimize writing strings with Socket.write 2012-05-09 03:56:19 +02:00
Bert Belder
4ddafbd563 Benchmark: add /unicode/nnn bench to http_simple.js 2012-05-09 03:56:09 +02:00
Bert Belder
7f68f256cf Benchmark: clean up http_simple.js 2012-05-09 03:56:07 +02:00
Bert Belder
bb675baaa9 net.js: don't pretend that everything is okay when unwrapping fails
In case of an UNWRAP failure, the binding returns -1, which is truthy.
2012-05-09 03:56:06 +02:00
yangguo@chromium.org
29b2fdb0c5 Force inlining CopyChars and String::Get.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10332054

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-09 03:56:04 +02:00
Ben Noordhuis
78e831a31c Don't use _snprintf() on Windows, it's not safe.
_snprintf() doesn't zero-terminate the buffer on overflow. Use the hand-rolled
version that lives in src/node_internals.h.
2012-05-08 16:02:14 +02:00
isaacs
8c758e127c Don't destroy on timeout 2012-05-07 14:19:16 -07:00
isaacs
b4fbf6d275 Fix #3231. Don't try to emit error on a null'ed req object 2012-05-07 14:17:17 -07:00
Ben Noordhuis
e02af94947 test: add failing HTTP client timeout test
See #3231.
2012-05-07 22:53:32 +02:00
Kevin Gadd
1eb9fc5f33 docs: add warning to vm module docs
Add a clear warning about known issues with the module and a pointer to the
GitHub issues list for the module. Describe some of the biggest known issues
with the module.
2012-05-07 21:39:08 +02:00
James Koval
34f05a3195 docs: update var names in readline docs to be consistent
Closes #3201.
2012-05-06 11:23:09 -07:00
isaacs
33a9ac6087 Upgrade npm to 1.1.21
Somehow this got downgraded in the last v0.6 merge.  Very strange.
2012-05-05 22:33:12 -07:00
isaacs
1858d1c340 Document http.STATUS_CODES
This is an incredibly useful thing to know about, and it
will likely never change.  I can't remember why we
didn't ever document it, and people keep suggesting we
do so.
2012-05-05 19:27:42 -07:00
isaacs
3d84c3db25 More cluster event consistency
Regarding discussion in #3198.  Passing the worker as an argument
to an event emitted on the worker is redundant, and an unnecessary
break in consistency vs the events on the ChildProcess objects.

It was removed from 'exit', but 'listening' and others were
overlooked.  This corrects that oversight.
2012-05-05 15:20:10 -07:00
isaacs
1930772693 Move test-fs-largefile into pummel
It's too slow.
2012-05-05 15:05:14 -07:00
Javier Hernández
792d9a921d build: print error message if no compiler found
Make the configure script warn the user about the lack of an acceptable
C compiler on the system.
2012-05-05 16:31:27 +02:00
koichik
9f3c639a9c doc: fix setEncoding()
Fixes #3209.
2012-05-05 23:10:36 +09:00
koichik
40c4beeb57 string_decoder: added support for UTF-16LE
Fixes #3223.
2012-05-05 22:47:24 +09:00
Mark Cavage
5871c81181 Add HTTP Status codes from RFC 6585
See: http://tools.ietf.org/html/rfc6585
2012-05-04 21:51:24 -07:00
koichik
ceb51ddaa1 string_decoder: add support for CESU-8
Fixes #3217.
2012-05-05 12:24:01 +09:00
isaacs
eaf607e88b test: No need for weak in 'make test' 2012-05-04 18:30:38 -07:00
isaacs
8cd2b0e778 test: No need for weak in 'make test' 2012-05-04 18:29:56 -07:00
J. Lee Coltrane
a62dd44b20 cluster: worker exit event to match child_process
test: fixes due to new cluster api.

- changed worker `death` to `exit`.
- corrected argument type expected by worker `exit` handler.

test: more tests of cluster.worker death

cluster: fixed arguments on worker 'exit' event

worker 'exit' event now emits arguments consistent with the
corresponding event in child_process module.
2012-05-04 17:28:21 -07:00
isaacs
c1bf810108 Merge branch 'v0.6-merge' 2012-05-04 17:24:30 -07:00
isaacs
cd8f82c007 Fix incorrect merge choices 2012-05-04 17:24:21 -07:00
Brian Schroeder
436a9b69f3 net: signal localAddress bind failure in connect 2012-05-05 01:30:32 +02:00
Marcel Laverdet
c33d3174b8 node: un-revert 9a6012e
The crashes in debug mode after adding Locker are *not* caused by
Locker. Locker is merely exposing issues that already existed. Some of
these issues have since been fixed in 70635753.

This reverts commit 407181538b.
This reapplies commit 9a6012edd9.

Conflicts:
	src/node.cc
2012-05-05 00:56:17 +02:00
isaacs
01d146c29f Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	Makefile
	deps/npm/AUTHORS
	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/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/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/list.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/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/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/package.json
	doc/api/url.markdown
	lib/http.js
	src/node_version.h
	test/simple/test-fs-sync-fd-leak.js
2012-05-04 15:12:47 -07:00
isaacs
1de43149bb http: Clean up parser usage
Move parsers.free(parser) to a single function, which also
nulls all of the various references we hang on them.

Also, move the parser.on* methods out of the closure, so that
there's one shared definition of each, instead of re-defining
for each parser in a spot where they can close over references
to other request-specific objects.

Conflicts:

	lib/http.js
2012-05-04 14:58:30 -07:00
isaacs
a9fc63f7a1 Clean up gc tests
This fixes the additional issues brought up in #3179.
2012-05-04 14:31:13 -07:00
isaacs
0abe42a0f4 http: .once() usage in setTimeout 2012-05-04 14:31:08 -07:00
isaacs
e63c7821d5 Tests for memory leaks
Conflicts:

	Makefile
2012-05-04 14:30:54 -07:00
isaacs
e4dd8dc28e http leak: Null links from parser to req/res 2012-05-04 14:27:47 -07:00
vvo
5eac8d6739 Fix #3179 HTTP memory leak using ClientRequest. 2012-05-04 14:27:41 -07:00
isaacs
2f93eb6102 http client: Destroy on timeout 2012-05-04 14:27:35 -07:00
isaacs
0a414f4caa http: Remove socket ondata/onend in parser cleanup 2012-05-04 14:27:30 -07:00
isaacs
9164fa6aaa Null references to request object on socket errors.
Regarding #3199 and #3179 and issues seen in production.
Hopefully this fixes them.
2012-05-04 14:27:24 -07:00
isaacs
992e3464b8 Now working on 0.6.18 2012-05-04 13:34:33 -07:00
isaacs
fbe143d9cb Merge branch 'v0.6.17-release' into v0.6 2012-05-04 13:34:08 -07:00
isaacs
4ced23deaf 2012.05.04 Version 0.6.17 (stable)
* Upgrade npm to 1.1.21

* uv: Add support for EROFS errors (Ben Noordhuis, Maciej Małecki)

* uv: Add support for EIO and ENOSPC errors (Fedor Indutny)

* windows: Add support for EXDEV errors (Bert Belder)

* http: Fix client memory leaks (isaacs, Vincent Voyer)

* fs: fix file descriptor leak in sync functions (Ben Noordhuis)

* fs: fix ReadStream / WriteStream double close bug (Ben Noordhuis)
2012-05-04 13:12:52 -07:00
isaacs
711ecdd54f test: Run weak install with --unsafe-perm
This way it doesn't die when running as root.
2012-05-04 12:52:59 -07:00
isaacs
aaf0453b7c Upgrade npm to 1.1.21 2012-05-04 12:52:55 -07:00
isaacs
719cd461d3 Upgrade uv to 936795a2c 2012-05-04 11:00:39 -07:00
isaacs
ab60efb535 Update Authors 2012-05-04 10:57:33 -07:00
isaacs
d1effbb338 Merge branch 'http-memleak' into v0.6 2012-05-04 10:54:24 -07:00
isaacs
2fc528ce00 http: Clean up parser usage
Move parsers.free(parser) to a single function, which also
nulls all of the various references we hang on them.

Also, move the parser.on* methods out of the closure, so that
there's one shared definition of each, instead of re-defining
for each parser in a spot where they can close over references
to other request-specific objects.
2012-05-04 10:40:50 -07:00
isaacs
62c12d2161 Clean up gc tests
This fixes the additional issues brought up in #3179.
2012-05-04 10:40:38 -07:00
ANDO Takahiro
ebd0f98e2b doc: fix callback argument of child_process.exec, execFile
Fixes #3196.
2012-05-04 19:15:30 +09:00
isaacs
e3ceee2dce http: .once() usage in setTimeout 2012-05-03 10:39:16 -07:00
isaacs
91120e0429 Tests for memory leaks 2012-05-03 10:36:17 -07:00
isaacs
b7e8e35c0e http leak: Null links from parser to req/res 2012-05-03 10:20:45 -07:00
koichik
ebbd4039bc buffer: add UTF-16LE encoding name. 2012-05-03 23:56:17 +09:00
vvo
75f2365558 Fix #3179 HTTP memory leak using ClientRequest. 2012-05-03 07:45:46 -07:00
Ben Noordhuis
e4a8d2617b addon: add AtExit() function
Lets native addons register exit hooks that run after the event loop has quit
but before the VM is killed.

Fixes #3147.
2012-05-03 16:11:42 +02:00
Igor Zinkovsky
6f82b9f482 64bit offsets for fs calls 2012-05-02 22:39:23 -07:00
Ben Noordhuis
df2c5fa81d fs: fix file descriptor leak in sync functions
Fixes #3202. This is a back-port of commit 4e290e4.
2012-05-03 02:49:36 +02:00
Ben Noordhuis
4e290e48b2 fs: fix file descriptor leak in sync functions
Fixes #3202.
2012-05-03 01:08:46 +02:00
Ben Noordhuis
47d6a94656 fs: fix ReadStream / WriteStream double close bug
* Calling fs.ReadStream.destroy() or fs.WriteStream.destroy() twice would close
  the file descriptor twice. That's bad because the file descriptor may have
  been repurposed in the mean time.

* A bad value check in fs.ReadStream.prototype.destroy() would prevent a stream
  created with fs.createReadStream({fd:0}) from getting closed.
2012-05-03 01:01:46 +02:00
Ben Noordhuis
6b426a2edd Revert "v8: fix "pure virtual method called" runtime error"
It makes mksnapshot die with a segmentation fault on sunos with gcc 4.5.2.

This reverts commit c21c51a6fc.
2012-05-02 22:53:45 +00:00
isaacs
c9be1d5ffd http client: Destroy on timeout 2012-05-02 12:13:54 -07:00
Ben Noordhuis
880219645e tcp, udp: share sockaddr-to-object function
Share AddressToJS() function between tcp_wrap.cc and udp_wrap.cc.
2012-05-02 18:03:25 +02:00
Fedor Indutny
c3898f3c1f debugger: support mirroring Date objects
* fixes #3203
2012-05-02 15:48:23 +07:00
Yoshihiro Kikuchi
ee2291eb0d test: add a child domain explicitly 2012-05-02 02:51:28 +02:00
isaacs
fb400b4868 Return after emitting error in tty.js 2012-05-01 15:51:29 -07:00
isaacs
bce68134b6 http: Remove socket ondata/onend in parser cleanup 2012-05-01 15:25:59 -07:00
isaacs
bfe9cdb7f2 Null references to request object on socket errors.
Regarding #3199 and #3179 and issues seen in production.
Hopefully this fixes them.
2012-05-01 14:26:18 -07:00
Nathan Rajlich
b894521bd2 process: ensure that "exit" doesn't get emitted twice on a natural exit
Fixes "test/simple/test-process-exit.js".
2012-05-01 14:09:31 -07:00
isaacs
acf19500ee Now working on 0.6.17 2012-05-01 13:31:26 -07:00
Fedor Indutny
9f9c333cbc vm: accept only object as arg of .createContext()
Converting strings and others to objects is very slow and essentially
wrong.
2012-05-02 01:59:59 +07:00
Yi, EungJun
4bd54dad33 path: add path.sep to get the path separator. 2012-05-01 15:19:37 +02:00
Kyle Robinson Young
6ba3e68bd2 doc: correct return value of string-based fs.readSync
Closes #2330
2012-05-01 15:19:36 +02:00
Ben Noordhuis
b45a10818e udp: slightly optimize address family property 2012-05-01 15:19:30 +02:00
Ben Noordhuis
e747daf604 udp: make variable names consistent 2012-05-01 14:52:00 +02:00
Shigeki Ohtsu
94f1feeb59 udp: make getsockname() return address family name 2012-05-01 14:50:17 +02:00
Nathan Rajlich
f4403f90f8 tty: emit "error" instead of throwing when getWindowSize() fails 2012-04-30 18:51:20 -07:00
Garen Torikian
6cacb9a21e doc: add Cloud9 links to docs 2012-05-01 02:25:08 +02:00
Kyle Robinson Young
e02d5c9d41 doc: add args to console methods 2012-05-01 02:25:08 +02:00
Kyle Robinson Young
c9e6d3696c doc: typo fixes 2012-05-01 02:25:08 +02:00
Nathan Rajlich
f1f5de1c8d tty: throw an Error when getWindowSize() fails 2012-04-30 16:20:27 -07:00
Michael Thomas
4e4860579e test: rebuild keys without asking for password 2012-05-01 01:08:31 +02:00
Ben Noordhuis
75c6255d16 deps: remove libuv sanity check
Remove reference count check. Unbreaks test suite. This needs to be addressed.
2012-05-01 00:55:46 +02:00
Ben Noordhuis
89e311b1ae deps: back-port openssl patch
Check for potentially exploitable overflows in asn1_d2i_read_bio
BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer
in CRYPTO_realloc_clean.

Taken from OpenSSL CVS. Addresses CVE-2012-2110.
2012-05-01 00:40:38 +02:00
isaacs
518d28c23a Merge branch 'v0.6.16-release' into v0.6 2012-04-30 13:15:40 -07:00
isaacs
a1d193963d 2012.04.30 Version 0.6.16 (stable)
* Upgrade V8 to 3.6.6.25

* Upgrade npm to 1.1.19

* Windows: add mappings for UV_ENOENT (Bert Belder)

* linux: add IN_MOVE_SELF to inotify event mask (Ben Noordhuis)

* unix: call pipe handle connection cb on accept() error (Ben Noordhuis)

* unix: handle EWOULDBLOCK (Ben Noordhuis)

* map EWOULDBLOCK to UV_EAGAIN (Ben Noordhuis)

* Map ENOMEM to UV_ENOMEM (isaacs)

* Child process: support the `gid` and `uid` options (Bert Belder)

* test: cluster: add worker death event test (Ben Noordhuis)

* typo in node_http_parser (isaacs)

* http_parser: Eat CRLF between requests, even on connection:close. (Ben Noordhuis)

* don't check return value of unsetenv (Ben Noordhuis)
2012-04-30 13:09:50 -07:00
isaacs
e5ef103b05 Fix #3194 correct url documentation 2012-04-30 13:09:31 -07:00
isaacs
35bcb1d6a9 Indentation fix 2012-04-30 13:09:31 -07:00
isaacs
1ac05cc5ad Upgrade npm to 1.1.18 2012-04-30 13:09:31 -07:00
Nathan Rajlich
248f552ab4 process: ensure that the "exit" event always has "code" given
Upon "normal" exiting of Node (i.e. the event loop completes naturally),
the "code" parameter was not being passed to the "exit" event listeners.

Be consistent. Tests included.
2012-04-30 10:42:13 -07:00
Maciej Małecki
77c18d1e1b console: throw when no such label exists in console.timeEnd
Test included.
2012-04-29 22:27:45 +02:00
Bert Belder
3bcbd14bb1 process_wrap: don't use uv_spawn2
It was a temporary thing for the 0.6 branch only.
2012-04-29 00:24:51 +02:00
Bert Belder
d2dd9d108d uv: upgrade to e2cae340a6 2012-04-29 00:22:01 +02:00
Bert Belder
c8a10e97c8 Merge branch 'v0.6'
Conflicts:
	deps/uv/include/uv-private/uv-unix.h
	deps/uv/include/uv-private/uv-win.h
	deps/uv/src/uv-common.c
	deps/uv/src/win/fs.c
	src/process_wrap.cc
2012-04-29 00:17:23 +02:00
ssuda
db844b152a process: don't use strdup()
file and cwd can be directly used from Utf8Value.

Conflicts:

	src/process_wrap.cc
2012-04-28 23:51:41 +02:00
Bert Belder
3546383cf0 process_wrap: avoid leaking memory when throwing due to invalid arguments 2012-04-28 23:36:47 +02:00
Andreas Madsen
ab072ee416 doc: document the address object in the cluster listening event 2012-04-28 16:42:55 +02:00
Ben Noordhuis
12a90e98bf bench: add continuous stress test
Useful in tracking down or at least demonstrating memory leaks.
2012-04-27 23:11:32 +02:00
Bert Belder
55e4d54927 Child process: support the gid and uid options 2012-04-27 22:13:00 +02:00
Bert Belder
51e66ec410 Windows: turn off /Gm
Otherwise multicode compile doesn't work.
2012-04-27 22:06:12 +02:00
Bert Belder
0b75eee364 uv: upgrade to d41cc9118d 2012-04-27 22:00:44 +02:00
Bert Belder
e221cd4a53 uv: upgrade to aea5db5da1 2012-04-27 21:28:56 +02:00
Ben Noordhuis
4e84dfa683 bench: run GC and dump stats if --expose-gc is set 2012-04-27 20:38:58 +02:00
Marcel Laverdet
70635753a3 Cleanup vm module memory leakage
There are some paths here that led to dangling contexts. By being
smarter with handle management we can get rid of all the cleanup code
and fix those issues.
2012-04-27 10:32:40 -07:00
isaacs
76de7c0c26 Add customary 'fork me on github' banner to website 2012-04-27 07:58:38 -07:00
Nathan Rajlich
f405daa922 repl: make tab completion read up the prototype of "global"
For example, there's a global "toString()" function, so the REPL's
tab completion should pick that up.
2012-04-25 20:34:34 -07:00
Nathan Rajlich
98b4596a46 process: lint 2012-04-25 20:10:50 -07:00
Ben Noordhuis
5648d95c4a Remove unused local variable. 2012-04-25 04:10:31 -07:00
Kyle Robinson Young
df6c12cdcc doc: update string_decoder stability index to 3
Ref #3140
2012-04-25 01:13:08 +02:00
Nathan Rajlich
6292df659f process: comment for consistency 2012-04-24 11:31:26 -07:00
Nathan Rajlich
ef3a874f41 process: set _print_eval even when --eval is not passed
This is for scripts being fed from stdin:

  $ echo "{ foo: 'bar' }" | node -p
2012-04-24 11:31:02 -07:00
Nathan Rajlich
0b5235e68c process: make --eval and reading scripts from stdin act the same
Reusing the same logic for both places for the behavior is consistent.

For example:

  $ ./node -p -e "'Hello World'"
  Hello World

  $ echo "'Hello World'" | ./node -p
  Hello World
2012-04-24 11:30:14 -07:00
Kyle Robinson Young
d9bad09ede doc: util: add args to format and methods error, puts, print 2012-04-24 05:25:09 +02:00
Ben Noordhuis
48cdbffd24 v8: posix: try to send() whole buffer
Retry the send() syscall after a partial write.
2012-04-24 04:11:29 +02:00
Ben Noordhuis
ebfb8a5613 v8: posix: handle EINTR in socket functions
The socket functions did not handle EINTR (syscall interrupted by signal) which
tripped up the debug agent.
2012-04-24 04:11:22 +02:00
Ben Noordhuis
4359e8154d v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-04-24 04:11:11 +02:00
Kyle Robinson Young
491c8d92b8 doc: add deprecated function http.createClient()
Appears in a lot of old code and core tests. Documented to show it
is deprecated.

Closes #1613.
2012-04-23 16:30:28 +02:00
Ben Noordhuis
a64acd8baa test: cluster: add worker death event test 2012-04-23 15:58:48 +02:00
Malte-Thorben Bruns
ea50ebd36d build: support make install "DESTDIR=/path" 2012-04-23 01:52:26 +02:00
Nathan Rajlich
e16021340d repl: use Object.getPrototypeOf on functions for tab complete() 2012-04-21 13:53:49 -07:00
isaacs
c0a9985da7 domain: Document explicit binding, and d.run() 2012-04-21 10:32:03 -07:00
Kyle Robinson Young
525253d50e doc: add args for rl.write and rl.prompt 2012-04-21 05:31:47 +02:00
Kyle Robinson Young
da56c72f59 readline: remove unused vars in _ttyWrite 2012-04-21 05:30:24 +02:00
isaacs
27dfb1d4c0 doc: typo in child_process documentation 2012-04-20 07:46:42 -07:00
isaacs
77c1cc0482 doc: typo in cluster documentation 2012-04-20 07:43:19 -07:00
Kyle Robinson Young
d91ef153e7 doc: add string_decoder doc 2012-04-20 16:17:41 +02:00
Brian White
642945cc00 docs: Remove duplicate socket.write() description 2012-04-20 16:16:17 +02:00
Ben Noordhuis
c21c51a6fc v8: fix "pure virtual method called" runtime error
Fixes #2912.
2012-04-20 01:29:02 +02:00
Kyle Robinson Young
e67a0f80e0 readline: _normalWrite() doesn't take a key modifier arg 2012-04-18 23:36:46 +02:00
isaacs
c9a231db0e typo in node_http_parser 2012-04-18 13:01:33 -07:00
Kyle Robinson Young
57148f54e1 readline: change char to ch to avoid reserved word 2012-04-18 21:57:39 +02:00
Ben Noordhuis
c56d1559fc test: use the new net.listen(backlog=x) API 2012-04-18 21:55:36 +02:00
Erik Dubbelboer
12f77440ef doc: improve dns module docs 2012-04-18 21:51:16 +02:00
Erik Dubbelboer
ecfe32e3a0 dns: add more error codes 2012-04-18 21:50:52 +02:00
isaacs
605927fbd9 Fix test/ jslint failures (by not linting tests)
In practice, it's not important to lint tests.  We lint src/
and lib/, which is where we're more prone to make mistakes that
affect real-world situations in subtle ways, and where more
changes are made that ought to be kept in a consistent style.

Tests are a mess anyways, and no one cares.
2012-04-18 12:44:28 -07:00
Erik Dubbelboer
3d69bbfa87 net, http: add backlog parameter to .listen() 2012-04-18 21:40:25 +02:00
isaacs
b12b2b83fc Merge remote-tracking branch 'ry/v0.6' 2012-04-18 12:25:32 -07:00
isaacs
33c76f19de net.js: lint 2012-04-18 12:24:41 -07:00
Dane Springmeyer
e5b787e84d deps: fix v8 build error
Pull in build error fix from http://code.google.com/p/v8/source/detail?r=9505
Missed in 5d69bbfbd.
2012-04-18 21:15:09 +02:00
isaacs
ecca7525cc Merge remote-tracking branch 'ry/v0.6' into master
Conflicts:
	AUTHORS
	ChangeLog
	LICENSE
	Makefile
	deps/http_parser/test.c
	deps/npm/AUTHORS
	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/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/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/list.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/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/lib/npm.js
	deps/npm/man/man1/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/fstream-npm/fstream-npm.js
	deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
	deps/npm/node_modules/fstream-npm/package.json
	deps/npm/node_modules/node-gyp/LICENSE
	deps/npm/node_modules/node-gyp/lib/build.js
	deps/npm/node_modules/node-gyp/lib/install.js
	deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
	deps/npm/node_modules/node-gyp/node_modules/glob/package.json
	deps/npm/node_modules/node-gyp/package.json
	deps/npm/package.json
	deps/uv/test/test-fs.c
	deps/v8/src/regexp-macro-assembler-tracer.cc
	deps/v8/src/version.cc
	src/node_version.h
	src/platform_sunos.cc
	test/simple/test-net-write-after-close.js
	wscript
2012-04-18 11:57:54 -07:00
isaacs
0fcb124602 Now working on 0.7.9 2012-04-18 11:17:29 -07:00
isaacs
889cbf9ada Merge branch 'v0.7.8-release' 2012-04-18 11:17:15 -07:00
isaacs
c2b47097c0 2012.04.18, Version 0.7.8, (unstable)
* Upgrade V8 to 3.9.24.9

* Upgrade OpenSSL to 1.0.0f

* Upgrade npm to 1.1.18

* Show licenses in Binary installers

* Domains (isaacs)

* readline: rename "end" to "close" (Nathan Rajlich)

* tcp: make getsockname() return address family as string (Shigeki Ohtsu)

* http, https: fix .setTimeout() (ssuda)

* os: add cross platform EOL character (Mustansir Golawala)

* typed arrays: unexport SizeOfArrayElementForType() (Aaron Jacobs)

* net: honor 'enable' flag in .setNoDelay() (Ben Noordhuis)

* child_process: emit error when .kill fails (Andreas Madsen)

* gyp: fix 'argument list too long' build error (Ben Noordhuis)

* fs.WriteStream: Handle modifications to fs.open (isaacs)

* repl, readline: Handle newlines better (Nathan Rajlich, Nathan Friedly)

* build: target OSX 10.5 when building on darwin (Nathan Rajlich)

* Fix #3052 Handle errors properly in zlib (isaacs)

* build: add support for DTrace and postmortem (Dave Pacheco)

* core: add reusable Slab allocator (Ben Noordhuis)
2012-04-18 09:37:18 -07:00
isaacs
7b3fb22290 typo in node_http_parser 2012-04-18 09:36:45 -07:00
isaacs
6bb9868271 Reapply patches floating on V8 2012-04-18 09:36:44 -07:00
isaacs
6ed5ef5fe0 Upgrade V8 to 3.9.24.9 2012-04-18 09:36:44 -07:00
isaacs
c8bbd13ea8 Upgrade npm to 1.1.17 2012-04-18 09:36:40 -07:00
Josh W
d2860a6c7d doc: make readline example filter shorter 2012-04-18 15:21:56 +02:00
Josh W
20143b359c doc: add some headers to make it more legible 2012-04-18 15:21:51 +02:00
isaacs
d8b33dc147 lint 2012-04-17 15:52:57 -07:00
isaacs
37fd953378 uv: Cherry-pick joyent/libuv@3c41597 2012-04-17 15:45:48 -07:00
isaacs
079b81358b test: Minor change to message/undefined_reference_in_new_context 2012-04-17 15:30:22 -07:00
Dave Pacheco
8559a4ae0f Fix 64-bit SmartOS build 2012-04-17 14:34:12 -07:00
isaacs
8673a4aa25 Merge branch 'domains3' 2012-04-17 13:36:29 -07:00
isaacs
d4ed2e61f7 Add Todo comments about domain-ifying crypto 2012-04-17 13:14:55 -07:00
isaacs
45c1d4f96f Add switches to http_simple bench to use domains 2012-04-17 13:14:55 -07:00
isaacs
10ce3d129d Domain hooks in ReqWrap<T> and MakeCallback 2012-04-17 13:14:55 -07:00
isaacs
963459d736 Domain feature
This is a squashed commit of the main work done on the domains-wip branch.

The original commit messages are preserved for posterity:

* Implicitly add EventEmitters to active domain
* Implicitly add timers to active domain
* domain: add members, remove ctor cb
* Don't hijack bound callbacks for Domain error events
* Add dispose method
* Add domain.remove(ee) method
* A test of multiple domains in process at once
* Put the active domain on the process object
* Only intercept error arg if explicitly requested
* Typo
* Don't auto-add new domains to the current domain

    While an automatic parent/child relationship is sort of neat,
    and leads to some nice error-bubbling characteristics, it also
    results in keeping a reference to every EE and timer created,
    unless domains are explicitly disposed of.

* Explicitly adding one domain to another is still fine, of course.
* Don't allow circular domain->domain memberships
* Disposing of a domain removes it from its parent
* Domain disposal turns functions into no-ops
* More documentation of domains
* More thorough dispose() semantics
* An example using domains in an HTTP server
* Don't handle errors on a disposed domain
* Need to push, even if the same domain is entered multiple times
* Array.push is too slow for the EE Ctor
* lint domain
* domain: docs
* Also call abort and destroySoon to clean up event emitters
* domain: Wrap destroy methods in a try/catch
* Attach tick callbacks to active domain
* domain: Only implicitly bind timers, not explicitly
* domain: Don't fire timers when disposed.
* domain: Simplify naming so that MakeCallback works on Timers
* Add setInterval and nextTick to domain test
* domain: Make stack private
2012-04-17 13:14:55 -07:00
isaacs
a26bee8fa1 MakeCallback: Consistent symbol usage 2012-04-17 13:14:54 -07:00
isaacs
db45b2ca02 MakeCallback: Use in node_signal_watcher 2012-04-17 12:00:58 -07:00
isaacs
e1dd570585 MakeCallback: Use in node_io_watcher 2012-04-17 12:00:58 -07:00
isaacs
35c0cd219d MakeCallback: Use in node_crypto 2012-04-17 12:00:58 -07:00
isaacs
91701c2db1 MakeCallback: Use in node_file.cc 2012-04-17 12:00:58 -07:00
isaacs
88f94fa28c MakeCallback: abort() if not a function 2012-04-17 12:00:58 -07:00
isaacs
ac1aaddc00 MakeCallback: Return the callback return value 2012-04-17 11:56:33 -07:00
isaacs
7407be896e MakeCallback: Accept Function or Symbol argument 2012-04-17 11:56:32 -07:00
isaacs
80a55e9c83 Report errors thrown from uncaughtException handers 2012-04-17 11:56:32 -07:00
Nathan Rajlich
e621250116 test: lowercase setRawMode() test case filename 2012-04-17 11:53:50 -07:00
Nathan Rajlich
e28eb6de30 doc: update the readline docs for the "close" event behavior 2012-04-17 11:53:50 -07:00
Nathan Rajlich
327286dbcd repl: update the repl for the new readline behavior
This fixes the failing REPL tests.
2012-04-17 11:53:50 -07:00
Nathan Rajlich
c5d35aca33 test: check for multiple "emit" calls in repl-end-emits-exit.js 2012-04-17 11:53:50 -07:00
Nathan Rajlich
9c3559f0ad readline: re-add the Interface#close() method; rename "end" to "close"
The idea here is to reduce the number of times that `setRawMode()` is called
on the `input` stream, since it is expensive, and simply pause()/resume()
should not call it.

So now `setRawMode()` only gets called at the beginning of the Interface
instance, and then when `Interface#close()` is called.

Test case included.
2012-04-17 11:53:50 -07:00
Nathan Rajlich
86bd9b6e70 doc: change in to input in the readline docs
Also compacting some long lines.
2012-04-17 11:53:49 -07:00
Kyle Robinson Young
718aa505c4 doc: add require.extensions to globals
Closes #3028
2012-04-17 17:10:42 +02:00
Kyle Robinson Young
7cd1690f3d doc: add cache argument to fs.realpath() 2012-04-17 14:17:41 +02:00
domenic
5bc07cc90b doc: note that stream.pause is advisory 2012-04-17 14:14:09 +02:00
ssuda
70005be4ff Fixing ClientRequest setTimeout EventEmitter Leak
This will fix #3068
2012-04-16 23:36:18 +02:00
Zachary Scott
540a441259 docs: fix broken links in zlib docs 2012-04-16 23:06:52 +02:00
Zachary Scott
b4626afb61 docs: url.format uses host for hostname and port, not auth
Fixes #3062.
2012-04-16 22:28:02 +02:00
Zachary Scott
59e6b14395 docs: url.host doesn't include auth
Fixes #3062.
2012-04-16 22:27:54 +02:00
fukayatsu
0f95a93a2c tls: remove duplicate line 2012-04-16 21:38:26 +02:00
Shigeki Ohtsu
0d13142332 tcp: make getsockname() return address family as string 2012-04-16 18:00:47 +02:00
Ben Noordhuis
21d2683976 test: don't make request until server is listening
Preemptively fixes simple/test-https-timeout on platforms where binding to an
interface is not an instantaneous action.
2012-04-16 18:00:47 +02:00
ssuda
48d52d85c3 http, https: fix .setTimeout()
Fixes #3107.
2012-04-16 18:00:38 +02:00
lrn@chromium.org
5d69bbfbdb Fix bug in x64 RegExp detecting start of string.
Also add missing MIPS case in regexp tracer.

Fixes issues v8:1748 and v8:1746

BUG=v8:1748, v8:1746
TEST=mjsunit/regress/regress-1748.js

Review URL: http://codereview.chromium.org/8116001

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@9504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-16 17:40:17 +02:00
Dave Pacheco
0f74729758 disable omit-frame-pointer on solaris systems 2012-04-16 17:28:45 +02:00
isaacs
0c0f13eda4 Patches floating on v8 2012-04-16 17:28:33 +02:00
Bert Belder
69ca83f755 Upgrade V8 to 3.6.6.25 2012-04-16 17:27:16 +02:00
Kyle Robinson Young
0a83b78ba8 docs: more explicit argument names in fs 2012-04-16 16:31:02 +02:00
Ben Noordhuis
3f4261276e node: don't check return value of unsetenv()
It returns void on some platforms, notably FreeBSD.
2012-04-16 14:16:48 +02:00
Maciej Małecki
f065c87bcf events: remove misleading comment 2012-04-15 15:52:56 +02:00
Ben Noordhuis
c945eae942 deps: fix -DOPENSSL_NO_SOCK on sunos
The OPENSSL_NO_SOCK macro in OpenSSL missed a couple of networking functions
that called other functions that OPENSSL_NO_SOCK *had* filtered out. None of
the functions (filtered or not) were actually used but it was enough to trip
up the Solaris linker.
2012-04-14 22:05:17 +00:00
Mustansir Golawala
7ee15457ed os: add cross platform EOL character 2012-04-14 23:17:38 +02:00
Ben Noordhuis
d03b80bc12 deps: upgrade http_parser to joyent/http-parser@da91852 2012-04-14 23:12:36 +02:00
isaacs
93cefab1a3 Set errno in fake-failing child-process kill test 2012-04-13 16:53:51 -07:00
Ben Noordhuis
b7b7b29f50 dns: remove unused functions 2012-04-13 14:46:35 +02:00
Zachary Scott
46acb09ed8 docs: rewrite "addons" docs to use node-gyp
Closes #3100.
Closes #3101.
2012-04-12 18:32:01 -07:00
Aaron Jacobs
1444801374 typed arrays: unexport SizeOfArrayElementForType()
It isn't used anywhere else, so made it an implementation detail in
v8_typed_array.cc.
2012-04-12 23:48:49 +02:00
Ben Noordhuis
16fca262be net: honor 'enable' flag in .setNoDelay()
Fixes #3096.
2012-04-12 19:15:32 +02:00
Andreas Madsen
5b43c63c88 child_process: emit error when .kill fails 2012-04-12 08:17:42 -07:00
isaacs
04271a5e93 gyp: Apply 'argument too long' fix in another place
For some reason, aa5961a445 caused
'make test' to rebuild the entire project every time.  Applying
the fix to the other place where gyp chops up the argument list
makes it behave properly.
2012-04-11 18:26:52 -07:00
Bert Belder
1c88c3b3b5 Disable OpenSSL UI 2012-04-12 01:34:05 +02:00
Ben Noordhuis
916b5d1fff test: merge tls-ext-key-usage into tls-securepair-client 2012-04-12 01:34:05 +02:00
Ben Noordhuis
6cbed959e6 test: fix openssl tests
Don't assume that the libcrypto and libssl that we're linked against is the same
version as the openssl command line tool. This is important because the tool has
a bug in all pre-1.0.0 versions that makes it unusable for these tests.
2012-04-12 01:34:05 +02:00
Ben Noordhuis
2639566c6e build: configure openssl
* compile with -DOPENSSL_NO_SOCK and -DOPENSSL_NO_DGRAM, we don't need it
* compile with -DOPENSSL_NO_GOST and -DOPENSSL_NO_HW_PADLOCK, works around the
  brain dead linker on solaris and maybe others
* compile with -DTERMIOS, OS X doesn't have <termio.h>
* compile with -D__EXTENSIONS__ on solaris, makes siginfo_t available
* compile without -ansi on linux, it hides a number of POSIX declarations
  (sigaction, NI_MAXHOST, etc.)
2012-04-12 01:34:05 +02:00
Ben Noordhuis
3694b6914a deps: reapply 0a34755 to bundled openssl 2012-04-12 01:34:05 +02:00
Ben Noordhuis
0f9d201183 deps: reapply 0110c90 to bundled openssl 2012-04-12 01:34:05 +02:00
Ben Noordhuis
30e7fb7307 deps: upgrade openssl to 1.0.0f 2012-04-12 01:34:05 +02:00
Ben Noordhuis
aa5961a445 gyp: fix 'argument list too long' build error 2012-04-12 01:34:04 +02:00
Ben Noordhuis
e9dcfd4bd2 Revert "deps: upgrade libuv to 3c41597"
This reverts commit 0db4dc0024.

This commit makes a lot of tests fail due to reference counting errors. It's
not worth it to debug because the reference counting scheme is due to change
soon anyway.
2012-04-12 00:59:38 +02:00
Bert Belder
3ec84a11f8 Slab allocator: don't attempt to shrink a non-buffer 2012-04-11 22:02:12 +02:00
Nathan Rajlich
9b7a6c5238 configure: output a newline at the end of config.gypi 2012-04-11 11:16:47 -07:00
Nathan Rajlich
fdeeabba78 configure: don't use "with" for Python 2.5 and older 2012-04-11 11:16:11 -07:00
isaacs
e0660740d9 Fix #3089 Build changelog.html for website 2012-04-10 18:35:01 -07:00
isaacs
3ba9519faf Makefile: minor nit 2012-04-10 18:34:57 -07:00
isaacs
8b82abb953 Fix #3089 Build changelog.html for website 2012-04-10 18:31:12 -07:00
isaacs
d0365fd21f Makefile: minor nit 2012-04-10 18:22:42 -07:00
Nathan Rajlich
7b71fd0c68 build: add comment explaining MACOSX_DEPLOYMENT_TARGET. 2012-04-10 14:39:29 -07:00
Nathan Rajlich
70a5b53e03 Re-apply "build: target OSX 10.5 when building on darwin"
This reverts commit 93eca95aec.

Fixes #3072 (once again).
2012-04-10 14:38:47 -07:00
Ben Noordhuis
0db4dc0024 deps: upgrade libuv to 3c41597 2012-04-10 23:32:47 +02:00
isaacs
e8067cb685 Now working on v0.6.16 2012-04-09 10:34:54 -07:00
isaacs
163d3cdf14 Merge branch 'v0.6.15-release' into v0.6 2012-04-09 10:34:32 -07:00
isaacs
f160a45b25 2012.04.09 Version 0.6.15 (stable)
* Update npm to 1.1.16

* Show licenses in binary installers.

* unix: add uv_fs_read64, uv_fs_write64 and uv_fs_ftruncate64 (Ben Noordhuis)

* add 64bit offset fs functions (Igor Zinkovsky)

* windows: don't report ENOTSOCK when attempting to bind an udp handle twice (Bert Belder)

* windows: backport pipe-connect-to-file fixes from master (Bert Belder)

* windows: never call fs event callbacks after closing the watcher (Bert Belder)

* fs.readFile: don't make the callback before the fd is closed (Bert Belder)

* windows: use 64bit offsets for uv_fs apis (Igor Zinkovsky)

* Fix #2061: segmentation fault on OS X due to stat size mismatch (Ben Noordhuis)
2012-04-09 09:03:00 -07:00
isaacs
c75f71dd72 fs.WriteStream: Handle modifications to fs.open
If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.

The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.

This fixes isaacs/node-graceful-fs#6.
2012-04-09 09:03:00 -07:00
isaacs
06ada03ed9 fs.WriteStream: Handle modifications to fs.open
If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.

The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.

This fixes isaacs/node-graceful-fs#6.
2012-04-09 08:39:13 -07:00
isaacs
93eca95aec Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54f80,
which fixed #3072, so we'll have to figure out another way
to make that work.
2012-04-08 22:31:28 -07:00
isaacs
45b772d8cb fs.readFile: Emit 'close' if we don't expect a close later
This fixes a regression introduced by 40b7302
2012-04-07 16:53:18 -07:00
isaacs
08e2e570a7 Make rules for release blog post and email message 2012-04-07 16:37:44 -07:00
isaacs
57d722011a website: Add October Sky JS and Node.js Hispano 2012-04-07 16:29:37 -07:00
isaacs
e81a5e9c9c Remove stray comment from LICENSE file 2012-04-07 16:20:42 -07:00
Bert Belder
ba055115e0 Windows: installer shows license agreement dialog 2012-04-06 16:15:55 -07:00
Bert Belder
1330419446 Windows: add build step that generates license.rtf from LICENSE 2012-04-06 16:15:51 -07:00
Ryan Dahl
c9f17305e6 Mac installer shows license
ref #3056
2012-04-06 16:15:43 -07:00
Ryan Dahl
cf75619bc3 Include text of licenses in LICENSE file
For easy inclusion in binary distributions. ref #3056
2012-04-06 16:15:33 -07:00
Ryan Dahl
331cd7c251 Fix links to libev and libeio licenses 2012-04-06 16:15:24 -07:00
Nathan Rajlich
78eb174ea2 readline: use StringDecoder for decoding "normal" data
The fix from #3059 was not handling multi-byte utf8 data properly.
2012-04-06 16:13:40 -07:00
Nathan Rajlich
8652c11031 test: make the ArrayStream in repl tests write a '\n'
This is more correct.
Fixes them from failing with the updated readline behavior.
2012-04-06 16:13:40 -07:00
Nathan Rajlich
8752ceef13 test: make repl-autolibs check that the callback was invoked 2012-04-06 16:13:40 -07:00
Nathan Rajlich
ca8dea83a9 repl: make the completer use newlines
Fixes the repl.complete() function when terminal is false, since it
is now explicitly looking for a '\n' char.
2012-04-06 16:13:40 -07:00
Nathan Rajlich
aab7cb7dfe test: fix failing test-repl.js 2012-04-06 16:13:40 -07:00
Nathan Friedly
e28f77cbad readline: buffer data to only emit 'line' on '\n'
In "terminal: false" mode.

(And fire it multiple times if multiple lines arrive at once.)

This is necessary because the Windows telnet client sends every single
keystroke as it's typed.

See: http://stackoverflow.com/questions/9962197/node-js-readline-not-waiting-for-a-full-line-on-socket-connections

Closes #3059.
2012-04-06 16:13:40 -07:00
isaacs
37ac5e52bf Update npm to 1.1.16 2012-04-06 14:42:19 -07:00
isaacs
b9bfb1bc91 child_process: Emit err rather than throw for IPC write failure 2012-04-06 14:16:09 -07:00
Igor Zinkovsky
0b57fee3f8 enable test-fs-largefile.js test 2012-04-05 18:18:48 -07:00
Bert Belder
1042a8d887 Please the compiler 2012-04-06 03:14:07 +02:00
Bert Belder
40b7302af8 fs.readFile: don't make the callback before the fd is closed
On Windows it is not possible to unlink() the read file in the callback.
This fixes #3051. A test is included.
2012-04-06 03:13:56 +02:00
Igor Zinkovsky
f178f2ae3f upgrade libuv to d68b3d960b6d95bfc16027cecca2f3fa48bcc36f 2012-04-05 17:10:39 -07:00
Zachary Scott
d73b257d65 docs: grammar and spelling on lib/cluster.js 2012-04-06 01:44:03 +02:00
Nathan Rajlich
b6d6a54f80 build: target OSX 10.5 when building on darwin 2012-04-05 16:30:33 -07:00
Igor Zinkovsky
052aaa4c4d windows: use 64bit offsets for uv_fs apis 2012-04-05 16:03:11 -07:00
Bert Belder
3e8857271b Windows: installer shows license agreement dialog 2012-04-04 18:14:30 +02:00
Bert Belder
2728dcc95b Windows: add build step that generates license.rtf from LICENSE 2012-04-04 18:14:21 +02:00
Bert Belder
930fabe43f Disable V8 postmortem debugging on Windows
It is not supported by V8.
2012-04-03 03:07:47 +02:00
Ryan Dahl
30994aad30 Mac installer shows license
ref #3056
2012-04-02 16:49:03 -07:00
Ryan Dahl
55e971e33d Include text of licenses in LICENSE file
For easy inclusion in binary distributions. ref #3056
2012-04-02 16:49:03 -07:00
Ben Noordhuis
92c0c6953a build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.

Fixes #2061.
2012-04-02 23:53:05 +02:00
Ben Noordhuis
ffee873941 build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.

Fixes #2061.
2012-04-02 23:44:38 +02:00
Ryan Dahl
08109367e8 Fix links to libev and libeio licenses 2012-04-02 14:39:46 -07:00
isaacs
01d46f3a20 Fix #3052 Handle errors properly in zlib 2012-04-02 13:48:10 -07:00
Dave Pacheco
cc15299c32 build: add support for DTrace and postmortem
* fixes #2110
* includes V8 postmortem metadata in Solaris builds
* adds GYP support for DTrace probes and ustack helper
* ustack helper derives constants dynamically from libv8_base.a
* build with DTrace support by default on SunOS
2012-04-01 00:14:36 +00:00
Ben Noordhuis
7bdeed2039 zlib: fix uninitialized variable compiler warning 2012-03-31 23:50:02 +00:00
Nathan Rajlich
0965d2d9f6 js2c: fix to support files other than ones ending with 2 char extensions
Previously this was basically hard-coded for *.js files, but now we
need to include the 'config.gypi' file in there as well.
2012-04-01 01:44:54 +02:00
Ben Noordhuis
a4a04f932e node: provide snprintf implementation on windows
_snprintf() doesn't zero-terminate the buffer on overflow.
2012-04-01 01:17:25 +02:00
Ben Noordhuis
dee8c51547 node: don't check return value of unsetenv()
It returns void on some platforms, notably FreeBSD.
2012-03-31 23:23:48 +02:00
Ben Noordhuis
bc834c395b Alias _snprintf to snprintf, fix Windows build. 2012-03-31 22:37:51 +02:00
isaacs
1e577f347b website: Consistency in the industry logos 2012-03-30 18:21:50 -07:00
isaacs
2726c22f0b Revert "tty: add keypress event for backwards-compat"
In this case, backwards compatibility is not worth the API
inconsistency.  We can just document the change.

This reverts commit b521ff3b4f.
2012-03-30 17:37:35 -07:00
Ben Noordhuis
c26a0b5aab doc: fix grammar error in cluster docs 2012-03-30 22:54:13 +02:00
isaacs
90ce5b3d41 cluster: Rename 'death' back to 'exit' 2012-03-30 12:59:24 -07:00
Bert Belder
407181538b Revert "Re-add top-level v8::Locker"
The locker makes node crash in debug mode sometimes.
For example, test/simple/test-repl.js triggers it.

This reverts commit 9a6012edd9.

Conflicts:

	src/node.cc
2012-03-30 21:50:15 +02:00
Ben Noordhuis
7c02b5a58d udp_wrap: simplify AddressToJS() function 2012-03-30 21:24:02 +02:00
Ben Noordhuis
1ab95a536a udp_wrap: use new slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis
1e13a2d242 stream_wrap: use new slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis
08032efed0 core: add reusable slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis
a58659cd4a core: add ROUND_UP() macro 2012-03-30 21:24:01 +02:00
Ben Noordhuis
9d1fde7519 typed arrays: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
036d907df7 tcp: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
3005965266 stat_watcher: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
1a49df5fa9 http: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
9eacf93928 crypto: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
f86359cc3f udp: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
32b2964eed udp: remove slab allocator 2012-03-30 21:24:01 +02:00
isaacs
8d3278b962 Now working on 0.7.8 2012-03-30 11:54:39 -07:00
isaacs
69ae75c66c Merge branch 'v0.7.7-release' 2012-03-30 11:54:08 -07:00
Igor Zinkovsky
6aa7f6f732 upgrade libuv to ab8c3b85c1 2012-03-30 10:25:07 -07:00
Ben Noordhuis
17524432ff Fix Engrish in error messages. 2012-03-30 16:07:05 +02:00
Ben Noordhuis
db0a1dc7d9 node: remove unused function 2012-03-30 14:52:39 +02:00
Ben Noordhuis
8c97ad4c30 node: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis
6986d9316c crypto: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis
b82b4f2993 buffer: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis
0f0557d78d stream_wrap: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
isaacs
5cda2542fd 2012.03.30, Version 0.7.7 (unstable)
* Upgrade V8 to 3.9.24.7

* Upgrade npm to 1.1.15

* Handle Emoji characters properly (Erik Corry, Bert Belder)

* readline: migrate ansi/vt100 logic from tty to readline (Nathan Rajlich)

* readline: Fix multiline handling (Alex Kocharin)

* add a -i/--interactive flag to force the REPL (Nathan Rajlich)

* debugger: add breakOnException command (Fedor Indutny)

* cluster: kill workers when master dies (Andreas Madsen)

* cluster: add graceful disconnect support (Andreas Madsen)

* child_process: Separate 'close' event from 'exit' (Charlie McConnell)

* typed arrays: add Uint8ClampedArray (Mikael Bourges-Sevenier)

* buffer: Fix byte alignment issues (Ben Noordhuis, Erik Lundin)

* tls: fix CryptoStream.setKeepAlive() (Shigeki Ohtsu)

* Expose http parse error codes (Felix Geisendörfer)

* events: don't delete the listeners array (Ben Noordhuis, Nathan Rajlich)

* process: add process.config to view node's ./configure settings (Nathan Rajlich)

* process: process.execArgv to see node's arguments (Micheil Smith)

* process: fix process.title setter (Ben Noordhuis)

* timers: handle negative or non-numeric timeout values (Ben Noordhuis)
2012-03-29 20:20:23 -07:00
isaacs
9a70d99980 Upgrade npm to 1.1.15 2012-03-29 20:20:23 -07:00
isaacs
7abbda8ba2 Make rules for release blog post and email message 2012-03-29 16:04:48 -07:00
isaacs
6ebe9e0c1d Upgrade V8 to 3.9.24.7 2012-03-29 16:04:48 -07:00
Nathan Rajlich
304f1fcf86 tty: clarify that tty.setRawMode() has moved to process.stdin
Technically saying `tty.ReadStream#setRawMode()` is correct,
but since a typical use cannot instantiate `tty.ReadStream` themselves,
and 99% of the time the only instance is `process.stdin`,
then a little clarification seemed necessary.
2012-03-29 13:15:24 -07:00
isaacs
6aa755070a More logging in simple/test-eio-race
Travis-CI is failing on this test repeatedly, but other Linux systems
seem to be fine with it.  Alter the logging so it's more clear which
part is timing out.
2012-03-29 08:41:51 -07:00
Ben Noordhuis
11770bf5e2 test: move pummel/test-tls-fragmentation to benchmark/
Said test takes over 90 seconds on my Core 2 Duo which is too long, even for
the pummel tests.
2012-03-29 17:25:37 +02:00
Yosef Dinerstein
d7c96cf289 tls: reduce memory overhead, reuse buffer
Instead of allocating a new 64KB buffer each time when checking if there is
something to transform, continue to use the same buffer. Once the buffer is
exhausted, allocate a new buffer. This solves the problem of huge allocations
when small fragments of data are processed, but will also continue to work
well with big pieces of data.
2012-03-29 17:17:15 +02:00
Ben Noordhuis
daa6b95b08 test: move simple/test-crypto-dh to pummel/
The test is too slow / CPU intensive for the main test harness.
2012-03-29 17:12:26 +02:00
Ben Noordhuis
5e7cb68be9 test: remove simple/test-module-load-list
Said test adds little value and only serves to annoy me when moving around
modules. It was broken anyway: it passed inside the test runner and failed
when run from the command line thanks to the environment sniffing it did.
2012-03-29 17:11:37 +02:00
ssuda
44eb279ef8 zlib: don't use C++ templates
Reduces the executable's size by a few kilobytes.
2012-03-29 14:22:37 +02:00
Shigeki Ohtsu
26b6da134f doc: change stability index of tty and readline to Unstable 2012-03-28 20:13:28 -07:00
Shigeki Ohtsu
238e12af22 tty: show deprecated warn of tty.setRawMode() 2012-03-28 20:13:23 -07:00
Shigeki Ohtsu
b521ff3b4f tty: add keypress event for backwards-compat 2012-03-28 20:12:38 -07:00
isaacs
af90faf198 Patches floating on V8 2012-03-28 19:54:01 -07:00
isaacs
4b64542fe0 Upgrade V8 to 3.9.24.6 2012-03-28 19:51:38 -07:00
isaacs
8a15147bc5 Reapply "debug: Wait 50ms before running the main module"
This reapplies commit c781f17742
This reverts commit 00224771e3
2012-03-28 19:41:29 -07:00
isaacs
cda3b6ff52 Upgrade npm to 1.1.14 2012-03-28 19:36:44 -07:00
Ben Noordhuis
b031671138 tty, readline: fix style errors 2012-03-29 01:36:46 +02:00
Erik Lundin
973bbecf1a typed arrays: prevent unaligned typed array views on top of buffers 2012-03-29 01:36:45 +02:00
Ben Noordhuis
285d8c6589 buffer: align fast buffers on 8 byte boundary
Prevents alignment issues when people create a typed array from a buffer.
Unaligned loads or stores are less efficent and (on some architectures) unsafe.
2012-03-29 01:31:31 +02:00
Mikael Bourges-Sevenier
67fc1dafd0 typed arrays: add Uint8ClampedArray 2012-03-28 22:57:15 +02:00
Nathan Rajlich
48bbdde66b repl: don't write a newline on the readline 'end' event
In the case of the input stream *actually* having been closed, then we
can't write to a closed socket.

Fixes test/simple/test-repl.js
2012-03-28 08:42:40 -07:00
mstarzinger@chromium.org
eb1ff03418 v8: Fix missing initialization of mark-compact flags.
R=svenpanne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9662056

Cherry-pick of https://v8.googlecode.com/svn/branches/bleeding_edge@11006
2012-03-28 13:04:56 +02:00
Nathan Rajlich
208b230744 repl: add a 'useColors' option to the repl
This should only be minimally used, since the `terminal` value will usually be
what you are expecting. This option is specifically for the case where `terminal`
is false, but you still want colors to be output (or vice-versa).
2012-03-27 18:00:59 -07:00
Nathan Rajlich
a33d1c959a repl: add test case verifying the repl options usage 2012-03-27 17:49:10 -07:00
Nathan Rajlich
b187e96ec9 repl: add a 'writer' option to the repl
Previously this was a module-level setting, meaning that all REPL instances
had to share the same writer function. Turning it into one of the options
allows individual REPL instances to use their own writer function.
2012-03-27 17:39:14 -07:00
Nathan Rajlich
228ddddc1c repl: ensure that 'repl.ignoreUndefined' is a boolean 2012-03-27 17:35:33 -07:00
Nathan Rajlich
e7065eaa93 repl: ensure that 'repl.useGlobal' is a boolean 2012-03-27 17:34:55 -07:00
Nathan Rajlich
f41901cdf6 repl: make ^D emit an 'end' event on the readline instance
Also emit 'exit' on the repl when 'end' is emitted on the readline.

Fixes `node debug test/fixtures/breakpoints.js` when ^D is pressed.
2012-03-27 13:54:49 -07:00
Fedor Indutny
00224771e3 Revert "debug: Wait 50ms before running the main module"
This reverts commit c781f17742.
2012-03-28 01:40:45 +07:00
Fedor Indutny
5e8c2b0768 debugger: use v8 api to wait for a connection
Use v8::Debug::EnableAgent(_, _, true) to wait for incoming
debugger-client connection before emitting any break (or other) events.

This commit should fix test/simple/test-debugger-repl faults.
2012-03-28 01:37:54 +07:00
Nathan Rajlich
698e795a5f repl: fix 'terminal' mode autodetection on global repls
Fixes test/simple/test-force-repl.js
2012-03-26 19:06:58 -07:00
Nathan Rajlich
aad12d0b26 readline: migrate ansi/vt100 logic from tty to readline
The overall goal here is to make readline more interoperable with other node
Streams like say a net.Socket instance, in "terminal" mode.

See #2922 for all the details.
Closes #2922.
2012-03-26 15:21:25 -07:00
Alex Kocharin
ab518ae50e readline: fix for terminals that insert newlines automatically
Fixes #2985.
2012-03-26 09:21:55 -07:00
Shigeki Ohtsu
e7792e5d46 test: add test of tls.createServer(honorCipherOrder=true) 2012-03-26 05:03:51 -07:00
Zachary Scott
0dd8e0167d doc: document fs.createReadStream() encodings
Fixes #2700.
2012-03-26 00:25:45 +02:00
Andreas Madsen
83aae35b8e doc: fix markup in cluster docs 2012-03-26 00:20:17 +02:00
isaacs
066789a6e3 Fix #3001 website update 'latest' links on publish 2012-03-24 01:39:39 -07:00
isaacs
a7dce47854 Now working on v0.6.15 2012-03-23 11:17:08 -07:00
isaacs
dbd0e2b386 Merge branch 'v0.6.14-release' into v0.6 2012-03-23 11:16:31 -07:00
Shigeki Ohtsu
4515987058 doc: fix default dgram multicast ttl to 1 2012-03-23 17:24:10 +01:00
Shigeki Ohtsu
75face6139 doc: fix TLS cipher names 2012-03-23 17:11:13 +01:00
Shigeki Ohtsu
8727e5f2be test: add test of cleartextStream.getCipher() in tls 2012-03-23 17:09:50 +01:00
Shigeki Ohtsu
2cf5f040a5 doc: add cleartextStream.getCipher() in tls 2012-03-23 17:09:50 +01:00
isaacs
e513ffef75 2012.03.22 Version 0.6.14 (stable)
* net: don't crash when queued write fails (Igor Zinkovsky)

* sunos: fix EMFILE on process.memoryUsage() (Bryan Cantrill)

* crypto: fix compile-time error with openssl 0.9.7e (Ben Noordhuis)

* unix: ignore ECONNABORTED errors from accept() (Ben Noordhuis)

* Add UV_ENOSPC and mappings to it (Bert Belder)

* http-parser: Fix response body is not read (koichik)

* Upgrade npm to 1.1.12
  - upgrade node-gyp to 0.3.7
  - work around AV-locked directories on Windows
  - Fix isaacs/npm#2293 Don't try to 'uninstall' /
  - Exclude symbolic links from packages.
  - Fix isaacs/npm#2275 Spurious 'unresolvable cycle' error.
  - Exclude/include dot files as if they were normal files
2012-03-23 08:01:22 -07:00
isaacs
d497bf845b doc: Remove extraneous index.html's from hyperlinks 2012-03-22 17:31:23 -07:00
isaacs
76f31faa3b Remove hard-coded version number from docs 2012-03-22 17:31:15 -07:00
Igor Zinkovsky
0dcc43316f don't crash when queued write fails 2012-03-22 17:09:22 -07:00
ssuda
249c3c165a Avoiding unnecessary ToString() calls
String::Utf8Value and String::AsciiValue constructors take Handle<Value>
So no need to convert to Handle<String>
2012-03-23 01:02:59 +01:00
isaacs
d227084339 Upgrade libuv to 8409a67 2012-03-22 16:44:04 -07:00
isaacs
a7cd76bb3b Remove unused fast-list module from npm 2012-03-22 16:43:28 -07:00
isaacs
67f1778065 Upgrade npm to 1.1.12 2012-03-22 16:38:58 -07:00
Shigeki Ohtsu
e1199fa335 tls: fix CryptoStream.setKeepAlive() 2012-03-23 00:20:46 +01:00
Bryan Cantrill
d1255914df sunos: fix EMFILE on process.memoryUsage() 2012-03-22 16:18:11 -07:00
Lal Jérémy
ef046bf4f6 test: generate 1024-bit keys, pacify openssl 1.0.1 2012-03-22 23:35:22 +01:00
Ben Noordhuis
ea44d3031d crypto: fix compile-time error with openssl <= 0.9.7e 2012-03-22 15:52:12 +01:00
Nathan Rajlich
feaa8a41c7 cmd: add a -i / --interactive flag to force the REPL
This is the only way to spawn a node child process in REPL mode, and will
also be needed to be able to use the REPL in MinTTY.
2012-03-21 00:05:25 -07:00
isaacs
d2389f8fab debug repl tests: Add visibility, remove test that times out
The 'Can't backtrace now' message takes over 10 seconds to return.
That's too much time to have to wait for a test, and when it times
out, it was causing an orphaned node process.

This cleans up the node process, and also removes the test that's
timing out, so that the case is hit less often.

Todo: Make the backtrace message come back faster.
2012-03-20 19:48:07 -07:00
isaacs
c781f17742 debug: Wait 50ms before running the main module 2012-03-20 19:46:36 -07:00
isaacs
81cd3a3cd6 lint readline.js - single-quotes preferred 2012-03-20 19:42:34 -07:00
Erik Lundin
4b1d492561 test: merge typed arrays tests
Merge simple/test-typed-arrays-typenames into simple/test-typed-arrays.
2012-03-21 01:59:40 +01:00
Erik Lundin
f2ebf2469b test: fix simple/test-typed-arrays
* It incorrectly uses assert(a, b) instead of assert.equal(a, b), meaning all
  relevant assertions will pass regardless of whether they're supposed to when
  a == true.

* It makes the assumption that elements in typed arrays for numerical types
  spanning more than one byte, like Uint32Array, are stored little-endian first
  on all machines.

* It contains assorted mistakes like assert(Int32Array, typeof v4) (that one
  only passes thanks to point 1).
2012-03-21 01:59:33 +01:00
Johannes Wüller
7817f48322 fixed booleans being treated as strings, resulting in missing node-waf and npm 2012-03-20 17:46:08 -07:00
Alex Kocharin
06a058d731 readline: row-agnostic multiline readline implementation
Fixes #2959.
2012-03-20 15:37:06 -07:00
Nathan Rajlich
8517089b3e Revert "readline: add multiline support"
This reverts commit 443071db57.

Patch was overly compilicated and made some incorrect assumptions about the
position of the cursor being at the bottom of the screen. @rlidwka and I are
working on getting a proper implementation written.
2012-03-20 15:37:06 -07:00
ssuda
253ec6a63d process: don't use strdup()
file and cwd can be directly used from Utf8Value.
2012-03-20 17:59:21 +01:00
Alex Kocharin
415bff26fe repl: fix space autocompletion bug
Tapping <SP> + <TAB> would exit the REPL.
2012-03-20 12:27:59 +01:00
Felix Geisendörfer
18240193ba Expose http parse error codes
Currently http parse errors do not expose the error details available
from http_parser. This patch exposes the error code as `err.code`.
2012-03-19 19:00:16 -07:00
Shigeki Ohtsu
891f9defeb No need to have NativeModule.require('fs') in Module._findPath() 2012-03-19 18:58:58 -07:00
isaacs
dce8682827 cluster: English language fixing 2012-03-19 14:28:39 -07:00
Andreas Madsen
94d337eb0f cluster: kill workers when master dies
This patch will kill the worker once it has lost its connection with the parent.
However if the worker are doing a suicide, other measures will be used.
2012-03-19 14:22:36 -07:00
Andreas Madsen
d927fbc9ab cluster: add graceful disconnect support
This patch add a worker.disconnect() method there will stop the worker from accepting
new connections and then stop the IPC. This allow the worker to die graceful.
When the IPC has been disconnected a 'disconnect' event will emit.

The patch also add a cluster.disconnect() method, this will call worker.disconnect() on
all connected workers. When the workers are disconneted it will then close all server
handlers. This allow the cluster itself to self terminate in a graceful way.
2012-03-19 13:29:01 -07:00
Andreas Madsen
ab32e9e043 child_process: emit 'channel closed' error instead of throwing 2012-03-19 11:55:41 -07:00
isaacs
89653cb32f Upgrade npm to 1.1.10 2012-03-19 09:59:57 -07:00
Fedor Indutny
7418905aef debugger: breakOnException
Do not break automatically on exception, fixes #2926
2012-03-19 22:21:29 +06:00
Fedor Indutny
b6cb6ce0d3 debugger: remove 'repl' command from builtinLibs
* It was displaying useless warning
2012-03-19 22:21:28 +06:00
Fedor Indutny
f61d4b7a87 debugger: exit process on repl exit
* When entering repl - clone 'SIGINT' listeners array (instead of using
existing), as it will be spliced in .removeAllListeners() call later.
2012-03-19 22:21:28 +06:00
Ben Noordhuis
d8c4ecea0b test: fix race in simple/test-cluster-master-error
Said test checks that the workers shut down when the master errors but it failed
intermittently. Insert a small delay before doing the 'is dead?' check to give
the workers a chance to shut down.
2012-03-19 17:12:52 +01:00
Your Name
fb47a337ba test: changed instances of == to === 2012-03-19 14:24:46 +01:00
Nathan Rajlich
70e68893fe build: make --openssl-use-sys a boolean option
Before you had to enter a truthy value like: --openssl-use-sys=1
2012-03-17 12:57:24 -07:00
isaacs
815169383e Fix include logic was replacing https include with http 2012-03-17 11:11:07 -07:00
isaacs
7bee98bae2 Ignore 'making a build' artifacts 2012-03-17 11:11:03 -07:00
isaacs
851b3970e7 Fix include logic was replacing https include with http 2012-03-17 11:07:35 -07:00
isaacs
d980620010 Ignore 'making a build' artifacts 2012-03-17 11:07:35 -07:00
koichik
03077db45d test: HTTP responses with no content-length
Refs: #2952.
2012-03-18 00:50:47 +09:00
Ben Noordhuis
44527e6023 deps: upgrade http_parser to joyent/http-parser@b47c44d 2012-03-17 16:22:39 +01:00
Alex Xu
5abcdc9671 build: fix configure with spaces in CC 2012-03-16 16:01:53 -07:00
isaacs
76a771b749 doc: Remove extraneous index.html's from hyperlinks 2012-03-16 08:19:26 -07:00
isaacs
46376888cd Remove hard-coded version number from docs 2012-03-16 08:13:41 -07:00
isaacs
ec735cbce0 Merge remote-tracking branch 'ry/v0.6' into merge-v0.6
Conflicts:
	ChangeLog
	deps/npm/AUTHORS
	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/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/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/list.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/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/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/node-gyp/README.md
	deps/npm/node_modules/node-gyp/lib/build.js
	deps/npm/node_modules/node-gyp/lib/configure.js
	deps/npm/node_modules/node-gyp/lib/install.js
	deps/npm/node_modules/node-gyp/lib/node-gyp.js
	deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
	deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
	deps/npm/node_modules/node-gyp/node_modules/glob/package.json
	deps/npm/node_modules/node-gyp/package.json
	deps/npm/package.json
	doc/about/index.html
	doc/api/path.markdown
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	src/node_version.h
2012-03-16 08:06:54 -07:00
Shigeki Ohtsu
534264d209 doc: Add condition to emit close event of net.Server 2012-03-16 16:01:18 +01:00
Rod Vagg
90b785c09a doc: fix # links from (and within) api/fs 2012-03-16 15:51:33 +01:00
Rod Vagg
6628a3b6ea doc: fix # links from (and within) api/fs 2012-03-16 15:42:26 +01:00
isaacs
0fb4fb4797 Document ChildProcess exit/close event difference 2012-03-15 17:23:39 -07:00
Nathan Rajlich
7cb0f5f84a install: update install.js to use process.config
Now that the node_prefix is available from within node, we can use it :)
2012-03-15 17:15:49 -07:00
Nathan Rajlich
11d8823791 process: add process.config
This is the JS representation of the `config.gypi` file that was used when
compiling node. With this information, you can tell whether the current node
binary has shared or static dependencies, or any other configuration options
that may have been used.
2012-03-15 17:15:18 -07:00
Nathan Rajlich
95fd517431 node.gyp: include the config.gypi file in the js2c inputs list 2012-03-15 17:12:45 -07:00
Nathan Rajlich
bea2e15864 js2c: fix to support files other than ones ending with 2 char extensions
Previously this was basically hard-coded for *.js files, but now we
need to include the 'config.gypi' file in there as well.
2012-03-15 17:12:37 -07:00
Charlie McConnell
c7b8073afc child_process: Separate 'close' event from 'exit'
Currently, a child process does not emit the 'exit' event until 'close' events
have been received on all three of the child's stdio streams.  This change makes
the child object emit 'exit' when the child exits, and a new 'close' event when
all stdio streams are closed.
2012-03-15 17:07:11 -07:00
Nathan Rajlich
928ea564d1 events: don't delete the listeners array in removeListener() 2012-03-15 17:01:29 -07:00
Ben Noordhuis
761a82bc9a test: make .removeAllListeners() test more exhaustive
Also test removal of multiple listeners, it's a separate code path.
2012-03-16 00:25:42 +01:00
Ben Noordhuis
78dc13fbf9 events: don't delete the listeners array
The documentation implies that .removeAllListeners() leaves the listeners array
untouched. Make it so.
2012-03-16 00:20:10 +01:00
Ben Noordhuis
f9aa01de32 test: don't let debugger listen on common.PORT
simple/test-debugger-repl has a tendency to fail and leave behind a stray
process that listens on common.PORT, making later tests fail with EADDRINUSE.
2012-03-16 00:20:10 +01:00
Nathan Rajlich
dc752327bb vcbuild: run the 'configure' script in vcbuild.bat
So that a 'config.gypi' file gets generated, which is
required for the `process.config` object (see #2928).
2012-03-15 16:12:19 -07:00
Ben Noordhuis
1a97998644 process: fix process.title setter
Commit 19fd530 broke the argv initialization logic that's used on linux and
freebsd to update the process name (as displayed in tools like `top`).

Fixes test/simple/test-setproctitle.js.
2012-03-15 23:10:32 +01:00
isaacs
702b46c80d Fix invalid timer test
Previously, setTimeout(fn, 0) would create a new Timer() object,
which has a close() method (and is a bit slower).  The recent
change to more closely emulate browser setTimeout behavior dodges
this path, so this assertion is no longer valid.
2012-03-15 14:53:17 -07:00
Ben Noordhuis
7fc835afe3 timers: handle negative or non-numeric timeout values
Follows browser behaviour by scheduling the callback on the next tick.

Fixes #593.
2012-03-15 13:56:30 -07:00
Maciej Małecki
9a35656210 test: test if forks are spawned with parent's process.execArgv 2012-03-15 13:48:06 -07:00
Maciej Małecki
0113f5a72d test: test process.execArgv 2012-03-15 13:48:05 -07:00
Micheil Smith
19fd5301bf Expose original argv as process.execArgv for cluster and child_process.fork() 2012-03-15 13:47:43 -07:00
Matt Ezell
96e3be3aa3 Added trailing backslash to npm path
Fix #2377: $PATH issues reported for MSI installer
2012-03-15 13:28:01 -07:00
isaacs
b9bd2d3eb9 Now working on v0.6.14 2012-03-15 10:33:33 -07:00
isaacs
9726a259bf Merge branch 'v0.6.13-release' into v0.6 2012-03-15 10:32:58 -07:00
isaacs
9f7f86b534 2012.03.15 Version 0.6.13 (stable)
* Windows: Many libuv test fixes (Bert Belder)

* Windows: avoid uv_guess_handle crash in when fd < 0 (Bert Belder)

* Map EBUSY and ENOTEMPTY errors (Bert Belder)

* Windows: include syscall in fs errors (Bert Belder)

* Fix fs.watch ENOSYS on Linux kernel version mismatch (Ben Noordhuis)

* Update npm to 1.1.9
  - upgrade node-gyp to 0.3.5 (Nathan Rajlich)
  - Fix isaacs/npm#2249 Add cache-max and cache-min configs
  - Properly redirect across https/http registry requests
  - log config usage if undefined key in set function (Kris Windham)
  - Add support for os/cpu fields in package.json (Adam Blackburn)
  - Automatically node-gyp packages containing a binding.gyp
  - Fix failures unpacking in UNC shares
  - Never create un-listable directories
  - Handle cases where an optionalDependency fails to build
2012-03-15 08:45:35 -07:00
isaacs
06bf0707f7 makefile: Fix 'make doc' 2012-03-15 08:22:36 -07:00
isaacs
571a51989e Upgrade libuv to 66a959c4052 2012-03-15 08:18:37 -07:00
isaacs
f631c1d73b Update npm to 1.1.9 2012-03-14 16:44:36 -07:00
isaacs
ad5a108dfd Update uv to 5d21056 2012-03-14 16:44:36 -07:00
Artur Adib
c834ef409e Doc highlight fix 2012-03-14 16:44:36 -07:00
Rod Vagg
c12a1dc5d8 path.exists*() as 2nd level head not 3rd 2012-03-14 16:20:40 -07:00
Shigeki Ohtsu
d2fba2bf35 test: Fix path to require hello-world module 2012-03-14 11:00:52 -07:00
Nathan Rajlich
35043ad8ac process: use NODE_STRINGIFY macro to set process.versions.uv 2012-03-14 01:40:29 +01:00
isaacs
bda08bfa04 Now working on 0.7.7 2012-03-13 14:03:51 -07:00
isaacs
73c874698b Merge branch 'v0.7.6-release' 2012-03-13 14:03:07 -07:00
isaacs
f06abda6f5 2012.03.13, Version 0.7.6 (unstable)
* Upgrade v8 to 3.9.17

* Upgrade npm to 1.1.8
  - Add support for os/cpu fields in package.json (Adam Blackburn)
  - Automatically node-gyp packages containing a binding.gyp
  - Fix failures unpacking in UNC shares
  - Never create un-listable directories
  - Handle cases where an optionalDependency fails to build

* events: newListener emit correct fn when using 'once' (Roly Fentanes)

* url: Ignore empty port component (Łukasz Walukiewicz)

* module: replace 'children' array (isaacs)

* tls: parse multiple values of a key in ssl certificate (Sambasiva Suda)

* cluster: support passing of named pipes (Ben Noordhuis)

* Windows: include syscall in fs errors (Bert Belder)

* http: #2888 Emit end event only once (Igor Zinkovsky)

* readline: add multiline support (Rlidwka)

* process: add `process.hrtime()` (Nathan Rajlich)

* net, http, https: add localAddress option (Dmitry Nizovtsev)

* addon improvements (Nathan Rajlich)

* build improvements (Ben Noordhuis, Sadique Ali, T.C. Hollingsworth, Nathan Rajlich)

* add support for "SEARCH" request methods (Nathan Rajlich)

* expose the zlib and http_parser version in process.versions (Nathan Rajlich)
2012-03-13 13:02:38 -07:00
isaacs
10dc129a4b Update npm to 1.1.8 2012-03-13 13:02:02 -07:00
Nathan Rajlich
884a209ccf docs: document the repl "exit" event 2012-03-13 19:58:54 +01:00
Nathan Rajlich
f9da776b33 process: listen for the "exit" even on the main repl 2012-03-13 19:58:53 +01:00
Nathan Rajlich
f214758dd1 repl: better SIGINT handling behavior
Before:

☮ ~ (master)  node
> asdf
(^C again to quit)
> sdcasd☮ ~ (master) 

Now:

☮ ~/node (repl)  ./node
> asfs
> sda
>
(^C again to quit)
> scdsdc
> sdcsdc
>
(^C again to quit)
> sdc
>
(^C again to quit)
>
☮ ~/node (repl) 

^ note that each new line above is a ctrl+c sequence
2012-03-13 19:58:52 +01:00
Nathan Rajlich
6b5a34cdf3 repl: remove redundant check of rli.rine.length
It get's set to '' 1 line above, so we know that that's always 0.
2012-03-13 19:58:52 +01:00
Nathan Rajlich
b7ddd30181 repl: make sure the REPL always flushes with a newline 2012-03-13 19:58:51 +01:00
Nathan Rajlich
659d449460 repl: make REPLServer emit an "exit" event
This can happen when "SIGINT" is processed by the readline interface,
or when the user types ".exit" into the REPL.
2012-03-13 19:58:50 +01:00
Nathan Rajlich
4f63f9f327 repl: make REPLServer inherit from EventEmitter
This is because it should emit an "exit" event when "SIGINT" is received
from the readline interface, or when ".exit" is typed by the user.
2012-03-13 19:58:50 +01:00
Nathan Rajlich
109b16d488 repl: use path.resolve() for the module.filename
Windows was seeing: "C:\\path\\to\\cwd/repl"
2012-03-13 19:58:49 +01:00
isaacs
8b79a31333 shebang should make file executable as well 2012-03-13 10:00:59 -07:00
Trent Mick
1cdadb1e3b issue #2697: have 'make install' set npm shebang to use its node 2012-03-13 09:35:42 -07:00
Artur Adib
1cecfee634 Doc highlight fix 2012-03-13 09:30:32 -07:00
isaacs
943c396b86 Fix merge conflict in doc/api/readline.markdown 2012-03-13 09:16:48 -07:00
Christian Ress
c15e6905c4 Added destroy method to Zlib object in zlib.js module 2012-03-13 08:24:09 -07:00
isaacs
4e85257c6e Patches floating on V8 2012-03-12 21:50:31 -07:00
isaacs
e4fc2cbfd3 Upgrade v8 to 3.9.17 2012-03-12 21:46:36 -07:00
isaacs
bcb0cc0b18 Upgrade npm to 1.1.6
* Fix #472 Adds support for os/cpu fields in package.json (Adam Blackburn)
* Don't use existing pkg if explicit
* Install missing deps, even if they are in bundleDependencies
* bundle node-gyp
* Automatically node-gyp build stuff with a bindings.gyp
* Fix #2230 Unpack in place. No folder renaming malarky
* Never create un-listable directories
* Fix cases where an optionalDependency fails to build
* Always ignore .wafpickle-7 files
* fix shrinkwrap test
* Fix: bundleDependencies being re-installed unnecessarily
2012-03-12 21:34:07 -07:00
Nathan Rajlich
9701f1c4b2 process: expose the zlib version in use in process.versions 2012-03-12 23:29:20 +01:00
Ben Noordhuis
531eba18a6 zlib: fix include of zlib.h
Including <zlib.h> may lead to false positives when the user specifies a bad
path in `./configure --shared-zlib --shared-zlib-includes=/path/to/zlib`. If
a zlib.h exists somewhere on the system include path (common on UNIX systems),
the compiler will include that instead, possibly leading to header mismatch
errors that are hard to debug.
2012-03-12 23:22:48 +01:00
Łukasz Walukiewicz
677c2c112c Ignore an empty port component when parsing URLs. 2012-03-12 12:46:56 -07:00
isaacs
a10cfba766 module: remove 'exited', replace 'children' array 2012-03-12 10:27:11 -07:00
Yoshihiro Kikuchi
c450ac343f docs: fix using legacy api in the buffer doc 2012-03-12 15:04:53 +01:00
Nao Iizuka
f8ce384446 docs: correct the description of assert.ok() 2012-03-12 02:27:55 +01:00
Ben Noordhuis
4472f7bbc3 http: use HTTP_METHOD_MAP macro 2012-03-12 02:23:34 +01:00
Ben Noordhuis
79cbe1fdbb deps: upgrade http_parser to 8bec3ea 2012-03-12 02:20:52 +01:00
Ben Noordhuis
407ecc6b5f docs: console.dir() prints to stdout, not stderr 2012-03-12 01:37:34 +01:00
ssuda
9b672bcaa2 tls: parsing multiple values of a key in ssl certificate
Fixes #2864.
2012-03-10 23:43:16 +09:00
Nathan Rajlich
36761b2055 process: expose the http_parser version in process.versions 2012-03-10 00:22:42 +01:00
Ben Noordhuis
ff4a9d381d core: use proper #include directives 2012-03-10 00:14:14 +01:00
Ben Noordhuis
8c02f9b7c8 buffer: throw from constructor if length > kMaxLength
Throw, don't abort. `new Buffer(0x3fffffff + 1)` used to bring down the process
with the following error message:

  FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() length
  exceeds max acceptable value

Fixes #2280.
2012-03-09 23:57:03 +01:00
Ben Noordhuis
2589d55611 core: add ThrowError(), ThrowTypeError(), ThrowRangeError() 2012-03-09 23:31:03 +01:00
Ben Noordhuis
296b7a580b cluster: support passing of named pipes
Fixes triggered assertion:

  Assertion failed: (0 && "bad address family"), function GetPeerName,
  file ../src/tcp_wrap.cc, line 237.

Fixes #2870.
2012-03-09 09:42:13 -08:00
Ben Noordhuis
9d72a742e3 uv: upgrade 8c78cb4 2012-03-09 09:42:12 -08:00
Igor Zinkovsky
0c68604823 add jslint to vcbuild.bat 2012-03-08 11:39:39 -08:00
Bert Belder
31ad1d29c7 Merge branch 'v0.6' 2012-03-08 03:14:48 +01:00
Bert Belder
3733a85d8d Windows: include syscall in fs errors 2012-03-08 02:57:44 +01:00
Bert Belder
daaccc7cb7 uv: upgrade to 1ac71a31 2012-03-08 02:57:37 +01:00
Igor Zinkovsky
5ad0140f48 Emit end event only once
fixes #2888

Previously a pair of end events would be emitted if a response was
paused/resumed, and the underlying socket was closed while the
response was paused
2012-03-07 13:37:39 -08:00
Yoshihiro Kikuchi
f82ef0f7c3 http: remove ClientRequest.prototype.pause()
ClientRequest.prototype.pause() is not needed. ClientRequest is a writable
stream and deferring to OutgoingMessage.prototype.pause() is broken, the method
does not exist.
2012-03-07 20:17:36 +01:00
Shea Levy
024451c65c fork: don't clear environment by default
- Set options.env to process.env instead of {} by default.
- Shallow clone the passed options.env in case the user passed process.env directly.
2012-03-07 17:25:59 +01:00
Colton Baker
c84b3c4b73 readline: ignore stray escape sequence
Fixes #2876.
2012-03-07 15:05:34 +01:00
Bert Belder
408f450286 client latency benchmark: don't require('request') 2012-03-07 04:52:29 +01:00
isaacs
150053b3fa Typo in http_server_lag.js script
Thanks, @mscdex
2012-03-06 19:31:16 -08:00
isaacs
fb53986a80 Bash script for running http-simple benchmarks 2012-03-06 18:19:17 -08:00
isaacs
17da4242b0 A server with configurable lag for testing 2012-03-06 18:19:17 -08:00
isaacs
d5fca08da4 A benchmark script for measuring client latency 2012-03-06 18:19:17 -08:00
ssuda
b72d43cbf9 dgram: fix when we call .close() inside 'listening' 2012-03-06 22:20:23 +01:00
Ming Liu
b6023905ff docs: correct repl eval callback signature 2012-03-06 20:46:27 +01:00
Nathan Rajlich
07c886f944 process: add process.hrtime()
This commit adds a high-resolution timer function.
2012-03-06 20:43:55 +01:00
Ben Noordhuis
544e5ee1fb bench: add http_simple_auto benchmark
Starts a server and benchmarks it with ab.
2012-03-06 18:11:53 +01:00
Rlidwka
443071db57 readline: add multiline support 2012-03-06 13:37:42 +01:00
Dmitry Nizovtsev
1e9bcf26ce net, http, https: add localAddress option
Binds to a local address before making the outgoing connection.
2012-03-06 13:35:49 +01:00
Igor Zinkovsky
9ea5a4c468 fix simple/test-process-argv-0 on windows 2012-03-05 16:51:04 -08:00
Shigeki Ohtsu
59c3923672 process: show detailed error message in process.dlopen() 2012-03-06 01:34:39 +01:00
Nathan Rajlich
39ce94276a addon: use absolute paths for the node include dirs
This fixes running gyp_addon from across filesystems on Windows.

This is essentially a gyp bug where it's not relativizing properly
across filesystems. See TooTallNate/node-gyp#15 for the gory details.
2012-03-05 22:53:16 +01:00
Nathan Rajlich
1520c7bf5b addon: add module_root_dir gyp variable
For native modules to use in their gyp files.

It gives the absolute path to the root of the module directory, i.e. where your
main binding.gyp file is located.

This seems helpful for some modules where the build system is more advanced and
using absolute paths is a requirement.
2012-03-05 22:39:12 +01:00
Igor Zinkovsky
e10bd5177f disable simple/test-signal-handler on Windows 2012-03-05 13:20:13 -08:00
isaacs
33f9074a62 Mention marked, and add license to doc generator 2012-03-05 10:59:14 -08:00
isaacs
8258bd467a doc: 'filename' arg not guaranteed ever. 2012-03-05 10:28:47 -08:00
Ben Noordhuis
5ebc05f560 build: disable -fvisibility=hidden if gcc < 4.0.0 2012-03-05 17:03:27 +01:00
Ben Noordhuis
5062741bd7 build: make CC command in -fstrict-aliasing check configurable 2012-03-05 17:03:15 +01:00
Sadique Ali
707863c1fb build: make CC command in host check configurable 2012-03-05 16:56:52 +01:00
Ben Noordhuis
c97b4f1971 build: remove unnecessary link flags from node.gyp 2012-03-05 16:41:51 +01:00
Ben Noordhuis
e0796b6f1f uv: upgrade to a93dc7e 2012-03-05 15:38:43 +01:00
isaacs
959a19e118 lint 2012-03-03 23:48:57 -08:00
isaacs
1d5b6f26fe Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	Makefile
	deps/npm/AUTHORS
	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/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/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/list.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/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/lib/install.js
	deps/npm/lib/ls.js
	deps/npm/man/man1/npm.1
	deps/npm/man/man1/shrinkwrap.1
	deps/npm/man/man3/npm.3
	deps/npm/man/man3/shrinkwrap.3
	deps/npm/node_modules/request/main.js
	deps/npm/node_modules/request/package.json
	deps/npm/package.json
	deps/uv/src/unix/core.c
	deps/v8/src/conversions-inl.h
	deps/v8/src/elements.cc
	deps/v8/src/version.cc
	doc/about/index.html
	doc/api/assert.markdown
	doc/api/child_process.markdown
	doc/api/cluster.markdown
	doc/api/crypto.markdown
	doc/api/debugger.markdown
	doc/api/dgram.markdown
	doc/api/dns.markdown
	doc/api/documentation.markdown
	doc/api/events.markdown
	doc/api/fs.markdown
	doc/api/globals.markdown
	doc/api/http.markdown
	doc/api/https.markdown
	doc/api/modules.markdown
	doc/api/net.markdown
	doc/api/os.markdown
	doc/api/path.markdown
	doc/api/process.markdown
	doc/api/querystring.markdown
	doc/api/readline.markdown
	doc/api/stdio.markdown
	doc/api/stream.markdown
	doc/api/timers.markdown
	doc/api/tls.markdown
	doc/api/tty.markdown
	doc/api/url.markdown
	doc/api/util.markdown
	doc/api/vm.markdown
	doc/api/zlib.markdown
	doc/api_assets/style.css
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	src/node_version.h
	tools/doc/html.js
	tools/gyp/test/mac/app-bundle/empty.c
2012-03-03 23:38:52 -08:00
isaacs
5ca5ec33cc doc: css consistency on anchor links 2012-03-03 22:58:47 -08:00
isaacs
f1742c93d7 doc: Don't prune Stability indicators 2012-03-03 22:58:29 -08:00
isaacs
a42b4ad44e doc: Typo'd some stability indicators. 2012-03-03 22:12:43 -08:00
isaacs
1d59a73fef doc: Change 'file_system' module to 'fs' as it should be 2012-03-03 17:14:06 -08:00
isaacs
cf6e4d82e7 Use shorter url for /docs/latest/api 2012-03-03 17:08:46 -08:00
isaacs
2e487379ad doc: Stability and Caveats for fs.watch/watchFile 2012-03-03 17:04:02 -08:00
isaacs
f70be203e4 doc: indentation and structure in fs.markdown 2012-03-03 17:04:02 -08:00
isaacs
c368e46e7f doc: Document JSON docs 2012-03-03 17:03:59 -08:00
isaacs
3dfa98c991 doc: Add link to JSON version of doc 2012-03-03 17:03:56 -08:00
isaacs
2d44dcc8be doc: Add stability indicators to documentation 2012-03-03 17:03:52 -08:00
isaacs
4053c01b53 First arg to fs.fchown is an int, not a string
Bug introduced by 26bfb6bea4

Fix isaacs/npm#2225
2012-03-03 14:40:29 -08:00
Igor Zinkovsky
61be6844aa disable fs.watchFile tests on windows 2012-03-03 14:35:21 -08:00
ssuda
578ba76e6c util: fix util.format() formatting of %% 2012-03-03 18:22:34 +01:00
Shigeki Ohtsu
d6f0ecc622 build: fix gcc version check 2012-03-03 18:07:39 +01:00
Shigeki Ohtsu
b6595c4d60 build: remove unused import from configure script 2012-03-03 18:07:22 +01:00
Jimb Esser
78db18739a tls: proxy set(Timeout|NoDelay|KeepAlive) methods
- fix crash calling ClientRequest::setKeepAlive if the underlying request is
  HTTPS.
- fix discarding of callback parameter when calling ClientRequest::setTimeout on
  HTTPS requests.
- fix discarding of noDelay parameter when calling ClientRequest::setNoDelay on
  HTTPS requests.
2012-03-03 00:28:43 +01:00
isaacs
2f256af412 Now working on v0.6.13 2012-03-02 13:09:09 -08:00
isaacs
353bfbaf93 Merge branch 'v0.6.12-release' into v0.6 2012-03-02 13:09:00 -08:00
isaacs
48a2d34cfe 2012.03.02 Version 0.6.12 (stable)
* Upgrade V8 to 3.6.6.24

* dtrace ustack helper improvements (Dave Pacheco)

* API Documentation refactor (isaacs)

* #2827 net: fix race write() before and after connect() (koichik)

* #2554 #2567 throw if fs args for 'start' or 'end' are strings (AJ ONeal)

* punycode: Update to v1.0.0 (Mathias Bynens)

* Make a fat binary for the OS X pkg (isaacs)

* Fix hang on accessing process.stdin (isaacs)

* repl: make tab completion work on non-objects (Nathan Rajlich)

* Fix fs.watch on OS X (Ben Noordhuis)

* Fix #2515 nested setTimeouts cause premature process exit (Ben Noordhuis)

* windows: fix time conversion in stat (Igor Zinkovsky)

* windows: fs: handle EOF in read (Brandon Philips)

* windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky)

* Upgrade npm to 1.1.4 (isaacs)
  - windows fixes
  - Bundle nested bundleDependencies properly
  - install: support --save with url install targets
  - shrinkwrap: behave properly with url-installed modules
  - support installing uncompressed tars or single file modules from urls etc.
  - don't run make clean on rebuild
  - support HTTPS-over-HTTP proxy tunneling
2012-03-02 12:36:45 -08:00
isaacs
ef5b0f4c8e css: Fix fonts on api index page navigation 2012-03-02 12:36:45 -08:00
Dave Pacheco
b47ba2c431 disable omit-frame-pointer on solaris systems 2012-03-02 11:26:06 -08:00
isaacs
2d6a076ab3 Patches floating on v8 2012-03-02 11:26:05 -08:00
isaacs
c0c4e008aa Upgrade V8 to 3.6.6.24 2012-03-02 11:26:05 -08:00
isaacs
1bf3a14353 Upgrade npm to 1.1.4 (minor bugfix) 2012-03-02 09:48:25 -08:00
isaacs
054127112c Upgrade npm to 1.1.3
* Update request to support HTTPS-over-HTTP proxy tunneling
* Throw on undefined envs in config settings
* Update which to 1.0.5
* Fix windows UNC busyloop in findPrefix
* Bundle nested bundleDependencies properly
* Alias adduser to add-user
* Doc updates  (Christian Howe, Henrik Hodne, Andrew Lunny)
* ignore logfd/outfd streams in makeEnv() (Rod Vagg)
* shrinkwrap: Behave properly with url-installed deps
* install: Support --save with url install targets
* Support installing naked tars or single-file modules from urls etc.
* init: Don't add engines section
* Don't run make clean on rebuild
* Added missing unicode replacement (atomizer)
2012-03-02 09:31:46 -08:00
Dave Pacheco
edea94c332 dtrace ustack helper improvements
Fixes #2852
2012-03-02 09:29:18 -08:00
Ben Noordhuis
30b29d8f87 build: disable -fstrict-aliasing if gcc < 4.6.0
A compiler bug in older versions of gcc makes it do unsafe optimizations at -O1
and higher. This manifested itself with (at least) gcc 4.5.2 on SmartOS because
it made V8 hang in a busy loop.

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
2012-03-02 09:26:35 -08:00
isaacs
d8c5ba2185 Change test fixture from symlink to regular file
The only test using this is test/simple/test-fs-chmod.js, and it was
treating a.js and a1.js as two separate files, resulting in a race
condition.  (Interestingly enough, it was *not* using the symlink file to
test lchmod, which uses a different temp file.)
2012-03-02 09:17:09 -08:00
Ben Noordhuis
0613af0a20 build: remove --shared-cares configure switch
c-ares is a) bundled with libuv now, and b) contains out-of-tree patches. It no
longer makes sense to link against a shared library.

Fixes #2117.
2012-03-02 16:24:37 +01:00
Igor Zinkovsky
5e803219d8 update libuv to 702f905f73 2012-03-01 14:40:04 -08:00
Igor Zinkovsky
9be20afeb5 update libuv to 6bbccf1fe0 2012-03-01 14:12:19 -08:00
Igor Zinkovsky
67b10f816c fix test-net-pipe-connect-errors for windows 2012-03-01 14:09:10 -08:00
Ben Noordhuis
3aa2fd3b2c uv: upgrade to b3fe183 2012-03-01 17:02:20 +01:00
Vincent Ollivier
8cdbf014bd test: fix typo in test-child-process-stdout-flush 2012-03-01 16:52:46 +01:00
isaacs
a63ce6ea94 Merge branch 'json-api-v0.6' into v0.6 2012-02-29 16:05:18 -08:00
isaacs
4ca3fd0a01 Handle miscs better 2012-02-29 16:04:56 -08:00
isaacs
86d077da00 Debugger should be a misc, not 'concept' 2012-02-29 16:04:55 -08:00
isaacs
17db291b5c 'Events' is a module, not an event named 's' 2012-02-29 16:04:55 -08:00
isaacs
7bfa5cf284 s/streams/stream/ 2012-02-29 16:04:55 -08:00
isaacs
674416fbc9 s/buffers/buffer/ 2012-02-29 16:04:55 -08:00
isaacs
b34feeeb86 doc refactor: zlib 2012-02-29 16:04:55 -08:00
isaacs
169b0820f0 doc refactor: vm 2012-02-29 16:04:55 -08:00
isaacs
3c195d04f3 doc refactor: util 2012-02-29 16:04:54 -08:00
isaacs
c417de409d doc refactor: url 2012-02-29 16:04:54 -08:00
isaacs
c2f6405a0f doc refactor: tty 2012-02-29 16:04:54 -08:00
isaacs
c0446edcc2 doc refactor: tls 2012-02-29 16:04:54 -08:00
isaacs
4ed05da2be doc refactor: timers 2012-02-29 16:04:54 -08:00
isaacs
8d1e5d3ae1 doc refactor: synopsis 2012-02-29 16:04:54 -08:00
isaacs
774c289ba8 doc refactor: streams 2012-02-29 16:04:53 -08:00
isaacs
8e22004cb5 doc refactor: stdio 2012-02-29 16:04:53 -08:00
isaacs
d39297251f doc refactor: repl 2012-02-29 16:04:53 -08:00
isaacs
3b6c1d74c7 doc refactor: readline 2012-02-29 16:04:53 -08:00
isaacs
798f8a0dc1 doc refactor: querystring 2012-02-29 16:04:53 -08:00
isaacs
e083720d54 doc refactor: process 2012-02-29 16:04:53 -08:00
isaacs
3ce782b7f2 doc refactor: path 2012-02-29 16:04:52 -08:00
isaacs
8a121fa0e7 doc refactor: os 2012-02-29 16:04:52 -08:00
isaacs
e8ad5b9c1c doc refactor: net 2012-02-29 16:04:52 -08:00
isaacs
e88a1ba74a doc refactor: modules 2012-02-29 16:04:52 -08:00
isaacs
c205d3b53a doc refactor: https 2012-02-29 16:04:52 -08:00
isaacs
4f24b20fcb doc refactor: http 2012-02-29 16:04:52 -08:00
isaacs
a62ec4437b doc refactor: globals 2012-02-29 16:04:51 -08:00
isaacs
2a6ff3f56b doc refactor: fs 2012-02-29 16:04:51 -08:00
isaacs
14d4fbb002 doc refactor: events 2012-02-29 16:04:51 -08:00
isaacs
cacb28c92c doc refactor: dns 2012-02-29 16:04:51 -08:00
isaacs
db8c55e77c doc refactor: dgram 2012-02-29 16:04:51 -08:00
isaacs
f775c5cea4 doc refactor: debugger 2012-02-29 16:04:50 -08:00
isaacs
032b877f31 doc refactor: crypto 2012-02-29 16:04:50 -08:00
isaacs
6738d82e38 doc refactor: cluster 2012-02-29 15:24:27 -08:00
isaacs
03d6aa07ea doc refactor: buffers 2012-02-29 15:23:04 -08:00
isaacs
d383954ffe doc refactor: assert 2012-02-29 15:23:00 -08:00
isaacs
5d4e3d2d0c doc refactor: appendix_1 2012-02-29 15:22:56 -08:00
isaacs
df5be65415 doc refactor: addons 2012-02-29 15:22:53 -08:00
isaacs
d71f9944cc Add 'about these docs' section 2012-02-29 15:22:48 -08:00
isaacs
f28d482cd4 s/child_processes/child_process/
Conflicts:

	doc/api/child_process.markdown
2012-02-29 15:20:53 -08:00
isaacs
5824881e4a Remove empty sections 2012-02-29 15:20:13 -08:00
isaacs
1a181315eb Increase contrast of links, decrease contrast of bullets 2012-02-29 15:20:06 -08:00
isaacs
63629614cb Update styles to reflect changed api doc html structure 2012-02-29 15:19:59 -08:00
isaacs
8cd13eb74e Update template to use new token style
Conflicts:

	doc/template.html
2012-02-29 15:19:47 -08:00
isaacs
ffcdcc7ff0 Use new doc generation tool
Conflicts:

	Makefile
2012-02-29 15:18:51 -08:00
isaacs
4051c2843b docs: Move images out of the dist tarball
This puts all images in doc/images/ and references them via
http://nodejs.org/images/.

Any complaints about copyright usage etc. can thus be node/joyent's
problem, rather than the problem of a downstream distribution channel.

Conflicts:

	Makefile
2012-02-29 15:17:55 -08:00
isaacs
217bb47b02 New documentation generation tool 2012-02-29 15:15:25 -08:00
Ben Noordhuis
bab59f33e7 uv: upgrade to 0459097 2012-02-29 16:16:13 +01:00
Ben Noordhuis
ebb79cdaba Revert "test-fs-watch: Add faster failure, and link to #2813"
This reverts commit 9a6f936c8a.
2012-02-29 14:26:04 +01:00
Blake Miner
7343f8e776 tls: add honorCipherOrder option to tls.createServer()
Documented how to mitigate BEAST attacks.
2012-02-29 02:16:08 +01:00
Joshua Holbrook
56cfcea4b4 child_process: remove dummy "setsid" option setting 2012-02-29 02:10:56 +01:00
Joshua Holbrook
4065b241e8 child_process: remove dummy "setsid" option setting 2012-02-29 02:06:20 +01:00
Ben Noordhuis
af7960b295 uv: upgrade to 2f886c8 2012-02-28 18:11:48 +01:00
Shigeki Ohtsu
18acdff8d3 build: fix the help output of vcbuild.bat 2012-02-28 17:27:52 +01:00
koichik
cd5d2473a4 net: fix race write() before and after connect()
Fixes #2827.
2012-02-28 19:57:13 +09:00
koichik
63431796f4 net: fix race write() before and after connect()
Fixes #2827.
2012-02-28 19:27:27 +09:00
isaacs
44daa9836b Wrap NodeScript binding class in JavaScript layer
This makes it easy to prevent errors where Script methods
are called on non-script objects, resulting in Assertion failures.
2012-02-27 17:28:42 -08:00
isaacs
29463cb60c Update argv0 test to verify correct behavior 2012-02-27 16:41:30 -08:00
isaacs
692bcbe559 Revert "docs: split TOC into two parts: overview and API"
This reverts commit cd4cb8e795.
2012-02-27 15:53:20 -08:00
AJ ONeal
493a6bb19a [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings 2012-02-27 14:18:51 -08:00
AJ ONeal
7f58d207f3 [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings 2012-02-27 14:17:09 -08:00
Nathan Rajlich
ba0892ba91 build: build addons into the "build" dir instead of "out"
This matches the old node-waf system. Having two different dirs for this stuff
is dumb.
2012-02-27 14:04:46 -08:00
Mathias Bynens
483edbdf1a punycode: Update to v1.0.0 2012-02-27 14:03:18 -08:00
Mathias Bynens
cacd651ec6 punycode: Update to v1.0.0 2012-02-27 14:00:18 -08:00
isaacs
50cfeef65e Remove -Wall from v8 build 2012-02-27 13:55:23 -08:00
isaacs
412cebec9e v8: Remove OutputDirectory from build/common.gypi 2012-02-27 13:43:58 -08:00
isaacs
2e24ded6d2 Upgrade v8 to 3.9.11 2012-02-27 13:43:31 -08:00
Igor Zinkovsky
70a393ea9a update libuv to 9a5c1bad90 2012-02-27 13:16:06 -08:00
isaacs
4f8d7328a4 Fix #2822 Only remove logo images, not logo html 2012-02-27 13:08:54 -08:00
isaacs
fde26002f1 v8: Remove OutputDirectory from build/common.gypi 2012-02-27 12:11:10 -08:00
isaacs
f4641bd4de Update v8 to 3.9.9 2012-02-27 12:11:09 -08:00
Shigeki Ohtsu
82ad1f87fa Fix #2830 for the old gcc bug on SmartOS 2012-02-27 12:02:25 -08:00
isaacs
0e7dad3f6e Merge branch 'json-api-docs' 2012-02-27 12:00:27 -08:00
isaacs
7af2d6b985 Handle miscs better 2012-02-27 11:44:36 -08:00
isaacs
909ea3008e Debugger should be a misc, not 'concept' 2012-02-27 11:44:30 -08:00
isaacs
5571c1aaa4 'Events' is a module, not an event named 's' 2012-02-27 11:37:26 -08:00
isaacs
f9df88c6da s/streams/stream/ 2012-02-27 11:18:10 -08:00
isaacs
f9e464f95a s/buffers/buffer/ 2012-02-27 11:14:38 -08:00
isaacs
9fe92590b2 doc refactor: zlib 2012-02-27 11:14:38 -08:00
isaacs
f4720d8dbd doc refactor: vm 2012-02-27 11:14:38 -08:00
isaacs
8e6086b403 doc refactor: util 2012-02-27 11:14:37 -08:00
isaacs
a54b70a355 doc refactor: url 2012-02-27 11:14:37 -08:00
isaacs
cf4700aff4 doc refactor: tty 2012-02-27 11:14:37 -08:00
isaacs
c9b35b9923 doc refactor: tls 2012-02-27 11:14:37 -08:00
isaacs
c4d6c7f829 doc refactor: timers 2012-02-27 11:14:37 -08:00
isaacs
f0694e1e0c doc refactor: synopsis 2012-02-27 11:14:36 -08:00
isaacs
03968739c5 doc refactor: streams 2012-02-27 11:14:36 -08:00
isaacs
94c6bcfdad doc refactor: stdio 2012-02-27 11:14:36 -08:00
isaacs
dfdf09d43d doc refactor: repl 2012-02-27 11:14:36 -08:00
isaacs
728386bfb2 doc refactor: readline 2012-02-27 11:14:35 -08:00
isaacs
628bc835ae doc refactor: querystring 2012-02-27 11:14:35 -08:00
isaacs
a52254d0d7 doc refactor: process 2012-02-27 11:14:35 -08:00
isaacs
aef61ee367 doc refactor: path 2012-02-27 11:14:35 -08:00
isaacs
0e752246d3 doc refactor: os 2012-02-27 11:14:35 -08:00
isaacs
2fd5cb3d2e doc refactor: net 2012-02-27 11:14:34 -08:00
isaacs
0cf7156f08 doc refactor: modules 2012-02-27 11:14:34 -08:00
isaacs
2806c6ce28 doc refactor: https 2012-02-27 11:14:34 -08:00
isaacs
02e288b640 doc refactor: http 2012-02-27 11:14:34 -08:00
isaacs
af7314e190 doc refactor: globals 2012-02-27 11:14:34 -08:00
isaacs
40190b7c92 doc refactor: fs 2012-02-27 11:14:33 -08:00
isaacs
ec02e82760 doc refactor: events 2012-02-27 11:14:33 -08:00
isaacs
2f148845e8 doc refactor: dns 2012-02-27 11:14:33 -08:00
isaacs
9a0495a4b0 doc refactor: dgram 2012-02-27 11:14:33 -08:00
isaacs
dd1b3b6dfd doc refactor: debugger 2012-02-27 11:14:33 -08:00
isaacs
ab294ad93d doc refactor: crypto 2012-02-27 11:14:32 -08:00
isaacs
6e51db1268 doc refactor: cluster 2012-02-27 11:14:32 -08:00
isaacs
60aa852a03 doc refactor: buffers 2012-02-27 11:14:32 -08:00
isaacs
97ee38707b doc refactor: assert 2012-02-27 11:14:32 -08:00
isaacs
44559a3211 doc refactor: appendix_1 2012-02-27 11:14:32 -08:00
isaacs
24a2706a3b doc refactor: addons 2012-02-27 11:14:31 -08:00
isaacs
11d27367cd Add 'about these docs' section 2012-02-27 11:14:31 -08:00
isaacs
bd880e7f3f s/child_processes/child_process/ 2012-02-27 11:14:24 -08:00
isaacs
3bec62b012 Remove empty sections 2012-02-27 11:14:16 -08:00
isaacs
3d5f7594b5 Increase contrast of links, decrease contrast of bullets 2012-02-27 11:01:53 -08:00
isaacs
ac5e7072c9 Update styles to reflect changed api doc html structure 2012-02-27 11:01:33 -08:00
isaacs
7aee49d967 Update template to use new token style 2012-02-27 10:59:51 -08:00
isaacs
7d6d5e263e Use new doc generation tool 2012-02-27 10:59:35 -08:00
isaacs
964d03bc3f New documentation generation tool 2012-02-27 10:59:01 -08:00
tedsuo
cd4cb8e795 docs: split TOC into two parts: overview and API
Fixes #2090.
Fixes #2336.
2012-02-27 17:36:20 +09:00
Ben Noordhuis
90fd70d284 docs: fix http.ClientRequest.write() documentation
'an array of integers' == very, very deprecated
2012-02-27 04:00:22 +01:00
Nathan Rajlich
aa35564ca1 Use NODE_MODULE in the hello-world addon example.
Fixes Windows throwing "unknown error" when trying to require the .node file.
2012-02-27 02:44:33 +01:00
Nathan Rajlich
3f1f2d1497 addon: write gyp generated files to the 'out' dir 2012-02-27 02:40:09 +01:00
T.C. Hollingsworth
d03b8487c6 build: support shared zlib 2012-02-27 02:31:23 +01:00
Nathan Rajlich
3c68c85f18 build: use -pthreads (not -pthread) on Solaris 2012-02-27 02:28:06 +01:00
T.C. Hollingsworth
2d7b43f466 build: use else instead of node_shared_v8==false 2012-02-26 00:32:36 +01:00
koichik
ae762b620e docs: add ciphers option to https.request() 2012-02-25 23:17:05 +09:00
koichik
2f5e084147 docs: remove duplicate option of tls.connect() 2012-02-25 23:07:30 +09:00
Roly Fentanes
db8940dae2 newListener emits correct fn when using once
Fixes #2826.
2012-02-25 15:37:38 +09:00
isaacs
ca0986fbd1 Update npm to 1.1.2 2012-02-24 18:52:17 -08:00
isaacs
d4d45a1757 Update npm to 1.1.2 2012-02-24 18:51:22 -08:00
Maciej Małecki
27a937bcf8 Revert "startup: use path.resolve instead of path.join(cwd, ...)"
This reverts commit b0c1541227.

Reverted commit introduced a regression causing `process.argv[0]` to be
invalid in node processes spawned from `PATH` (without explicit path to
executable file - for example when using global node installation).

Instead of finding a correct path to the executable, `process.cwd()`
would be prepended to `process.argv[0]`.
2012-02-23 20:23:26 -08:00
Maciej Małecki
b73ec84ce1 test: test for process.argv[0] correctness
joyent/node@b0c1541227 introduced a
regression causing `process.argv[0]` to be invalid in node processes
spawned from `PATH` (without explicit path to executable file - for
example when using global node installation).

Instead of finding a correct path to the executable, `process.cwd()`
would be prepended to `process.argv[0]`.
2012-02-23 20:23:24 -08:00
Nathan Rajlich
a84adad078 Default node_shared_v8 to false.
Fixes #2818.
2012-02-23 14:52:39 -08:00
isaacs
59ecf2ccf7 Revert "Revert "build: support shared V8 properly""
This reverts commit a9130222bd.
2012-02-23 14:52:18 -08:00
isaacs
f492baa61d Now working on 0.7.6 2012-02-23 14:41:36 -08:00
isaacs
c5cbc3db47 Merge branch 'v0.7.5-release' 2012-02-23 14:39:58 -08:00
isaacs
d384b8b0d2 2012.02.23, Version 0.7.5 (unstable)
* startup speed improvements (Maciej Małecki)

* crypto: add function getDiffieHellman() (Tomasz Buchert)

* buffer: support decoding of URL-safe base64 (Ben Noordhuis)

* Make QueryString.parse() even faster (Brian White)

* url: decode url entities in auth section (Ben Noordhuis)

* http: support PURGE request method (Ben Noordhuis)

* http: Generate Date headers on responses (Mark Nottingham)

* Fix #2762: Add callback to close function. (Mikeal Rogers)

* dgram: fix out-of-bound memory read (Ben Noordhuis)

* repl: add automatic loading of built-in libs (Brandon Benvie)

* repl: remove double calls where possible (Fedor Indutny)

* Readline improvements. Related: #2737 #2756 (Colton Baker)

* build: disable -fomit-frame-pointer on solaris (Dave Pacheco)

* build: arch detection improvements (Nathan Rajlich)

* build: Make a fat binary for the OS X `make pkg`. (Nathan Rajlich)

* jslint src/ and lib/ on 'make test' (isaacs)
2012-02-23 14:12:39 -08:00
isaacs
a9130222bd Revert "build: support shared V8 properly"
This reverts commit 3d1b670640.

Breaks build on windows.
https://gist.github.com/1895279
2012-02-23 14:12:14 -08:00
Shigeki Ohtsu
c1fcb1db99 build: change default BUILDTYPE of vcbuild.bat
From Debug to Release.
2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
491ec171ec build: change default BUILDTYPE of gyp to Release 2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
58e5d69250 build: fix the case where config.gypi doesn't exist 2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
680d75af34 build: make default_configuration consistent with BUILDTYPE 2012-02-23 14:11:26 +01:00
Ben Noordhuis
b92a919500 Remove unused variables. 2012-02-23 04:11:07 -08:00
isaacs
1b5048b288 doc: refer to modules doc rather than src/node.js 2012-02-23 00:18:17 -08:00
isaacs
d3b8372615 lint, missed in QS speed merge 2012-02-22 20:58:24 -08:00
isaacs
73806b56e5 Add new authors 2012-02-22 20:58:24 -08:00
isaacs
9a6f936c8a test-fs-watch: Add faster failure, and link to #2813 2012-02-22 20:57:55 -08:00
isaacs
92cb684e78 Change test fixture from symlink to regular file
The only test using this is test/simple/test-fs-chmod.js, and it was
treating a.js and a1.js as two separate files, resulting in a race
condition.  (Interestingly enough, it was *not* using the symlink file to
test lchmod, which uses a different temp file.)
2012-02-22 20:57:43 -08:00
Ben Noordhuis
3502e45b6c dgram: defer send error to next tick 2012-02-23 02:07:39 +01:00
Ben Noordhuis
defa637378 dgram: fix out-of-bound memory read 2012-02-23 02:07:39 +01:00
Colton Baker
fd61bfc731 readline: ^Z (SIGSTP) handling
Bugfix and update.

- Fixed bug where Node's REPL wouldn't continue when returning from ^Z
  (SIGTSTP)
- Removed old readline callback

Readline API update with docs.

- ^Z (SIGTSTP) is now bypassed on Windows systems.
- SIGCONT is now bypassed on Windows systems.
- Docs updated to reflect above.
2012-02-22 16:07:23 -08:00
Colton Baker
ac9fa2b846 Removed rl.on('close', ...) callback 2012-02-22 16:05:55 -08:00
isaacs
e004721b48 Make a fat binary for the OS X pkg 2012-02-22 15:58:02 -08:00
Nathan Rajlich
e60b18bbdf Make a fat binary for the OS X make pkg. 2012-02-22 14:27:08 -08:00
Cam Pedersen
7f94b5ccca docs: remove duplicate socket.write 2012-02-22 22:20:57 +01:00
Igor Zinkovsky
35c1f682c1 update libuv to c0e7044862 2012-02-22 12:04:39 -08:00
T.C. Hollingsworth
3d1b670640 build: support shared V8 properly
-don't pull in bundled v8 as a dependency when node_shared_v8==true
-use node_shared_v8_includes for v8.h and v8-debug.h
2012-02-22 15:20:23 +01:00
Myles Byrne
21374c3903 build: remove unused makefile target 2012-02-22 14:25:56 +01:00
isaacs
634b4de2c8 Pause process.stdin in stdin getter
Otherwise, it'll be ref'ed, and keep the process hanging.
2012-02-21 15:31:50 -08:00
isaacs
27d8b059fa Pause process.stdin in stdin getter
Otherwise, it'll be ref'ed, and keep the process hanging.
2012-02-21 15:26:35 -08:00
Brian White
5e3ca98155 Make QueryString.parse() even faster 2012-02-21 12:17:26 -08:00
isaacs
186960fefb Add Håvard Stranden to AUTHORS file 2012-02-21 12:04:09 -08:00
isaacs
3817b12fec Add Håvard Stranden to AUTHORS file 2012-02-21 12:03:15 -08:00
isaacs
bae4018b30 Run jslint after tests, not before 2012-02-21 12:02:57 -08:00
Fedor Indutny
c6019b8b4e docs: remove server.pause
This functionality was removed when libuv landed in node. It is useless
and can be easily implemented in user-land.
2012-02-21 20:52:40 +06:00
Fedor Indutny
080ffb8b2c docs: remove server.pause
This functionality was removed when libuv landed in node. It is useless
and can be easily implemented in user-land.
2012-02-21 20:50:01 +06:00
Ben Noordhuis
b9127eb0a5 buffer: support decoding of URL-safe base64 2012-02-21 15:33:14 +01:00
Andreas Madsen
feff9bbb67 docs: remove setSecure() from net module docs
socket.setSecure() was removed in v0.3 and there are no deprecated warning in
code it should be removed from the documentation in 0.7
2012-02-21 15:18:16 +01:00
Tomasz Buchert
c6a04ce78f crypto: add function getDiffieHellman()
Returns a well known, predefined RFC group.
2012-02-21 14:07:25 +01:00
Nathan Rajlich
19133cac02 build: better host_arch() definition in configure
On one of my OS X Lion machines, it always reports i386, even though 64-bit
is supported. This lookup better matches how WAF determines the host arch,
which was correctly getting 64-bit even on this screwy machine.
2012-02-20 22:14:23 +01:00
Maciej Małecki
da908364a8 tls http https: don't pollute user's options object 2012-02-20 21:58:00 +01:00
Maciej Małecki
c6c6f98f1c util: add util._extend for extending objects
There were 2 duplicates with such functionality in `cluster` and
`child_process` modules which were replaced by this function.
2012-02-20 21:58:00 +01:00
Andreas Madsen
3f4062309e core: ignore too many arguments, don't assert 2012-02-20 21:55:35 +01:00
Ben Noordhuis
f116e17a23 test: update HTTP basic auth test
Verify that URL-encoded entities are properly encoded into the Authorization
header.
2012-02-20 17:24:14 +01:00
Ben Noordhuis
86f4846c21 url: decode url entities in auth section
Fixes #2736.
2012-02-20 17:11:21 +01:00
Fedor Indutny
0cebfc8ddb tests: kill process group on failure
Test suite is often leaving `stray` processes on failure. They are
harmless, but may cause future test runs fail because those `stray`
processes are occupying `common.PORT` or due to some other reasons.

Killing whole process group on test suite failure should help in such
cases.
2012-02-20 22:07:19 +06:00
Ben Noordhuis
de5e3f6a6f http: support PURGE request method 2012-02-20 16:12:48 +01:00
Ben Noordhuis
f0c5165f81 http_parser: upgrade to 62110ef 2012-02-20 16:12:33 +01:00
Maciej Małecki
b0c1541227 startup: use path.resolve instead of path.join(cwd, ...) 2012-02-20 16:04:44 +01:00
Maciej Małecki
1109c8fc4e startup: move EventEmitter closer to the lookup
This makes startup faster by ~0.2 ms on my computer.
2012-02-20 16:04:44 +01:00
Maciej Małecki
c3a9733ac1 startup: use .hasOwnProperty instead of in
Benchmarks show that `.hasOwnProperty` is faster than `in` in V8. It
makes startup ~0.5 ms faster on my computer.
2012-02-20 16:04:44 +01:00
Brandon Benvie
b72277183f repl: add automatic loading of built-in libs 2012-02-20 13:56:27 +01:00
Luke Gallagher
8d3c46daa8 util: fix typo in lib/util.js 2012-02-20 13:42:27 +01:00
Ben Noordhuis
999757983c test: don't let debugger listen on common.PORT
simple/test-debugger-repl-utf8 has a tendency to fail and leave behind a stray
process that listens on common.PORT, making later tests fail with EADDRINUSE.
2012-02-20 13:31:00 +01:00
Ben Noordhuis
7f4aba91d3 test: include common.js in all tests 2012-02-20 13:29:11 +01:00
Nathan Rajlich
028043dd02 build: map i686 to ia32 2012-02-20 11:49:57 +01:00
Nathan Rajlich
546870edd8 build: use proper -arch for target_arch on OS X 2012-02-20 11:49:32 +01:00
Nathan Rajlich
af4a96ce6e build: test uname -m first, then uname -p
Prevent false i386 on 64-bit OS X.
2012-02-20 11:49:25 +01:00
Ben Noordhuis
4af673e161 gyp: update to r1214 2012-02-20 11:47:03 +01:00
koichik
7ae0d473a6 test: fix test-tls-over-http-tunnel with v0.7 2012-02-19 11:46:58 -08:00
Mikeal Rogers
d530ee62cd Issue #2762. Add callback to close function. 2012-02-18 17:46:28 -08:00
isaacs
96338432e2 jslint src/ and lib/ on 'make test' 2012-02-18 16:04:10 -08:00
isaacs
0cdf85e28d Lint all the JavaScripts. 2012-02-18 15:34:57 -08:00
Ben Noordhuis
96a137a18a docs: update man page 2012-02-18 22:36:34 +01:00
isaacs
31721da4b1 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	AUTHORS
	ChangeLog
	Makefile
	doc/about/index.html
	doc/api/tls.markdown
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	lib/http.js
	lib/tls.js
	src/node_version.h
	src/platform_win32.cc
	test/simple/test-tls-connect-given-socket.js
2012-02-18 09:46:58 -08:00
Paul Vorbach
c1f474010e docs: fix quotation style in the webserver example
Replace " by '
2012-02-18 02:05:12 +01:00
Nathan Rajlich
0787287021 build: remove 'config.mk' during make distclean 2012-02-18 00:34:19 +01:00
Dave Pacheco
7864bb9eb8 build: disable -fomit-frame-pointer on solaris
This "optimization" cripples debuggability and has dubious performance value,
so we want to disable it at least on SmartOS.
2012-02-18 00:30:00 +01:00
Ben Noordhuis
23c4278e06 docs: fix tls markdown 2012-02-17 23:58:42 +01:00
isaacs
dfed2cef75 Merge branch 'v0.6.11-release' into v0.6 2012-02-17 13:35:52 -08:00
isaacs
f73f07e126 Now working on 0.6.12 2012-02-17 13:33:58 -08:00
isaacs
1eb1fe3225 2012.02.17 Version 0.6.11 (stable)
* http: allow multiple WebSocket RFC6455 headers (Einar Otto Stangvik)

* http: allow multiple WWW-Authenticate headers (Ben Noordhuis)

* windows: support unicode argv and environment variables (Bert Belder)

* tls: mitigate session renegotiation attacks (Ben Noordhuis)

* tcp, pipe: don't assert on uv_accept() errors (Ben Noordhuis)

* tls: Allow establishing secure connection on the existing socket (koichik)

* dgram: handle close of dgram socket before DNS lookup completes (Seth Fitzsimmons)

* windows: Support half-duplex pipes (Igor Zinkovsky)

* build: disable omit-frame-pointer on solaris systems (Dave Pacheco)

* debugger: fix --debug-brk (Ben Noordhuis)

* net: fix large file downloads failing (koichik)

* fs: fix ReadStream failure to read from existing fd (Christopher Jeffrey)

* net: destroy socket on DNS error (Stefan Rusu)

* dtrace: add missing translator (Dave Pacheco)

* unix: don't flush tty on switch to raw mode (Ben Noordhuis)

* windows: reset brightness when reverting to default text color (Bert Belder)

* npm: update to 1.1.1
  - Update which, fstream, mkdirp, request, and rimraf
  - Fix #2123 Set path properly for lifecycle scripts on windows
  - Mark the root as seen, so we don't recurse into it. Fixes #1838. (Martin Cooper)
2012-02-17 12:39:45 -08:00
isaacs
a2851b6234 Revert "cluster: propagate bind errors"
This reverts commit 30e462e919.
2012-02-17 12:39:45 -08:00
isaacs
4672872ddd Fix #2770 Compile the OS X pkg as ia32 2012-02-17 12:39:45 -08:00
Maciej Małecki
977e211421 debugger: rename process.debug_port to process.debugPort
We should comply to to camelCase naming convention.
2012-02-18 00:45:56 +06:00
Fedor Indutny
ae5e23310e repl: remove double calls where possible
Repl is doing double evaluation of code: wrapped in parens and without
them. That's needed to allow users typing multiline chunks of code by
handling syntax errors on repl side. However if function declaration is
wrapped in parens (`(function a() {})`) calling it will be impossible,
so we're evaluating functions twice. That works fine for declaration,
but if entered code chunk returns function - it should not be called
twice.

fix #2773
2012-02-18 00:30:52 +06:00
Shannen Saez
9764bea97d docs: remove unused javascript includes 2012-02-17 16:13:48 +01:00
Shannen Saez
4ed7b035bd docs: add lang="en" and remove redundant types 2012-02-17 16:13:42 +01:00
Nathan Rajlich
a118f21728 repl: make tab completion work on non-objects 2012-02-17 15:51:33 +01:00
isaacs
7a1a62ec6e Upgrade uv to 86ebe48660e 2012-02-16 15:32:15 -08:00
Ben Noordhuis
30e462e919 cluster: propagate bind errors
This commit fixes a bug where the cluster module failed to propagate EADDRINUSE
errors.

When a worker starts a (net, http) server, it requests the listen socket from
its master who then creates and binds the socket.

Now, OS X and Windows don't always signal EADDRINUSE from bind() but instead
defer the error until a later syscall. libuv mimics this behaviour to provide
consistent behaviour across platforms but that means the worker could end up
with a socket that is not actually bound to the requested addresss.

That's why the worker now checks if the socket is bound, raising EADDRINUSE if
that's not the case.

Fixes #2721.
2012-02-16 23:47:17 +01:00
einaros
83fd1c1de5 Add WebSocket RFC6455 multiheader fields to the http parser. 2012-02-16 14:12:38 -08:00
Ben Noordhuis
2c07712860 http: allow multiple WWW-Authenticate headers 2012-02-16 14:11:49 -08:00
Bert Belder
8f2694bb53 Make win32 ansi api usage explicit
Use widechar versions in a couple of places.
Don't use C-style cast in C++ code.
2012-02-16 22:19:48 +01:00
Bert Belder
d52f5020ce Windows: another attempt to support unicode argv 2012-02-16 20:58:45 +01:00
Bert Belder
9364699be1 Revert "Windows: support non-ansi command line arguments"
CommandLineToArgvW doesn't behave exactly the same as the crt, which makes it useless.
This reverts commit ef032cbe85.
2012-02-16 20:19:33 +01:00
Ben Noordhuis
3415427dbf tls: mitigate session renegotiation attacks
The TLS protocol allows (and sometimes requires) clients to renegotiate the
session. However, renegotiation requires a disproportional amount of server-side
resources, particularly CPU time, which makes it a potential vector for
denial-of-service attacks.

To mitigate this issue, we keep track of and limit the number of renegotiation
requests over time, emitting an error if the threshold is exceeded.
2012-02-16 18:15:21 +01:00
koichik
ef50bd2e54 docs: removed unnecessary STARTTLS section 2012-02-17 02:10:59 +09:00
Colton Baker
ce485791db Readline proposal and bugfixes. Related: #2737 #2756
- Removed extra newline from .question(); Users can input a
  newline if it they require it.
- Removed .close() due to it only emulating closing, causing a bug where
  readline is left open to trigger events such as .on('line', ...').
- Removed ._attemptClose()
- .pause() now triggers event .on('pause', ...)
- .resume() now triggers event .on('resume', ...)
- CTRL-C (SIGINT) in readline will now default to .pause() if no SIGINT event
  is present.
- CTRL-D (delete right) will also default to .pause() if there is nothing to
  delete (signaling the end of the file).
- Added new event `SIGTSTP`
- Added new event `SIGCONT`
- Added `resume` to `write` to resume the stream if paused.
- Docs updated.
- Updated repl.js
2012-02-16 12:12:03 +06:00
Maciej Małecki
3bc3af0276 process: remove old notices about removed methods
These methods were removed a long time ago. Keeping these notices here
makes no sense anymore.

Also, removing this part of code slightly speeds up the startup.
2012-02-15 19:45:33 -08:00
Bert Belder
d91bc7cb09 Windows: get rid of process._cwdForDrive() 2012-02-16 00:10:51 +01:00
Bert Belder
077f9d7293 Windows: use unicode environment 2012-02-16 00:10:33 +01:00
Nathan Rajlich
71e975669c Default to static linking CRT on Windows. 2012-02-15 13:32:46 -08:00
Mark Nottingham
1e425e3fa7 Generate Date headers on responses when not already present. 2012-02-15 12:35:34 -08:00
isaacs
d653732157 Merge branch 'v0.7.4-release' 2012-02-15 11:37:48 -08:00
isaacs
6a2cb6c506 Now working on 0.7.5 2012-02-15 11:37:34 -08:00
Ben Noordhuis
6141386f7e http: allow multiple WWW-Authenticate headers 2012-02-15 17:04:10 +01:00
Ben Noordhuis
0685707bc6 tcp, pipe: don't assert on uv_accept() errors
It's possible for a new connection to be closed in the window between the
accept() syscall and the call to uv_accept(). Deal with it and move on, don't
assert.
2012-02-15 16:45:14 +01:00
isaacs
de21de920c 2012.02.14, Version 0.7.4 (unstable)
* Upgrade V8 to 3.9.5

* Upgrade npm to 1.1.1

* build: Detect host_arch better (Karl Skomski)

* debugger: export `debug_port` to `process` (Fedor Indutny)

* api docs: CSS bug fixes (isaacs)

* build: use -fPIC for native addons on UNIX (Nathan Rajlich)

* Re-add top-level v8::Locker (Marcel Laverdet)

* Move images out of the dist tarballs (isaacs)

* libuv: Remove uv_export and uv_import (Ben Noordhuis)

* build: Support x64 build on Windows (Igor Zinkovsky)
2012-02-14 14:34:43 -08:00
isaacs
0a4f5e8473 robots.txt 2012-02-14 14:34:43 -08:00
Igor Zinkovsky
14b20ffc30 add tls-over-http-tunnel test 2012-02-14 11:53:23 -08:00
koichik
b19b8836c3 tls: Allow establishing secure connection on the existing socket 2012-02-14 11:53:05 -08:00
Seth Fitzsimmons
1ce14eca44 dgram: handle close of dgram socket before DNS lookup completes 2012-02-14 14:10:21 +01:00
isaacs
9a0d90793e doc: Wrap API doc content in div#apicontent 2012-02-13 15:27:41 -08:00
isaacs
df236e75a2 css: Restrict li fix to #apicontent only. 2012-02-13 15:27:32 -08:00
isaacs
a7af84f988 docs: Move images out of the dist tarball
This puts all images in doc/images/ and references them via
http://nodejs.org/images/.

Any complaints about copyright usage etc. can thus be node/joyent's
problem, rather than the problem of a downstream distribution channel.
2012-02-13 15:27:06 -08:00
Fedor Indutny
e7e4f2f3aa Fix linker error on some gcc version on osx
* See: http://codereview.chromium.org/9382033/
2012-02-14 02:36:08 +06:00
Bert Belder
ef032cbe85 Windows: support non-ansi command line arguments 2012-02-13 20:55:29 +01:00
isaacs
3a915b02e8 Upgrade uv to 1d942e2a 2012-02-13 11:10:12 -08:00
isaacs
5041bc1b6c Patches floating on V8
Only SConstruct and build/common.gypi at this point.  All
others are accepted upstream, which greatly simplifies things.
2012-02-13 10:11:28 -08:00
isaacs
68a0c56a7d Upgrade V8 to 3.9.5 2012-02-13 10:05:16 -08:00
Karl Skomski
09ccbef3bb build: detect host_arch better 2012-02-13 17:43:30 +01:00
Bert Belder
2e6ad62047 Add libuv test that was omitted in last libuv upgrade 2012-02-12 21:07:31 +01:00
Bert Belder
c3f176222a Fix vcbuild.bat, print error when an unrecognized option is encountered 2012-02-12 21:04:03 +01:00
Fedor Indutny
3f43b1c039 debugger: export debug_port to process
`process.debug_port` is useful for changing debugger port in runtime,
before starting it (via SIGUSR1).

Using `--port=` argument for debugger repl, tests will run debugger
server on a `common.PORT` (as it usually does for any other servers).

`process._debugEnd()` stops debugger and its server.

* debugger: implemented process._debugEnd(), `node debug --port=5858 app.js`
* test: start debugger repl on common.PORT
* fixes #2613
* fixes #2614
2012-02-12 22:27:12 +06:00
Ben Noordhuis
8a6576f764 Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	common.gypi
2012-02-12 16:12:26 +01:00
Ben Noordhuis
a27320e00f uv: upgrade to 4e1f2b1 2012-02-12 16:12:04 +01:00
koichik
2f759a7090 test: fix timing sensitivity in test-net-write-slow 2012-02-12 02:05:30 +09:00
Ben Noordhuis
d3f6b094c7 docs: update net.Server.address() documentation 2012-02-11 14:24:15 +01:00
isaacs
e9adb7fbbc apidoc css: Footer li's should be sans-serif 2012-02-10 20:55:21 -08:00
isaacs
830d0fe95a Fix #2690 css: Set font size in apidoc LIs to match Ps 2012-02-10 19:38:34 -08:00
Igor Zinkovsky
c7771bc2ec set readable/writable for pipes 2012-02-10 11:28:43 -08:00
Igor Zinkovsky
c9f58cc595 upgrade uv to f9be43a564 2012-02-10 11:27:12 -08:00
Ben Noordhuis
a8f357629d docs: clarify http 'data' callback
Fixes #2733.
2012-02-10 18:51:33 +01:00
Ben Noordhuis
38eec57aef docs: document tls/crypto ciphers option
Hitherto undocumented option that lets the user select the list of ciphers to
use or exclude in a SSL/TLS session.
2012-02-09 17:16:46 +01:00
Nathan Rajlich
d4ccdeaf00 build: use -fPIC for native addons on UNIX
No -fPIC on 32 bits Linux but do enable for the other UNIX flavors.
2012-02-09 14:34:30 +01:00
Ben Noordhuis
cacd3ae004 test: add cluster 'bind twice' test
This test starts two clustered HTTP servers on the same port. It expects the
first cluster to succeed and the second cluster to fail with EADDRINUSE.
2012-02-09 06:32:33 +01:00
isaacs
163900dc68 npm: update to 1.1.1 2012-02-08 12:36:20 -08:00
Andreas Madsen
9da830e895 child_process: stop .disconnect() call if channel is diconnected 2012-02-08 11:42:38 -08:00
Dave Pacheco
e5ed6b91f4 disable omit-frame-pointer on solaris systems 2012-02-08 10:16:19 -08:00
isaacs
02c1cb54aa Makefile: Don't use ** in globs
Many shells don't have GLOBSTAR turned on by default.  This is
why uv and v8 so often don't get cleaned out properly.
2012-02-08 09:59:53 -08:00
Marcel Laverdet
9a6012edd9 Re-add top-level v8::Locker
11d1eca9 added a v8 locker to ease development of 3rd party threading
extensions but it created a condition which would cause node to exit
uncleanly while in debug mode; it was reverted in 7543c38d.

The problem here is that the Locker was being disposed after V8 was torn
down. Adding some scoping fixes that.
2012-02-08 14:40:33 +01:00
isaacs
e612143a89 Now working on 0.7.4 2012-02-07 16:44:57 -08:00
isaacs
99059aad8d 2012.02.07, Version 0.7.3 (unstable)
* Upgrade V8 to 3.9.2

* Revert support for isolates. (Ben Noordhuis)

* cluster: Cleanup docs, event handling, and process.disconnect (Andreas Madsen)

* gyp_addon: link with node.lib on Windows (Nathan Rajlich)

* http: fix case where http-parser is freed twice (koichik)

* Windows: disable RTTI and exceptions (Bert Belder)
2012-02-07 15:42:33 -08:00
isaacs
349cab0b48 Check the version before building tarball
I keep forgetting to do this.  It's such a stupid thing.
2012-02-07 15:41:21 -08:00
Ben Noordhuis
81d18398a8 test: add --debug-brk regression test 2012-02-07 23:42:38 +01:00
Ben Noordhuis
09c296b44d debugger: fix --debug-brk
Commit 840229a forgot to update the debugger special case in lib/module.js

Fixes #2710.
2012-02-07 23:16:40 +01:00
Igor Zinkovsky
0a347559bf enable x64 windows build
use "vcbuild x64" to do x64 build of node.exe
2012-02-07 13:32:53 -08:00
isaacs
986785c9d2 Fix merge-conflicts in HTML
Thanks, @AndreasMadsen
2012-02-06 23:01:17 -08:00
isaacs
116835561d Merge remote-tracking branch 'ry/v0.6'
Conflicts:
	ChangeLog
	deps/v8/src/version.cc
	deps/v8/tools/gyp/v8.gyp
	doc/about/index.html
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	lib/path.js
	lib/querystring.js
	src/node_version.h
2012-02-06 15:43:21 -08:00
isaacs
e5db01ee29 v8: Remove OutputDirectory from build/common.gypi 2012-02-06 15:22:52 -08:00
isaacs
8be699494e Upgrade V8 to 3.9.2 2012-02-06 15:21:49 -08:00
Andreas Madsen
23514fc946 [doc] cluster: remove part about autoFork since this do not exist 2012-02-06 14:54:11 -08:00
Andreas Madsen
1595a6e885 cluster: use process.disconnect method
After adding a .disconect method and connected flag in child_process
we should no longer use the process._channel object.
2012-02-06 14:54:11 -08:00
Andreas Madsen
a20872045a cluster: simplify process event handling
This simplify the internalMessage and exit event handling
And simply relay message and error event to the worker object
Note that the error event was not relayed before
2012-02-06 14:54:11 -08:00
Nathan Rajlich
5e1471c806 gyp_addon: link with node.lib on Windows
Closes GH-2685
2012-02-06 19:02:45 +01:00
koichik
c2dc673eb5 http: fix http-parser is freed twice
after response to CONNECT/Upgrade request.

Fixes #2704.
2012-02-07 02:29:28 +09:00
Ben Noordhuis
832efb1e01 test: remove deprecated isolates test 2012-02-06 17:47:09 +01:00
Bert Belder
2e2df04b35 Windows: disable RTTI and exceptions 2012-02-06 15:59:08 +01:00
Ben Noordhuis
74a8215a86 Revert support for isolates.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.

Hence, this commit backs out all isolates-related changes.

Good bye, isolates. We hardly knew ye.
2012-02-06 15:44:42 +01:00
Ben Noordhuis
7543c38dca Revert "Add explicit v8 locker"
This reverts commit 11d1eca9f3.

It sporadically (but reproducibly) triggers an assert inside V8:

  Fatal error in /path/to/node/deps/v8/src/isolate.cc, line 1857
  CHECK(CurrentPerIsolateThreadData()->isolate_ == this) failed

Needs further investigation.
2012-02-05 23:36:38 +01:00
koichik
a2cd31cbf1 doc: add the note about 'data' event
Refs #2691.
2012-02-05 19:11:54 +09:00
koichik
0f0af55a0a net: fix large file downloads failing
Fixes #2678.
2012-02-05 17:41:49 +09:00
Marcel Laverdet
11d1eca9f3 Add explicit v8 locker
v8 requires a lock of each thread using the vm, but if none is
explicitly is created it will implicitly create one for you. This
creates issues when trying to build modules which use v8's
multi-threading features because there's no lock to unlock.
2012-02-04 22:19:56 +01:00
Christopher Jeffrey
f64989e63b fs: fix ReadStream fails to read from existing fd
A ReadStream constructed from an existing file descriptor failed to start
reading automatically. Avoids a userspace call to ReadStream.prototype._read().
2012-02-04 22:14:58 +01:00
Stefan Rusu
07a983a602 test: add tcp and https DNS error tests
net-dns-error: specifc test for the net DNS issue.
http-dns-error: now it works for HTTPS as well.
2012-02-04 00:41:24 +01:00
Stefan Rusu
4671e54495 net: destroy socket on DNS error
The socket was never destroyed on DNS errors. This broke some clients, including
lib/https.js.
2012-02-04 00:40:53 +01:00
Bert Belder
68db20656e Rename some occurrences of process_1 back to process 2012-02-03 15:38:08 +01:00
Dave Pacheco
9fb088e3ab dtrace: add missing translator
Add missing translator for node_dtrace_http_*_request_t types.

Fixes #2667.
2012-02-03 14:07:32 +00:00
isaacs
74a2528bd7 Now working on v0.6.11 2012-02-02 17:19:28 -08:00
isaacs
051908e023 2012.02.02, Version 0.6.10 (stable)
* Update V8 to 3.6.6.20

* Add npm msysgit bash shim to msi installer (isaacs)

* buffers: fix intermittent out of bounds error (Ben Noordhuis)

* buffers: honor length argument in base64 decoder (Ben Noordhuis)

* windows: Fix path.exists regression (Bert Belder)

* Make QueryString.parse run faster (Philip Tellis)

* http: avoid freeing http-parser objects too early (koichik)

* timers: add v0.4 compatibility hack (Ben Noordhuis)

* Proper EPERM error code support (Igor Zinkovsky, Brandon Philips)

* dgram: Implement udp multicast methods on windows (Bert Belder)
2012-02-02 16:56:42 -08:00
isaacs
5937d02aed msi: npm bash shim fixes 2012-02-02 16:56:42 -08:00
isaacs
71527e3a55 Patches floating on v8 2012-02-02 15:38:28 -08:00
isaacs
465f57c56f Upgrade v8 to 3.6.6.20 2012-02-02 15:38:28 -08:00
isaacs
30fd2f7bb2 Add npm msysgit bash shim to msi installer 2012-02-02 14:57:12 -08:00
Ben Noordhuis
7e40c7ddc9 buffers: fix intermittent out of bounds error
The base64 decoder would intermittently throw an out-of-bounds exception when
the buffer in `buf.write('', 'base64')` was a zero-sized buffer located at the
end of the slab.

Fixes #2657.
2012-02-02 19:14:06 +01:00
Ben Noordhuis
f101f7c9ba buffers: honor length argument in base64 decoder
Honor the length argument in `buf.write(s, 0, buf.length, 'base64')`. Before
this commit, the length argument was ignored. The decoder would keep writing
until it hit the end of the buffer. Since most buffers in Node are slices of
a parent buffer (the slab), this bug would overwrite the content of adjacent
buffers.

The bug is trivially demonstrated with the following test case:

    var assert = require('assert');
    var a = Buffer(3);
    var b = Buffer('xxx');
    a.write('aaaaaaaa', 'base64');
    assert.equal(b.toString(), 'xxx');

This commit coincidentally also fixes a bug where Buffer._charsWritten was not
updated for zero length buffers.
2012-02-02 19:13:56 +01:00
Bert Belder
67cd05472e uv: upgrade to 267e75d 2012-02-02 17:42:08 +01:00
Bert Belder
e5ea6ad0f0 _makeLong shouldn't turn the empty string into \\?\C:\ 2012-02-02 17:14:03 +01:00
Bert Belder
a661830569 Run path.exists paths through _makeLong 2012-02-02 17:14:01 +01:00
Philip Tellis
5166758927 Make QueryString.parse run faster
Use decodeURIComponent when appropriate, and only fall back to
querystring.decode if it throws, or if the character is a '+'.

Fix #2248
2012-02-01 16:04:01 -08:00
Ben Noordhuis
3deceaf6e7 Revert "Process symlinked shared library as .node"
This reverts commit 7e0bf7d57d.

It's possible to make GYP generate an XCode project that produces a .node file,
hence this commit is no longer needed.
2012-02-01 22:49:56 +01:00
Ben Noordhuis
a9723df1b7 Revert "Process symlinked shared library as .node"
This reverts commit 7e0bf7d57d.

It's possible to make GYP generate an XCode project that produces a .node file,
hence this commit is no longer needed.
2012-02-01 22:28:23 +01:00
isaacs
ec79acb3a6 working on 0.7.3 now 2012-02-01 13:05:04 -08:00
isaacs
a3efcd2006 2012.02.01, Version 0.7.2 (unstable)
* Update V8 to 3.8.9

* Support for sharing streams across Isolates (Igor Zinkovsky)

* #2636 - Fix case where http_parsers are freed too early (koichik)

* url: Support for IPv6 addresses in URLs (Łukasz Walukiewicz)

* child_process: Add disconnect() method to child processes (Andreas Madsen)

* fs: add O_EXCL support, exclusive open file (Ben Noordhuis)

* fs: more specific error messages (Tj Holowaychuk)

* tty: emit 'unknown' key event if key sequence not found (Dan VerWeire, Nathan Rajlich)

* build: compile release build too if BUILDTYPE=Debug (Ben Noordhuis)

* module: fix --debug-brk on symlinked scripts (Fedor Indutny)

* zlib: fix `Failed to set dictionary` issue (Fedor Indutny)

* waf: predict target arch for OS X (Fedor Indutny)
2012-02-01 11:37:12 -08:00
isaacs
05471f5c2a Update v8 to 3.8.9 2012-01-31 18:35:04 -08:00
isaacs
bd21038078 Merge remote-tracking branch 'ry/master' into merge-v0.6 2012-01-31 18:22:10 -08:00
isaacs
18d179c2d8 Merge remote-tracking branch 'ry/v0.6' into master
Conflicts:
	ChangeLog
	deps/uv/src/unix/udp.c
	deps/uv/src/win/fs.c
	deps/uv/src/win/udp.c
	deps/uv/test/test-fs.c
	doc/index.html
	doc/logos/index.html
	doc/template.html
	src/node_version.h
2012-01-31 18:18:00 -08:00
Paddy Byers
7e0bf7d57d Process symlinked shared library as .node 2012-01-31 17:50:16 -08:00
Paddy Byers
840229a825 Tidy _resolveFilename 2012-01-31 17:50:11 -08:00
Igor Zinkovsky
db3c4efd1d support for sharing streams accross isolates 2012-01-31 17:45:50 -08:00
Dan VerWeire
35b3d15194 test: dgram-{broadcast,multicast}-multi-process : prevent false failures
* check exit code of child processes
* wait 1000 ms to exit the child process
* prefix log messages with [PARENT] or [CHILD] to help debugging
* kill all child processes before exiting

Conflicts:

	test/simple/test-dgram-multicast-multi-process.js
2012-01-31 17:37:38 -08:00
Andreas Madsen
33b7fc250f child_process: do not disconnect on exit emit
When using isolate the .fork would break because it had
no .disconnect method. This remove the exit handler there
would call .disconnect since it was not required.
It also change .disconnect to throw if the channel is closed,
this was not possible before because .disconnect would be called
twice.
2012-01-31 17:22:21 -08:00
Bert Belder
fa490f6497 uv: upgrade to 3eb94e9 2012-01-31 17:41:46 +01:00
Bert Belder
0ad2a9a2e0 Small test-dgram-multicast-multi-process fixes
Somehow windows doesn't want to bind to 224.0.0.1. Let's test with a multicast
address that has no special meaning.
2012-01-31 16:46:14 +01:00
Ben Noordhuis
03c4aa6aef build: don't set -mmacosx-version-min
It sets __MAC_OS_X_VERSION_MIN_REQUIRED__, which is what we use for feature
detection.
2012-01-31 15:12:12 +01:00
Andreas Madsen
42ea068a1a Test for ChildProcess.disconnect() 2012-01-31 14:47:12 +01:00
Ben Noordhuis
279e7e7341 fs: add O_EXCL support, exclusive open file 2012-01-31 14:29:32 +01:00
Ben Noordhuis
88b919ea56 fs, test: add file open mode tests 2012-01-31 14:29:27 +01:00
Łukasz Walukiewicz
a94ffdaec5 url: Support for IPv6 addresses in URLs.
Fixes #1138, #2610.
2012-01-31 16:58:41 +09:00
Tj Holowaychuk
26bfb6bea4 more specific fs error messages 2012-01-30 22:11:19 -08:00
Igor Zinkovsky
ff40253566 upgrade uv to 812e410772 2012-01-30 15:57:08 -08:00
Roman Shtylman
e97b961815 add node::SetMethod and node::SetPrototypeMethod
defines cannot be used if the callback is a templated and has
multiple template arguments. The comma separating the arguments
breaks the preprocessor argument handling. Using a templated function
is clearer and more idiomatic in c++.
2012-01-30 20:22:38 +01:00
Andreas Madsen
836344c90e Add disconnect method to forked child processes
This disconnect method allows the child to exit gracefully.
This also adds a disconnect event and connect property.
2012-01-30 16:35:27 +01:00
koichik
3fd13c6426 http: fix free http-parser too early
when the status code is 100 (Continue).

Fixes #2636.
2012-01-31 00:16:01 +09:00
Ben Noordhuis
b221fe9b29 timers: add v0.4 compatibility hack
If a timer callback throws and the user's uncaughtException handler ignores the
exception, other timers that expire on the current tick should still run.

If #2582 goes through, this hack should be removed.

Fixes #2631.
2012-01-30 14:12:23 +01:00
Brandon Benvie
52bd0f93bb core: make .deprecate() warn only once 2012-01-30 14:10:18 +01:00
Brandon Benvie
5403a8ce4c core: add NativeModule.prototype.deprecate
Formalize and cleanup handling of deprecated core methods.
2012-01-30 00:27:07 +01:00
Brandon Benvie
e3c0c86b28 Change removed process methods to be non-enumerable. 2012-01-29 22:17:31 +01:00
Dan VerWeire
e4afb2f724 tty: emit 'unknown' key event if key sequence not found
Add key.code and key.sequence -mad props go out to @TooTallNate
2012-01-28 17:01:04 +01:00
isaacs
ca4b91a1d0 Correct spelling of Ben Noordhuis 2012-01-27 17:08:02 -08:00
isaacs
5756d7916a Now working on 0.6.10 2012-01-27 16:54:40 -08:00
isaacs
f19e20d33f 2012.01.27, Version 0.6.9 (stable)
* dgram: Bring back missing functionality for Unix (Dan VerWeire, Roman Shtylman, Ben Noordnuis)
  - Note: Windows UDP support not yet complete.

* http: Fix parser memory leak (koichik)

* zlib: Fix #2365 crashes on invalid input (Nicolas LaCasse)

* module: fix --debug-brk on symlinked scripts (Fedor Indutny)

* Documentation Restyling (Matthew Fitzsimmons)

* Update npm to 1.1.0-3 (isaacs)

* Windows: fix regression in stat() calls to C:\ (Bert Belder)
2012-01-27 16:32:19 -08:00
Ben Noordhuis
4b6164ab49 uv: upgrade to 332b72e 2012-01-28 01:30:46 +01:00
Ben Noordhuis
22e23473ea uv: upgrade to 16124bb 2012-01-28 00:17:01 +01:00
isaacs
38651521a8 stdout ending test message correction 2012-01-27 13:42:49 -08:00
Ben Noordhuis
14b7c4327f uv: upgrade to 3de0411 2012-01-27 22:32:02 +01:00
Ben Noordhuis
8a413b076e uv: upgrade to 3f1bad2 2012-01-27 22:18:17 +01:00
isaacs
f98999cc16 Properly update npm to 1.1.0-3
Thanks @mscdex for spotting this.
2012-01-27 13:12:07 -08:00
Fedor Indutny
85a86b5fd6 waf: predict target arch for OSX 2012-01-27 20:37:30 +06:00
isaacs
ff0f0aeb40 Fix #2507 Raise errors less agressively when destroying stdio streams
Also, if an error is already provided, then raise the provided
error, rather than throwing it with a less helpful 'stdout cannot
be closed' message.

This is important for properly handling EPIPEs.
2012-01-26 17:55:44 -08:00
Dan VerWeire
a0119af0e4 test: handle unhandled dgram scenarios
- watch for the death of child processes and fail the test if they all die
	- use setTimeout to fail the test if responses are not received and processed in 5000ms
2012-01-26 16:33:56 -08:00
isaacs
5c0f039c9c Update npm to 1.1.0-3 2012-01-26 15:59:26 -08:00
Ben Noordhuis
352febe251 uv: upgrade to 9c76d0d 2012-01-27 00:56:32 +01:00
Ben Noordhuis
f89beaf3ac build: compile release build too if BUILDTYPE=Debug
It's backwards compatible with the old waf build system. If you want to compile
just the debug build, run `make -C out BUILDTYPE=Debug` instead.

Fixes #2615.
2012-01-26 23:49:57 +01:00
Fedor Indutny
c80abfa0e4 zlib: fix Failed to set dictionary issue 2012-01-25 23:35:35 +06:00
Fedor Indutny
ccf7b41a69 module: fix --debug-brk on symlinked scripts
* fixes #1519
2012-01-24 19:07:38 +01:00
Fedor Indutny
27c85727ed module: fix --debug-brk on symlinked scripts
* fixes #1519
2012-01-24 23:13:37 +06:00
Ben Noordhuis
e806ad39d0 net, tls, http: remove socket.ondrain
Replace the ondrain hack with a regular 'drain' listener. Speeds up the
bytes/1024 http benchmark by about 1.2%.
2012-01-24 15:57:50 +01:00
isaacs
5988872ff1 Merge branch 'v0.7.1-release' 2012-01-24 00:11:59 -08:00
koichik
a6f3451e25 http: fix test-http-should-keepalive.js is fail
3df7c90 was removed when conflict was resolved.
2012-01-24 13:57:20 +09:00
isaacs
77f2cb66d1 Now working on 0.7.2 2012-01-23 17:27:08 -08:00
isaacs
a74354735a 2012.01.23, Version 0.7.1 (unstable)
* Update V8 to 3.8.8

* Install node-waf by default (Fedor Indutny)

* crypto: Add ability to turn off PKCS padding (Ingmar Runge)

* v8: implement VirtualMemory class on SunOS (Ben Noordhuis)

* Add cluster.setupMaster (Andreas Madsen)

* move `path.exists*` to `fs.exists*` (Maciej Małecki)

* typed arrays: set class name (Ben Noordhuis)

* libuv bug fixes (Igor Zinkovsky, Ben Noordhuis, Dan VerWeire)
2012-01-23 17:26:20 -08:00
isaacs
40879f33cd Upgrade V8 to 3.8.8 2012-01-23 17:16:27 -08:00
isaacs
b1b16d117e udp: 'interface' is reserved word on windows. 2012-01-23 15:44:53 -08:00
Ben Noordhuis
2775c0e97e dgram: bring back setTTL() 2012-01-24 00:11:45 +01:00
Ben Noordhuis
46e86aa803 dgram: bring back setMulticastLoopback() 2012-01-24 00:11:45 +01:00
Ben Noordhuis
986e612557 uv: upgrade to b88bc43 2012-01-24 00:11:44 +01:00
Ben Noordhuis
57ddf5f50a test: fix typos in error messages 2012-01-24 00:11:44 +01:00
Ben Noordhuis
aef62a03ee test: join multicast group *after* binding 2012-01-24 00:11:44 +01:00
Ben Noordhuis
9037decb28 test: remove erroneous dropMembership() call
The socket is not part of any multicast group. Bug wasn't visible until 6999fb3.
2012-01-24 00:11:21 +01:00
Ben Noordhuis
6999fb3d1e dgram: make addMembership() and dropMembership() conform to v0.4 API
- throw on error, don't return an error code
2012-01-24 00:05:34 +01:00
Ben Noordhuis
fc6a9673c8 dgram: make setBroadcast() conform to v0.4 API
- don't return a value
2012-01-24 00:05:34 +01:00
Ben Noordhuis
ed111975a0 dgram: make setMulticastTTL() conform to v0.4 API
- throw if the ttl argument is not a number
- return the ttl argument (not particulary useful but it's what v0.4 did)

Note that the 0 < ttl < 256 check has *not* been reinstated. On Linux, -1 is a
valid argument to setsockopt(IPPROTO_IP, IP_TTL).
2012-01-24 00:05:34 +01:00
isaacs
f33a35e293 doc: trademark link must be absolute 2012-01-23 13:53:11 -08:00
isaacs
7b93eb0000 doc: Remove default border around logo for MSIE 2012-01-23 13:50:31 -08:00
isaacs
6768d2fc93 doc: Pixel-nudging 2012-01-23 13:11:33 -08:00
isaacs
5c0d11b12a doc: Add images to makefile 2012-01-23 13:11:33 -08:00
isaacs
5d7577c71a doctool: correct improperly nested ul/li handling 2012-01-23 13:11:33 -08:00
isaacs
4fd315192a Add images to doc_assets 2012-01-23 13:11:32 -08:00
Matthew Fitzsimmons
831c8199f6 Nodejs.org design refresh. 2012-01-23 13:11:32 -08:00
Fedor Indutny
667aae596c Merge branch 'v0.6'
Conflicts:
	ChangeLog
	doc/template.html
	lib/cluster.js
	lib/http.js
	lib/tls.js
	src/node.h
	src/node_version.h
	test/simple/test-cluster-kill-workers.js
2012-01-24 00:30:28 +06:00
Ben Noordhuis
2433eeb385 uv: upgrade to 1cca230 2012-01-23 13:35:36 +01:00
Igor Zinkovsky
6c0c00a205 fix windows build 2012-01-23 01:35:11 -08:00
Igor Zinkovsky
f5e742b264 upgrade libuv to edbabe6f83 2012-01-23 01:34:05 -08:00
Maciej Małecki
ff512634ac version: bump NODE_PATCH_VERSION
Patch version hasn't been bumped correctly in
72cbb7492c.
2012-01-22 23:10:32 +01:00
Ben Noordhuis
9edb984274 crypto: silence unused variable warning
`retry` is not used if SSL_PRINT_DEBUG is not defined.
2012-01-22 18:20:03 +01:00
koichik
827180097c test: fix test/simple/test-net-server-max-connections.js is racey
Fixes #1333.
2012-01-22 23:23:04 +09:00
koichik
93298afc4e test: for #2109 2012-01-22 17:35:28 +09:00
Brandon Benvie
f9014438c7 util: use getOwnPropertyDescripter
Change formatProperty in util.js to use Object.getOwnPropertyDescriptor
instead of __lookup[GS]etter__.

Use the cached value from the descriptor to reduce number of property
lookups from 3 to 1.

Fallback to standard lookup if the descriptor is empty. This doesn't
ever happen with normal JS objects (this function is called only when
the key exists) but apparently does with Node's custom ENV interface.

Fixes: #2109.
2012-01-22 17:29:40 +09:00
koichik
3df7c90c30 http: keep-alive should default with HTTP/1.1 server
As RFC 2616 says we should, assume that servers will provide a persistent
connection by default.

> A significant difference between HTTP/1.1 and earlier versions of
> HTTP is that persistent connections are the default behavior of any
> HTTP connection. That is, unless otherwise indicated, the client
> SHOULD assume that the server will maintain a persistent connection,
> even after error responses from the server.

> HTTP/1.1 applications that do not support persistent connections MUST
> include the "close" connection option in every message.

Fixes #2436.
2012-01-22 14:55:41 +09:00
Igor Zinkovsky
6d00c089e3 only ref non-default isolate loops 2012-01-21 14:44:48 -08:00
Maciej Małecki
e10ed097cb path fs: move path.exists* to fs.exists*
`path.exists*` functions show a deprecation warning and call functions
from `fs`. They should be removed later.

test: fix references to `path.exists*` in tests

test fs: add test for `fs.exists` and `fs.existsSync`

doc: reflect moving `path.exists*` to `fs`
2012-01-21 14:37:14 +01:00
Ben Noordhuis
56e34c2f81 http: fix deprecation warning module ID
Mea culpa, I told @mmalecki wrong
2012-01-21 14:34:33 +01:00
Dan VerWeire
f2b1f57f74 dgram: reintroduce setMulticastTTL()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:26:09 +01:00
Dan VerWeire
f749338e1e dgram: reintroduce setBroadcast()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:26:04 +01:00
Roman Shtylman
a38fd6056c dgram: reintroduce addMembership() and dropMembership()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:21:51 +01:00
Ben Noordhuis
08ab306afd uv: upgrade to 497b1ec 2012-01-21 03:14:15 +01:00
Igor Zinkovsky
de78922b12 ref isolate loop 2012-01-20 18:03:05 -08:00
koichik
35fe3eb5c7 http: reduce creating http-parser instances
Fixes #2577.
2012-01-20 16:24:01 -08:00
Nicolas LaCasse
40c93486e8 Fix #2365 zlib crashing on invalid input
Fix zlib crashes on error due to improper use of removeListener
in the error handler
2012-01-20 13:12:32 -08:00
Andreas Madsen
f9a47debfc Add cluster.setupMaster
Fixes #2470
2012-01-20 13:09:56 -08:00
isaacs
f25ec0782e Add missing ChangeLog item re: fs.stat improvement
This was a very significant improvement that should have been called out
explicitly.

I added 'review all libuv changes' to my build checklist.  It won't
happen again.  Sorry, @igorzi.
2012-01-20 10:17:48 -08:00
Ben Noordhuis
6b5853794d build: disable NDEBUG in release builds for now
assert() sanity checks are a good thing.
2012-01-20 16:00:27 +01:00
Ben Noordhuis
4e5247772d fs, handle_wrap: use Loop(), not uv_default_loop()
Using the default loop will fail in unexpected and interesting ways when
isolates are used.
2012-01-20 15:57:50 +01:00
Shigeki Ohtsu
2156e5eca1 fs: don't assert on uv_fs_*() errors
Pass errors to the JS callbacks, don't assert in C++ land.

Fixes among other things the case where Node aborts because uv_fs_futimes()
returns ENOSYS.
2012-01-20 14:46:07 +01:00
isaacs
ec1d1ee61f Now working on 0.6.9 2012-01-19 21:15:12 -08:00
isaacs
d18cebaf8a 2012.01.19, Version 0.6.8 (stable)
* Update V8 to 3.6.6.19

* Numeric key hash collision fix for V8 (Erik Corry, Fedor Indutny)

* Add missing TTY key translations for F1-F5 on Windows (Brandon Benvie)

* path.extname bugfix with . and .. paths (Bert Belder)

* cluster: don't always kill the master on uncaughtException (Ben
* Noordhuis)

* Update npm to 1.1.0-2 (isaacs)

* typed arrays: set class name (Ben Noordhuis)

* zlib binding cleanup (isaacs, Bert Belder)

* dgram: use slab memory allocator (Michael Bernstein)

* fix segfault #2473
2012-01-19 18:29:43 -08:00
isaacs
4afc46d7bc Upgrade V8 to 3.6.6.19 2012-01-19 18:29:11 -08:00
Ben Noordhuis
0f33768059 v8: link against libsocket and libnsl on sunos
The V8 debugger requires BSD socket support. Solaris-like systems obviously
support that but you need to link against the right libraries, it's not part of
libc.
2012-01-19 23:09:00 +00:00
Ben Noordhuis
90587b1ccb v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Re-applies 4908e5bf7a.
2012-01-19 22:46:20 +00:00
Fedor Indutny
4fdec07bd8 Land number collision fix for v8 3.6 by Erik Corry
Update with fixes from: http://codereview.chromium.org/9190001/
2012-01-19 21:55:48 +06:00
Artur Adib
e282c0a081 docs: document common add-on design patterns 2012-01-19 16:31:36 +01:00
Ingmar Runge
0ca30187cf Crypto: adding ability to turn off automatic PKCS padding 2012-01-18 21:20:25 +01:00
Brandon Benvie
f7b612550a Add missing TTY key translations for F1-F5 on Windows 2012-01-18 16:00:55 +01:00
Bert Belder
d489a01f81 Make path.extname do the right thing when the last path component is . or ..
Closes GH-2526
2012-01-18 15:21:58 +01:00
Ben Noordhuis
ad42a82df5 build: remove node_debug from config.gypi 2012-01-18 02:00:43 +01:00
Ben Noordhuis
d44ce97909 cluster: don't always kill the master on uncaughtException
uncaughtException handlers installed by the user override the default one that
the cluster module installs, the one that kills off the master process.

Fixes #2556.
2012-01-18 00:45:02 +01:00
Dan Williams
091ab850aa docs: replace expresso with mocha in appendix 1 2012-01-17 23:30:58 +01:00
Dan Williams
29ce743385 docs: fix syntax error on cluster api docs 2012-01-17 23:29:16 +01:00
Ben Noordhuis
e493b29598 build: respect --debug configure switch 2012-01-17 23:03:21 +01:00
Andreas Madsen
4a38795b6f Add failing test case: parent on('exit')
Fixes #2564
2012-01-17 11:43:21 -08:00
Ryan Dahl
54ad2f6cbb Link to Marak's module rap in community page 2012-01-17 11:34:16 -08:00
Bert Belder
892056bf97 tests: fix more lint issues 2012-01-17 20:16:49 +01:00
Andreas Madsen
4865063924 Tests: fix jslint issues 2012-01-17 19:45:09 +01:00
Andreas Madsen
70884875c9 Allow calling fork() without args or options
Closes GH-2424
2012-01-17 19:07:57 +01:00
Andreas Madsen
ca6ededbd1 child_process: add errno property to exceptions
In case of a write failure when using fork() an error would be thrown. The
thrown exception was missing the `errno` property.
2012-01-17 18:37:02 +01:00
Fedor Indutny
1695332941 Land number collision fix for v8 3.6 by Erik Corry
- If V8 snapshots are enabled then the hash is only randomized at build time.

---
backport @10366, @10367 and @10402 to 3.6

Add seed to hash of numeric keyed properties.

Minor cleanups of numeric seeded hashing patch.

Split NumberDictionary into a randomly seeded and an unseeded version.
We don't want to randomize the stub cache.

Review URL: http://codereview.chromium.org/9190001/
2012-01-17 22:22:52 +06:00
koichik
534df2f8d2 tls: fix double 'error' events on HTTPS Requests
Fixes #2549.
2012-01-17 17:09:27 +01:00
Ben Noordhuis
549443a7cc typed arrays: set class name
Make obj.toString and Object.prototype.toString work correctly for typed arrays.
2012-01-17 16:20:39 +01:00
Ryan Dahl
21dd53f9d3 Makefile: Don't force user to run ./configure first 2012-01-16 23:28:29 -08:00
Fedor Indutny
6e76a7cb45 installer: install node-waf
* added --without-waf flag for configure script
2012-01-16 21:56:05 -08:00
Ryan Dahl
72cbb7492c Now working on v0.7.1-pre 2012-01-16 19:46:36 -08:00
Ryan Dahl
9cc55dca6f Bump version to v0.7.0 2012-01-16 19:00:41 -08:00
Ryan Dahl
716f5bc66b Add make dist-upload 2012-01-16 18:52:36 -08:00
Ryan Dahl
317ba9fb64 Fix 'make dist' 2012-01-16 18:40:29 -08:00
Igor Zinkovsky
2c1025706b upgrade libuv to 52511b9ddc 2012-01-16 17:24:53 -08:00
Igor Zinkovsky
ab18d72b35 fix windows build 2012-01-16 16:46:23 -08:00
Ryan Dahl
ca2a047b8e Merge remote branch 'origin/v0.6'
Conflicts:
	deps/uv/src/win/util.c
	src/udp_wrap.cc
2012-01-16 15:20:26 -08:00
Ryan Dahl
7584225873 Upgrade libuv to joyent/libuv@f5bd21f 2012-01-16 15:15:34 -08:00
isaacs
25410096b4 Update npm to 1.1.0-2 2012-01-16 15:06:16 -08:00
Igor Zinkovsky
95844451b6 fix windows build 2012-01-16 14:44:49 -08:00
Ryan Dahl
60040a4f36 Upgrade V8 to 3.8.6 2012-01-16 14:37:57 -08:00
Ryan Dahl
1afd0b52fe Revert "gyp: install node-gyp"
No.

This reverts commit 3d1476a316.
2012-01-16 14:07:35 -08:00
Fedor Indutny
3d1476a316 gyp: install node-gyp
* fixes #2480
2012-01-17 02:44:26 +06:00
Maciej Małecki
d5047f5fe6 http: use util._deprecationWarning for deprecation warning 2012-01-16 19:45:14 +01:00
Fedor Indutny
f0c629a36b uv: upgrade to e7758e1 2012-01-16 20:18:37 +06:00
Fedor Indutny
03e689fae4 Revert "util: always display a warning for module in debug mode"
This reverts commit df62005ece.
2012-01-16 19:33:16 +06:00
Maciej Małecki
df62005ece util: always display a warning for module in debug mode 2012-01-16 19:19:56 +06:00
Fedor Indutny
23de33968f querystring: fix maxKeys = 0 is ignored 2012-01-16 16:36:24 +06:00
Fedor Indutny
f1678bfc65 http: do not accept headers if limit is exceeded
* fix limiting when parser was reused
* fix maxHeadersCount = 0 is ignored ( credit to @koichik )
* add test-http-max-headers-count.js ( credit to @koichik )
2012-01-16 16:36:23 +06:00
Ben Noordhuis
03cb903e7e isolates: remove references to uv_thread_self()
uv_thread_self() is difficult to implement on Windows in a way where the return
value is valid across threads. It's already been removed from upstream libuv.
2012-01-16 01:41:29 +01:00
Fedor Indutny
8a98c2f1d8 http, querystring: added limits to prevent DoS 2012-01-16 02:45:05 +06:00
Ben Noordhuis
93465d3051 build: support --dest-cpu configure switch again 2012-01-15 16:50:58 +01:00
Fedor Indutny
220288725f test-eio-limit: add missing copyright headers 2012-01-14 23:51:53 +06:00
Fedor Indutny
e03b42d1bb Add failing test-eio-limit.js 2012-01-14 23:48:56 +06:00
Ben Noordhuis
f0c1376e07 net: make .write() throw on bad input
Passing a non-buffer or non-string argument to Socket.prototype.write triggered
an assert:

  Assertion failed: (Buffer::HasInstance(args[0])), function Write,
  file ../src/stream_wrap.cc, line 289.

Fixes #2532.
2012-01-14 02:13:24 +01:00
Guillermo Rauch
766f609838 website: Add "Api Docs" button next to "Download"
* Added Docs button and `button` class.
* Refactored download button style into `.button`
* Applied color overrides for download/docs buttons.
* Pointed docs link to latest available docs.
2012-01-12 14:24:40 -08:00
mrb
bd9fa2e841 dgram: use slab memory allocator
Change udp memory allocation scheme from uv_buf_init to slab allocation. Takes
slab allocation scheme from stream_wrap.
2012-01-12 17:34:15 +01:00
Nathan Rajlich
f2ba4cef2a build: remove the old -DPLATFORM="mac" define
To prevent redefinition warnings.
2012-01-12 15:11:02 +01:00
Nathan Rajlich
9ff86a2848 build: set process.platform to "darwin" on OS X
This is consistent with the old waf build system, and doesn't break old scripts
that are expecting the value to be "darwin".

Fixes #2518.
2012-01-12 15:10:11 +01:00
Ben Noordhuis
465e22e62f docs: clarify filename argument of vm.* functions 2012-01-12 14:44:41 +01:00
koichik
7dffbaf2ce http: Upgrade/CONNECT request should detach its socket earlier
With Upgrade or CONNECT request, http.ClientRequest emits 'close' event
after its socket is closed. However, after receiving a response, the socket
is not under management by the request.

http.ClientRequest should detach the socket before 'upgrade'/'connect'
event is emitted to pass the socket to a user. After that, it should
emit 'close' event immediately without waiting for closing of the socket.

Fixes #2510.
2012-01-12 14:17:19 +09:00
Igor Zinkovsky
247d0da188 update libuv to 855764406e
fixes #2521
2012-01-11 19:35:03 -08:00
Fedor Indutny
71ae175319 zlib: reset() method for deflate/inflate streams
* ammended test-zlib-dictionary to cover reusing streams
2012-01-12 03:19:19 +06:00
Fedor Indutny
89556f5a2f zlib: C++ style fixes for dictionary 2012-01-12 03:11:31 +06:00
Fedor Indutny
9e6957b0a5 Merge branch 'v0.6'
Conflicts:
	src/handle_wrap.cc
	src/node_zlib.cc
	src/process_wrap.cc
2012-01-12 02:17:44 +06:00
Fedor Indutny
07701e7cc8 zlib: C++ style fixes 2012-01-12 01:43:49 +06:00
Mathias Bynens
8abb73ef58 punycode: Update to v0.3.0 2012-01-11 10:42:39 +01:00
Maciej Małecki
b073989e17 makefile: ignore lib/punycode.js while linting
`punycode` is a third party code which generates a lot of lint errors.
Upstream was contacted in order to fix it in bestiejs/punycode.js#6, but
request was denied.

Therefore, it's reasonable to exclude this file from linting process.

Ref #2456.
2012-01-11 10:42:33 +01:00
Andreas Madsen
c8108aad83 child_process: fix typo in internal message event name 2012-01-11 09:59:50 +01:00
isaacs
8cca30f31b zlib binding cleanup
* Add assert to prevent parallel writes
* Embed request object instead of using new/delete
* Remove unnecessary WorkReqWrap in favor of uv_work_t
* Use container_of instead of req->data

Along with 2d8af39acc and
0ad2717fd8, this should Fix #2504.
2012-01-10 16:42:52 -08:00
Ryan Dahl
290bc0c067 Use .jpg instead of .bmp for .msi
smaller.
2012-01-10 14:26:22 -08:00
Maciej Małecki
4d49469d0d child_process: fix typo in internal message event name 2012-01-10 23:16:07 +01:00
Ryan Dahl
e1b829d2a5 Add broken test-isolates3.js 2012-01-10 12:04:19 -08:00
Ben Noordhuis
0ad2717fd8 Make sure that zlib contexts are not garbage collected when busy 2012-01-10 21:01:19 +01:00
Bert Belder
2d8af39acc Fix memory leak in node_zlib 2012-01-10 21:01:18 +01:00
Ryan Dahl
d4ee61ffc7 Add failing test-isolates2.js 2012-01-10 11:48:02 -08:00
Ryan Dahl
e6a30bd107 Fix #2473
Tested in production.

See also http://code.google.com/p/v8/issues/detail?id=1889
2012-01-10 10:49:38 -08:00
Fedor Indutny
4cbcdb4b2c test: make debugger-repl tests work with isolates 2012-01-10 16:48:45 +01:00
Ben Noordhuis
7cee968c21 isolates: add process-global list of isolates 2012-01-10 16:46:41 +01:00
Fedor Indutny
6b2091b58a debug threads 2012-01-10 02:28:49 +01:00
Fedor Indutny
99679c6430 IsolateDebugger C++ 2012-01-10 02:28:42 +01:00
Fedor Indutny
44e7033279 fixed debugger segfaults 2012-01-10 02:19:14 +01:00
Fedor Indutny
a5f74b4da7 added isolates support 2012-01-10 02:19:14 +01:00
Ben Noordhuis
97e4b3a7bf isolates: drain message queue completely 2012-01-10 02:09:08 +01:00
Andreas Madsen
787f62de8c Improve test-child-process-silent 2012-01-09 13:04:13 -08:00
Ryan Dahl
b28e700ebd require('sys') now throws
To be removed in v0.9
2012-01-09 12:59:28 -08:00
Ben Noordhuis
b07acb3808 child_process: fix segfault after failed spawn
The process handle is uninitialized when uv_spawn() fails so don't export the
handle to JS land when that happens. Attempts to close the uninitialized handle
resulted in segmentation faults and memory corruption.

Fixes #2481.
2012-01-09 20:54:37 +01:00
Ben Noordhuis
d5d043f2d7 handle_wrap: guard against uninitialized handle or double close 2012-01-09 20:54:37 +01:00
Ryan Dahl
8b28d599a7 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	configure
	src/node_version.h
2012-01-09 11:20:22 -08:00
Ben Noordhuis
cc5cea35b0 uv: upgrade to 803f5a0 2012-01-09 15:46:30 +01:00
Ryunosuke SATO
22d7fe1206 events: fix checking max listeners with 1
Fixes #2490.
2012-01-09 04:02:01 +01:00
koichik
08a91acd76 http: better support for CONNECT method.
Introduces 'connect' event on both client (http.ClientRequest) and
server (http.Server).

Refs: #2259, #2474.
Fixes #1576.
2012-01-09 03:51:06 +01:00
koichik
c1a63a9e90 tls: Allow establishing secure connection on the existing socket
This is necessary to use SSL over HTTP tunnels.

Refs #2259, #2474.
Fixes #2489.
2012-01-09 02:31:46 +01:00
koichik
70033bd960 net: make connect() accept options
This makes API even with tls.connect().
Refs #1983.

See also:
http://groups.google.com/group/nodejs-dev/msg/3b6dbcc4a9a82d99

Fixes #2487.
2012-01-09 02:18:39 +01:00
Ben Noordhuis
9a79bb694e Avoid unnecessary buffer to string conversion.
Speeds up the benchmark below by about 680% (0.5s versus 3.4s on my Core 2 Duo).

    var crypto = require('crypto');
    var hash = crypto.createHash('sha1');
    var data = new Buffer(1024);
    for (var i = 0; i < 128 * 1024; ++i) hash.update(data);

Fixes #2494.
2012-01-09 00:50:26 +01:00
Ben Noordhuis
472a72d27f build: honour the PYTHON environment variable
Overrides the path to the python binary. Defaults to `python`.
2012-01-08 21:25:04 +01:00
Maciej Małecki
0321adbcf4 tls doc: update docs to reflect API change
Refs #1983.
2012-01-08 11:13:36 +01:00
Maciej Małecki
39484f49ef test tls: make tests use new tls.connect API
Refs #1983.
2012-01-08 11:13:28 +01:00
Maciej Małecki
df0edf5fe6 https: make https use new tls.connect API
Refs #1983.
2012-01-08 11:13:18 +01:00
Maciej Małecki
4b4d059791 tls: make tls.connect accept port and host in options
Previous API used form:

    tls.connect(443, "google.com", options, ...)

now it's replaced with:

    tls.connect({port: 443, host: "google.com", ...}, ...)

It simplifies argument parsing in `tls.connect` and makes the API
consistent with other parts.

Fixes #1983.
2012-01-08 11:12:56 +01:00
koichik
9ef3c6238b docs: fix ChangeLog 2012-01-07 07:51:51 +01:00
koichik
57653added docs: small changes. 2012-01-07 06:44:35 +01:00
isaacs
ff4096f958 Now working on v0.6.8 2012-01-06 17:36:39 -08:00
isaacs
d5a189acef 2012.01.06, Version 0.6.7 (stable)
* V8 hash collision fix (Breaks MIPS) (Bert Belder, Erik Corry)

* Upgrade V8 to 3.6.6.15

* Upgrade npm to 1.1.0-beta-10 (isaacs)

* many doc updates (Ben Noordhuis, Jeremy Martin, koichik, Dave Irvine,
  Seong-Rak Choi, Shannen, Adam Malcontenti-Wilson, koichik)

* Fix segfault in node_http_parser.cc

* dgram, timers: fix memory leaks (Ben Noordhuis, Yoshihiro Kukuchi)

* repl: fix repl.start not passing the `ignoreUndefined` arg (Damon Oehlman)

* #1980: Socket.pause null reference when called on a closed Stream (koichik)

* #2263: XMLHttpRequest piped in a writable file stream hang (koichik)

* #2069: http resource leak (koichik)

* buffer.readInt global pollution fix (Phil Sung)

* timers: fix performance regression (Ben Noordhuis)

* #2308, #2246: node swallows openssl error on request (koichik)

* #2114: timers: remove _idleTimeout from item in .unenroll() (James Hartig)

* #2379: debugger: Request backtrace w/o refs (Fedor Indutny)

* simple DTrace ustack helper (Dave Pacheco)

* crypto: rewrite HexDecode without snprintf (Roman Shtylman)

* crypto: don't ignore DH init errors (Ben Noordhuis)
2012-01-06 16:31:03 -08:00
isaacs
d84a6ba3d1 Remove snapshot from Mac binary build 2012-01-06 16:31:03 -08:00
Ryan Dahl
bca88b2dc1 support nosnapshot in vcbuild.bat 2012-01-06 16:26:16 -08:00
Ryan Dahl
8e5674fb5c Upgrade V8 to 3.8.5 2012-01-06 13:03:06 -08:00
Ryan Dahl
be67fa7e09 Revert "crypto: add SecureContext.clearOptions() method"
API addition needs to go in master. Also openssl-0.9.8k doesn't have
SSL_CTX_clear_options().

This reverts commit 6f8839d2ac.
2012-01-06 12:01:58 -08:00
Ryan Dahl
8bd80f4911 fix test-sys for hash randomization
broken in 4a899c9274
2012-01-06 10:22:24 -08:00
Bert Belder
4a899c9274 Land hash collision fix for V8 3.6 by Erik Corry.
- If V8 snapshots are enabled then the hash is only randomized at build time.
- Breaks MIPS

---
Backport hash collision workaround to 3.6.
This is made up of 9956, 10351, 10338 and 10330.
This change bakes the string hash key into the snapshot, so
it is determined at build time for shapshot configs.
Review URL: http://codereview.chromium.org/9124004
2012-01-06 17:02:01 +01:00
koichik
dd9593ccc4 http: fix ServerResponse does not emit 'close'
Refs #2453.
2012-01-06 15:45:21 +09:00
Ben Noordhuis
42281124d4 child_process: add isolates support
Passing an options object with {thread:true} to .fork() or .spawn() will run the
target script in a thread instead of a separate process.
2012-01-06 00:47:14 +01:00
Ben Noordhuis
1e73e4c62f isolates: remove global isolates list
No longer necessary, each isolate now waits until its subordinate isolates have
exited.
2012-01-06 00:45:27 +01:00
Ben Noordhuis
dadc30318f isolates: implement message passing
Parent and child isolates can now pass arbitrary binary messages between each
other. The messages are sent and received through a thread-safe queue that
wakes up the event loop of the receiving thread.
2012-01-06 00:42:55 +01:00
Ben Noordhuis
075acfa2d6 uv: upgrade to 56a31f0 2012-01-06 00:00:40 +01:00
Emerson Macedo
aa67b1f375 fs: add appendFile() and appendFileSync() functions 2012-01-05 21:39:57 +01:00
Mikael Bourges-Sevenier
5b05429bf0 typed arrays: add Buffer -> TypedArray constructor
- create a typed array from a node::Buffer object
- update TypedArray::set() to spec
- add TypedArray::get() method
2012-01-05 20:56:41 +01:00
isaacs
78dbb4b5b1 npm@1.1.0-beta-10 2012-01-05 11:22:49 -08:00
Shigeki Ohtsu
55c21970fd build: compile without -fvisibility=hidden
Fixes symbol lookup errors when loading an addon module on Linux.
2012-01-05 16:50:55 +01:00
Shigeki Ohtsu
a993d22c0f build: set product_prefix to empty for Linux 2012-01-05 16:50:44 +01:00
Ben Noordhuis
760928bfad docs: mention that python 2.6 or 2.7 is required 2012-01-05 16:44:22 +01:00
koichik
baebd30eee http: use self insted of this 2012-01-05 17:43:00 +09:00
Andreas Madsen
e2f1e50c60 typos
fixes #2465
2012-01-05 00:31:49 -08:00
Andreas Madsen
5f08c3cfa1 cluster improvements: Worker class and isolate internal messages
Fixes #2388
2012-01-04 18:30:19 -08:00
Ryan Dahl
3452477dcb Update address in CLA 2012-01-04 11:20:50 -08:00
Ben Noordhuis
e21643d618 build: fix npm-cli.js install 2012-01-04 16:36:08 +01:00
Ryan Dahl
f3da6c6c04 Potential fix for #2438
- Save StringPtr if the header hasn't been completely received yet after one
  packet.
- Add one to num_fields and num_values. They were actually one less than the
  number of fields and values.
- Remove always_inline makes debugging difficult, and has negligible
  performance benefits.
2012-01-03 17:43:39 -08:00
Ryan Dahl
2cde498319 Add another test to test-http-parser-bad-ref.js demoing #2438 2012-01-03 17:15:25 -08:00
Ryan Dahl
557fc396b4 Upgrade V8 to 3.8.4 2012-01-03 11:46:53 -08:00
Ben Noordhuis
c123ac05dc Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	src/udp_wrap.cc
2012-01-02 12:29:39 +01:00
Ben Noordhuis
6f8839d2ac crypto: add SecureContext.clearOptions() method
SecureContext.setOptions() is backed by SSL_CTX_set_options() which, contrary to
what the name suggests, is additive: it doesn't set options, it adds them to the
already active options.

Hence the need for SecureContext.clearOptions(), which lets you unset active
options.
2012-01-02 12:02:07 +01:00
Ben Noordhuis
884f689efe test: add #2293 regression test
Creating a file event watcher with fs.watch({persistent:false}) should not block
the event loop.
2012-01-02 10:48:35 +01:00
Ben Noordhuis
41f2725639 uv: upgrade to 38fc6ad 2012-01-02 10:43:10 +01:00
Ben Noordhuis
c2fb062f60 docs: fix typo on community page 2012-01-01 23:39:29 +01:00
isaacs
8e57398b20 Fix #2034 repl message for .clear when useGlobal=true 2011-12-31 03:20:41 +01:00
Ben Noordhuis
539598b11f test: don't create temp files in fixtures dir 2011-12-31 03:17:19 +01:00
Ben Noordhuis
8b2abed03d bench: add /echo endpoint to http_simple
Copies the POST request data verbatim into the response body.
2011-12-30 02:03:10 +01:00
Ryan Dahl
432a2e4d39 Add test for #2438
Unfortunately valgrind must be used to see the bad read. It would be nice if
we could improve this test to cause a segfault.
2011-12-29 13:37:03 -08:00
Ryan Dahl
4b3824b682 Merge remote branch 'origin/isolates2' 2011-12-29 11:57:40 -08:00
Ben Noordhuis
c24276f008 net: defer net.Server 'close' event to next tick 2011-12-29 19:30:07 +01:00
Ben Noordhuis
3f5bb15f35 dgram: fix memory leak in error path 2011-12-29 14:57:53 +01:00
Damon Oehlman
744ed46970 repl: fix repl.start not passing the ignoreUndefined arg to the REPLServer constructor 2011-12-29 14:46:04 +01:00
Jeremy Martin
8c3a757ffc docs: tiny typo in http.markdown 2011-12-29 14:35:52 +01:00
Ben Noordhuis
0c3b357985 Merge branch 'isolates2' 2011-12-29 01:56:58 +01:00
Ben Noordhuis
add4cfcf5f Merge branch 'v0.6'
Conflicts:
	src/platform_win32.cc
2011-12-29 01:56:44 +01:00
Ben Noordhuis
fa43f04f6a Include ngx-queue.h, fix Windows build. 2011-12-29 01:56:11 +01:00
Ben Noordhuis
25ca13ec1a uv: upgrade to 85f6b79 2011-12-29 01:56:11 +01:00
Ben Noordhuis
cdb5864fc3 Make msbuild run in parallel. 2011-12-29 01:56:11 +01:00
Ryan Dahl
4428b70cba Add isolate version of test-child-process-fork 2011-12-29 01:56:11 +01:00
Ryan Dahl
649dbbbd83 Add process.features.isolates 2011-12-29 01:56:11 +01:00
Ryan Dahl
5fc0c27d5c move isolate V8 functions out of node.cc 2011-12-29 01:56:11 +01:00
Ryan Dahl
20ba454ef9 Add node::Loop() and don't inc node_isolate.h in *.cc
node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0
2011-12-29 01:56:11 +01:00
Ben Noordhuis
dd0188ec08 uv: upgrade to d6a06b8 2011-12-29 01:56:11 +01:00
Ryan Dahl
40c98a977b Add shared-buffer isolate addon test 2011-12-29 01:56:11 +01:00
Ryan Dahl
f168f7d702 Remove node_isolate.h from node.h 2011-12-29 01:56:10 +01:00
Ryan Dahl
2c560c5405 Change isolate test to demo EIO bug 2011-12-29 01:56:10 +01:00
Ryan Dahl
a0f3eb015a node_file.cc should use NODE_LOOP() 2011-12-29 01:56:10 +01:00
Ryan Dahl
268476549e Join all threads at end of main thread
Require reorganizing the isolates somewhat.

Add a very simple test.
2011-12-29 01:56:10 +01:00
Ryan Dahl
4d02e77f44 Move prog_start_time init after isolate assigned 2011-12-29 01:56:10 +01:00
Ryan Dahl
4f46ee4400 Add link-list of all isolates 2011-12-29 01:56:10 +01:00
Ryan Dahl
863f17f68c Move uv loop initialization into isolate 2011-12-29 01:56:10 +01:00
Ryan Dahl
45bb10cc32 move thread_id to node_isolate.cc 2011-12-29 01:56:10 +01:00
Ben Noordhuis
6eeb59abf6 isolates: replace SLIST with ngx_queue_t 2011-12-29 01:56:10 +01:00
Ben Noordhuis
809fdf26fb isolates: add process.tid property, pass args to isolate 2011-12-29 01:56:10 +01:00
Ben Noordhuis
ca19e792c6 isolates: have node::Isolate manage the v8::Context 2011-12-29 01:56:10 +01:00
Ben Noordhuis
ea97d6ed5f isolates: rename node::Isolate member isolate_ to v8_isolate_ 2011-12-29 01:56:10 +01:00
Ben Noordhuis
5866f1a9aa Separate per-process and per-thread init logic. 2011-12-29 01:56:10 +01:00
Ben Noordhuis
2df81c57f6 Remove per-process globals from per-thread context. 2011-12-29 01:56:10 +01:00
Ryan Dahl
828bf50a0e isolates have globals stored in struct globals 2011-12-29 01:56:09 +01:00
Ben Noordhuis
eb6e60432b isolates: add _newIsolate() and _joinIsolate() to process object 2011-12-29 01:56:09 +01:00
Ben Noordhuis
09dc577931 build: move internals to separate header file 2011-12-29 01:56:09 +01:00
Ben Noordhuis
b3d4938e3e build: add --without-isolates configure switch 2011-12-29 01:56:09 +01:00
Ben Noordhuis
66116924ed isolates: add atexit() functionality for isolates 2011-12-29 01:56:09 +01:00
Ben Noordhuis
356992fe4d isolates: isolate-ify the main loop 2011-12-29 01:56:09 +01:00
Ben Noordhuis
e9f8e28426 uv: upgrade to f5c2a4a 2011-12-29 01:56:09 +01:00
Ben Noordhuis
bc7bae1d6b Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	src/platform_win32.cc
2011-12-29 01:49:10 +01:00
Ben Noordhuis
5427311ae6 uv: upgrade to 0db56ea 2011-12-29 01:43:24 +01:00
Ben Noordhuis
9143b43e98 Include ngx-queue.h, fix Windows build. 2011-12-29 00:59:06 +01:00
Ben Noordhuis
2afd20b542 uv: upgrade to 85f6b79 2011-12-29 00:18:23 +01:00
Ben Noordhuis
59faab4330 Make msbuild run in parallel. 2011-12-28 23:56:53 +01:00
Ryan Dahl
b7c05e1b75 Upgrade V8 to 3.8.3 2011-12-28 14:13:50 -08:00
Ryan Dahl
448c5e07ca Revert "Add HandleScope to http-parser binding"
This commit did not actually fix the production crashes.

This reverts commit 73cf8e82e7.
2011-12-28 14:08:19 -08:00
Andreas Madsen
d483acc5d9 test: remove internet test from test/simple/ 2011-12-28 17:22:29 +01:00
koichik
b037c16f55 test: fix test-sys.js fails if the time zone is not CET
Fixes #2423.
2011-12-28 15:18:11 +09:00
koichik
a848a3efbf net: fix Socket.pause null reference when called on a closed Stream
Fixes #1980.
2011-12-28 15:13:57 +09:00
Ryan Dahl
b319699132 Add isolate version of test-child-process-fork 2011-12-27 18:11:32 -08:00
Ryan Dahl
036e59394a Add process.features.isolates 2011-12-27 13:06:25 -08:00
Ryan Dahl
533a455274 move isolate V8 functions out of node.cc 2011-12-27 12:54:25 -08:00
Ryan Dahl
9d792f3183 Add node::Loop() and don't inc node_isolate.h in *.cc
node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0
2011-12-27 12:54:25 -08:00
Ben Noordhuis
c481f97a9c uv: upgrade to d6a06b8 2011-12-27 12:54:24 -08:00
Ryan Dahl
02f24f54ba Add shared-buffer isolate addon test 2011-12-27 12:54:24 -08:00
Ryan Dahl
87bb848268 Remove node_isolate.h from node.h 2011-12-27 12:54:23 -08:00
Ryan Dahl
8c476371f5 Change isolate test to demo EIO bug 2011-12-27 12:54:23 -08:00
Ryan Dahl
a8506c41c6 node_file.cc should use NODE_LOOP() 2011-12-27 12:54:23 -08:00
Ryan Dahl
41062e71a7 Join all threads at end of main thread
Require reorganizing the isolates somewhat.

Add a very simple test.
2011-12-27 12:54:23 -08:00
Ryan Dahl
2d8c1fe1ed Move prog_start_time init after isolate assigned 2011-12-27 12:54:23 -08:00
Ryan Dahl
1a433b9637 Add link-list of all isolates 2011-12-27 12:54:23 -08:00
Ryan Dahl
78a25696f1 Move uv loop initialization into isolate 2011-12-27 12:54:23 -08:00
Ryan Dahl
39a492799d move thread_id to node_isolate.cc 2011-12-27 12:54:22 -08:00
Ben Noordhuis
469cb1b7b7 isolates: replace SLIST with ngx_queue_t 2011-12-27 12:54:22 -08:00
Ben Noordhuis
d329fc7b09 isolates: add process.tid property, pass args to isolate 2011-12-27 12:54:22 -08:00
Ben Noordhuis
3063ba0800 isolates: have node::Isolate manage the v8::Context 2011-12-27 12:54:22 -08:00
Ben Noordhuis
9d71e74491 isolates: rename node::Isolate member isolate_ to v8_isolate_ 2011-12-27 12:54:22 -08:00
Ben Noordhuis
3aadd4fe76 Separate per-process and per-thread init logic. 2011-12-27 12:54:22 -08:00
Ben Noordhuis
8a538ce372 Remove per-process globals from per-thread context. 2011-12-27 12:54:22 -08:00
Ryan Dahl
9caeceef6d isolates have globals stored in struct globals 2011-12-27 12:54:21 -08:00
Ben Noordhuis
edbec3f8f3 isolates: add _newIsolate() and _joinIsolate() to process object 2011-12-27 12:54:21 -08:00
Ben Noordhuis
a778a25cab build: move internals to separate header file 2011-12-27 12:54:21 -08:00
Ben Noordhuis
39e2c469db build: add --without-isolates configure switch 2011-12-27 12:54:20 -08:00
Ben Noordhuis
2a7a2ca986 isolates: add atexit() functionality for isolates 2011-12-27 12:54:20 -08:00
Ben Noordhuis
c3346f6760 isolates: isolate-ify the main loop 2011-12-27 12:54:20 -08:00
Ben Noordhuis
0d5a6b2d9d uv: upgrade to f5c2a4a 2011-12-27 12:54:19 -08:00
koichik
e1c043f43a docs: fix docs to not suggest variable leaks
Fixes #2106.
2011-12-27 17:43:58 +09:00
koichik
a337ac7584 http: fix XMLHttpRequest piped in a writable file stream hangs next request
Fixes #2263.
2011-12-27 17:42:37 +09:00
koichik
b962ff35dd tls: fix test-https-client-reject fails
Fixes #2417.
2011-12-27 17:33:23 +09:00
Ben Noordhuis
70e6f3f115 docs: document http.Server.close() semantics 2011-12-26 23:30:25 +01:00
koichik
e6b6075024 http: Avoid 'data'/'end' events after pause()
Fixes #1040.
2011-12-26 16:14:47 +01:00
koichik
7aa5924dc6 http: fix resource leak
Fixes #2069
2011-12-26 08:05:35 +01:00
Ben Noordhuis
0de6ec5f08 win: fix mismatched new[]/delete 2011-12-26 03:27:28 +01:00
Ben Noordhuis
ed5bad754c bench: fix use of fd after close 2011-12-26 03:23:34 +01:00
Ryan Dahl
48a9a2d355 Add deprecation message for http.Client 2011-12-23 17:42:27 -08:00
Ryan Dahl
c2d9e62f16 Merge remote branch 'origin/v0.6'
Conflicts:
	deps/v8/src/version.cc
2011-12-23 15:58:11 -08:00
Ryan Dahl
e4731f8168 Upgrade V8 to 3.8.2.1 2011-12-23 15:57:10 -08:00
Ryan Dahl
d85c85aac1 Change 'real example' in addon doc 2011-12-23 15:10:22 -08:00
Ryan Dahl
624f70e88f GYP: rename options.gypi to config.gypi
Sounds more familiar to unix users used to config.h
2011-12-23 14:25:17 -08:00
Bert Belder
c6347dcfb4 Add another nextTick benchmark
It tests how many iterations the event loop can make per second.
2011-12-23 03:09:36 +01:00
Phil Sung
cf2513e1aa buffer: don't pollute global namespace in buffer.readInt* 2011-12-22 23:26:43 +01:00
Ben Noordhuis
b261e37a34 test: ensure callback is executed 2011-12-22 17:28:23 +01:00
Ju-yeong Park
5976d58796 net: raise exception when the socket is closed 2011-12-22 17:25:14 +01:00
Dave Irvine
045bfe0da5 docs: document 'encoding' arg of hash.update() 2011-12-22 16:57:07 +01:00
Ben Noordhuis
d8c178bc16 timers: fix performance regression
Fix a 5-7% performance regression in the http_simple benchmark that was
introduced by the following commits:

  348d8cd timers: remove _idleTimeout from item in .unenroll()
  f2f3028 timers: fix memory leak in setTimeout
  098fef6 timers: remember extra setTimeout() arguments when timeout==0

Fix suggested by Bert Belder.
2011-12-22 14:42:25 +01:00
Seong-Rak Choi
892ba87866 docs: fix javascript error on document page
`highlight()` is called twice. It causes following javascript error.
> Uncaught Found <pre> element with class="sh_sourcecode",
> but no such language exists

Fixes #2393.
2011-12-22 17:32:21 +09:00
Shannen
ef659192a1 docs: use "Level 1" HTML5 features
Since we're using an HTML doctype we might as well use "Level 1" HTML5 features.
See more: http://mathiasbynens.be/notes/html5-levels#level-1

Fixes #2386.
2011-12-22 17:30:41 +09:00
Ryan Dahl
6ac22bfb04 Add gitignore file for addon tests 2011-12-21 14:18:56 -08:00
Ryan Dahl
60a9e1e40f Upgrade GYP to r1115 2011-12-21 12:39:36 -08:00
Ryan Dahl
6029127cea Upgrade V8 to 3.6.6.15 2011-12-21 12:38:07 -08:00
Ryan Dahl
f7f8af8420 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	lib/_debugger.js
2011-12-21 12:17:23 -08:00
Ryan Dahl
73cf8e82e7 Add HandleScope to http-parser binding
Fixes production crashes. We were not able to reproduce in the test suite.
2011-12-21 12:01:41 -08:00
Ryan Dahl
4eaf4ce26a Upgrade V8 to 3.8.2 2011-12-21 10:54:24 -08:00
koichik
07c27e040e tls: Fix node swallows openssl error on request
Fixes #2308.
Fixes #2246.
2011-12-21 19:48:15 +01:00
Ben Noordhuis
a82f5389d9 deps: fix openssl build on x86_64 2011-12-21 18:35:50 +01:00
Ben Noordhuis
b24c515dbf uv: upgrade to 10de090 2011-12-21 16:59:53 +01:00
Ben Noordhuis
7a7f1062bf tls: remove duplicate assignment 2011-12-21 15:01:07 +01:00
Ryan Dahl
18b92201be Support addons with gyp
Initial pass.
2011-12-20 22:03:35 -08:00
Ryan Dahl
7edfb02984 Remove visibility=hidden options from common.gypi
Not necessary and preventing addon loading.
2011-12-20 22:02:50 -08:00
Ryan Dahl
6c5f1f58f3 Remove unnecessary stuff from node.gyp 2011-12-20 20:26:13 -08:00
Bert Belder
f4e34f1b76 Remove unnecessary statement 2011-12-20 17:15:22 +00:00
Ryan Dahl
b603578b53 Fix 'make install'
Broken in 45605c because configure does not spit out proper JavaScript.
Needed to change single quotes to double.
2011-12-19 18:06:21 -08:00
James Hartig
348d8cd04a timers: remove _idleTimeout from item in .unenroll()
Stops .active() from reactivating the timer.

Fixes #2114.
2011-12-20 00:57:15 +01:00
Ben Noordhuis
aac717da8d Add missing return statement in _debugPause() binding. 2011-12-20 00:34:19 +01:00
jbergstroem
45605c9b39 gyp: switch json for pprint when generating config 2011-12-20 00:10:57 +01:00
jbergstroem
f9994114ab build: remove unused cmakelist 2011-12-20 00:10:49 +01:00
Maciej Małecki
5c7532e5b3 assert: test RegExp's properties when checking for equality
Previous code ignored the fact that `/a/ != /a/g`.

Test case included.
2011-12-20 00:10:49 +01:00
Pedro Teixeira
a805012d6f assert: .deepEqual() support for RegExp objects 2011-12-20 00:10:38 +01:00
Ben Noordhuis
213b8af2f6 gyp: include opensslconf.h on x64
Good news, it means we don't have to compile with OPENSSL_NO_ASM=1 after all.
2011-12-19 23:24:29 +01:00
Ben Noordhuis
15d0fa6dc1 gyp: compile openssl with OPENSSL_NO_ASM=1
Fixes linker error "undefined reference to `OPENSSL_ia32_cpuid'". This is
sub-optimal and needs to be revisited, the plain C implementations are often
much slower.
2011-12-19 22:55:11 +01:00
Ryan Dahl
c65a91c96f GYP: don't build V8 twice 2011-12-19 13:41:04 -08:00
Fedor Indutny
d87f551f36 debugger: Request backtrace w/o refs, see #1745
Fixes #2379
2011-12-19 13:30:43 -08:00
Fedor Indutny
802c4c6a61 debugger: document pause and setBreakpoint(line)
Fixes #2381
2011-12-19 13:29:21 -08:00
Andreas Madsen
3966e4e7a5 Remove debug console.log and optimize object copy
Fixes #2380
2011-12-19 13:25:19 -08:00
Ryan Dahl
21e7292ea0 Upgrade V8 to 3.8.1 2011-12-19 13:06:37 -08:00
Andreas Madsen
07b1997388 Add env argument to cluster.fork
Fixes 2378
2011-12-19 12:34:59 -08:00
Fedor Indutny
80858761a8 break on exception
Fixes #2304
2011-12-19 11:09:40 -08:00
Fedor Indutny
a239ea0d40 use inlineRefs, as it's already impl 2011-12-19 11:09:16 -08:00
Fedor Indutny
b00b2f08bf pass noRefs as arguments 2011-12-19 11:09:16 -08:00
Fedor Indutny
b0388ccad0 pause command 2011-12-19 11:09:16 -08:00
Fedor Indutny
07ad11916f allow setBreakpoint(line) 2011-12-19 11:09:16 -08:00
Fedor Indutny
c07edd90f5 preserve cursor pos
* configurable via .prompt()'s preserveCursor argument (false by default)
2011-12-19 11:09:16 -08:00
Fedor Indutny
d9377f5eb0 request backtrace w/o refs, see #1745 2011-12-19 11:09:16 -08:00
Nathan Rajlich
855f46677c test: Add test case for MODULE_NOT_FOUND. 2011-12-19 23:47:07 +09:00
Nathan Rajlich
ec11525d33 docs: Add docs for MODULE_NOT_FOUND error. 2011-12-19 23:47:02 +09:00
Nathan Rajlich
3f987cd925 module: Set the error.code to 'MODULE_NOT_FOUND' when a bad path is given to require.
Fixes #2358.
2011-12-19 23:46:41 +09:00
Ryan Dahl
926365c9f8 add links to package manager on download page 2011-12-18 22:54:15 -08:00
Ryan Dahl
bb8f73419c Fix make targets so they detect changes
Broken in 10d92b3
2011-12-18 15:12:25 -08:00
Avi Flax
ee0a7b928b util: output Dates with Date.toString not Date.toUTCString 2011-12-18 23:07:47 +01:00
Ben Noordhuis
4b455bafd0 module: improve process.dlopen() error messages
On Windows, that is. On Unices, we don't have a good way to translate dlopen()
and dlsym() errors (yet).
2011-12-18 22:35:09 +01:00
Ben Noordhuis
f322bbe729 uv: upgrade to feb267e 2011-12-18 22:35:08 +01:00
Felix Geisendörfer
ec51bfc995 Use common.PORT to avoid conflicts 2011-12-18 16:00:55 +01:00
Yoshihiro Kikuchi
f2f30286bf timers: fix memory leak in setTimeout
Closing handle is leaked when setTimeout called with arguments which are
1. a callback
2. zero delay
(i.e. setTimeout(function(){}, 0); )
2011-12-18 01:50:01 +01:00
Ben Noordhuis
6df7bdd954 child_process: make .send() throw if message is undefined
JSON.stringify(undefined) returns "undefined" but JSON.parse() doesn't know how
to parse that.
2011-12-18 01:29:07 +01:00
Andreas Madsen
b084322f52 Add silent option to child_process.fork
Fixes #2354.
2011-12-17 12:53:44 -08:00
Ryan Dahl
10d92b3dcd saner targets 2011-12-17 03:23:17 -08:00
Adam Malcontenti-Wilson
c4d2244a09 docs: Make logo a link back to homepage
Fixes #2332.
2011-12-17 19:10:08 +09:00
Fedor Indutny
a9f2c4aa30 --without-npm option
Fixes #2353.
2011-12-17 00:39:04 -08:00
isaacs
d75de86e6d add 'make test-npm' 2011-12-16 18:05:17 -08:00
isaacs
90fb81ad54 npm 1.1.0-beta-7 2011-12-16 18:05:17 -08:00
Ryan Dahl
e61de70c96 gyp: use built-in openssl by default 2011-12-16 15:00:23 -08:00
Ryan Dahl
64de69c1a4 Upgrade GYP to r1107 2011-12-16 14:06:29 -08:00
Ryan Dahl
1865b11dcb Merge remote branch 'origin/v0.6'
Conflicts:
	wscript
2011-12-16 13:57:36 -08:00
Ryan Dahl
67e12a0f84 Remove UVTEST from makefile 2011-12-16 13:46:42 -08:00
Ryan Dahl
01e4fe5fbc upgrade libuv to cb70db1 2011-12-16 13:35:08 -08:00
Andreas Madsen
a599aeb2a8 jslint
Fixes #2306
2011-12-16 12:57:03 -08:00
Dave Pacheco
b9049d2f90 simple DTrace ustack helper 2011-12-16 11:38:20 -08:00
Igor Zinkovsky
d6bae2cb95 document mode argument for fs.symlink 2011-12-16 11:16:33 -08:00
Ben Noordhuis
666aa0a343 uv: upgrade to d808cf9 2011-12-16 17:57:56 +01:00
koichik
c744e925df doc: correct http.Server.listen()
Fixes #2325.
2011-12-17 00:32:29 +09:00
Roman Shtylman
4b123f9ca2 crypto: rewrite HexDecode without snprintf
No need to use snprintf to create a hex string. It creates
more overhead than is needed. This new version is much faster.
2011-12-16 14:35:15 +01:00
Igor Zinkovsky
45822da46a fix windows build 2011-12-15 18:42:03 -08:00
Igor Zinkovsky
500c8f45f5 Remove platform files, and use uv platform api 2011-12-15 18:01:22 -08:00
Ben Noordhuis
cc2861ee44 crypto: don't ignore DH init errors 2011-12-16 02:26:01 +01:00
Igor Zinkovsky
88cc688731 fix windows build 2011-12-15 17:20:49 -08:00
Igor Zinkovsky
da3356bb38 upgrade libuv to 8e50b6043da7b3221f51b3158033255c9a210d08 2011-12-15 15:56:42 -08:00
Ryan Dahl
de5ba2db25 Don't print args from gyp_node 2011-12-15 13:19:36 -08:00
Ryan Dahl
ee7313266a use rsync instead of scp to upload website 2011-12-15 12:51:11 -08:00
isaacs
dd8018de95 now working on 0.6.7 2011-12-15 11:08:28 -08:00
isaacs
9a059ea69e 2011.12.14, Version 0.6.6 (stable)
* npm update to 1.1.0-beta-4 (Isaac Z. Schlueter)

* cli: fix output of --help (Ben Noordhuis)

* new website

* pause/resume semantics for stdin (Isaac Z. Schlueter)

* Travis CI integration (Maciej Małecki)

* child_process: Fix bug regarding closed stdin (Ben Noordhuis)

* Enable upgrades in MSI. (Igor Zinkovsky)

* net: Fixes memory leak (Ben Noordhuis)

* fs: handle fractional or NaN ReadStream buffer size (Ben Noordhuis)

* crypto: fix memory leaks in PBKDF2 error path (Ben Noordhuis)
2011-12-15 10:55:52 -08:00
isaacs
56f65e3c3e npm 1.1.0-beta-4 2011-12-15 08:32:07 -08:00
Ryan Dahl
ae17e2d90a Fix doc generation for new website 2011-12-14 18:20:11 -08:00
Robert Mustacchi
2240486d3d Add process.abort 2011-12-14 17:02:15 -08:00
Ryan Dahl
de3c16afae Upgrade V8 to 3.6.6.14 2011-12-14 16:33:11 -08:00
isaacs
2255efa171 npm 1.1.0-beta-3 2011-12-14 16:27:01 -08:00
Ryan Dahl
b04d4fff35 Add docs.nodejitsu.com to community page 2011-12-14 15:19:22 -08:00
Ryan Dahl
b3a7de15b7 Upgrade V8 to 3.8.0 2011-12-14 15:02:32 -08:00
Fedor Indutny
be23c51f69 Implement make install
Fixes #2331, #2197, #2283
2011-12-14 14:41:44 -08:00
isaacs
bb9316da28 npm 1.1.0-beta-2 2011-12-14 14:17:16 -08:00
isaacs
f490934c33 Properly support old IE DOM methods. 2011-12-14 14:17:16 -08:00
Ryan Dahl
1c3883bef2 Add changelog link to website 2011-12-14 11:11:55 -08:00
Ben Noordhuis
97900776bb util: add internal function _deprecationWarning() 2011-12-14 13:36:21 +01:00
Ben Noordhuis
d29be0dfa2 test: binding twice to the same port should raise an error 2011-12-14 03:43:04 +01:00
Ben Noordhuis
43e91da074 .gitignore core and vgcore files 2011-12-14 03:38:41 +01:00
Ben Noordhuis
ef12fa1bf7 crypto: deduplicate encoding parsing logic 2011-12-14 03:18:17 +01:00
Ben Noordhuis
bdd19ab40b build: update 'make install' warning message 2011-12-14 02:49:34 +01:00
Ben Noordhuis
321ec97d95 crypto: deduplicate decipher logic 2011-12-14 02:32:07 +01:00
Ben Noordhuis
77f21787d4 crypto: fix memory leak when decrypting empty strings
Also fixes a dangling pointer delete[] in the error path.
2011-12-13 21:22:44 +01:00
Ben Noordhuis
d70ef199f1 crypto: fix memory leaks in PBKDF2 error path 2011-12-13 18:08:18 +01:00
Ben Noordhuis
b1b3dc62ff fs: handle fractional or NaN ReadStream buffer size
Fixes #2320.
2011-12-13 16:31:12 +01:00
Ben Noordhuis
e90db17392 fs: fix typo in error message 2011-12-13 16:02:14 +01:00
Ryan Dahl
6e76fc2866 make jobs the last nav
fixes display bug
2011-12-12 14:40:03 -08:00
Ryan Dahl
19a18add4e better <br>s 2011-12-12 14:34:37 -08:00
Ryan Dahl
95b034e484 Reorder nav 2011-12-12 14:30:54 -08:00
isaacs
93188918ea Website js/css tweaks
Remove jquery
Use HTML5 doctype
Simpler clearfix implementation
Close download dialog with <Esc> key
2011-12-12 14:28:49 -08:00
Ben Noordhuis
8295c80618 net: check status code in afterWrite
Fixes memory leak and spin on writing to dead fds. This was tested in
production.
2011-12-12 13:45:44 -08:00
Ryan Dahl
e698dd38c3 website fixes 2011-12-12 09:58:23 -08:00
Ryan Dahl
5bbb4cadc3 new website 2011-12-12 09:12:42 -08:00
Igor Zinkovsky
06a22e2ea1 fix windows build 2011-12-09 17:24:37 -08:00
Igor Zinkovsky
8e2c014e43 Fix MSI generation on VC Express 2011-12-09 17:20:22 -08:00
Ryan Dahl
429efdd974 Change artwork in msi 2011-12-09 17:14:39 -08:00
Ryan Dahl
c5e51cead8 Move lock back to node_crypto.cc 2011-12-08 15:58:29 -08:00
Ryan Dahl
3d3f29cf06 Remove wscript 2011-12-08 15:10:26 -08:00
Ryan Dahl
cced79d4a8 Move a few more global vars into struct 2011-12-08 15:09:47 -08:00
Igor Zinkovsky
b24cdb3d36 Enable upgrades in MSI.
Fixes #2228.
2011-12-08 15:02:59 -08:00
Tim Oxley
871194d5fd docs: document util.inspect's colors param 2011-12-08 15:47:18 +01:00
Ryan Dahl
e10fd321e4 move global vars from platfrom, node_signal_watcher to struct 2011-12-07 18:03:18 -08:00
Ryan Dahl
59055b227a Move node_buffer.cc globals to struct 2011-12-07 16:01:46 -08:00
Ryan Dahl
e53e9c72cb move global vars for node_file.cc, node_zlib.cc, and node_crypto.cc 2011-12-07 15:44:33 -08:00
Ben Noordhuis
22c2c34952 fs: fix fs.watch() segmentation fault
The binding layer failed to initialize the event string if both UV_RENAME and
UV_CHANGE were set.

Fixes #2287.
2011-12-07 23:19:57 +01:00
Ryan Dahl
06d86ebe84 Move node_http_parser.cc global vars into node_vars.h 2011-12-07 13:31:55 -08:00
koichik
f8c335d0ca tls: enable rejectUnauthorized option to client
Fiexes #2247.
2011-12-07 22:47:06 +09:00
Ben Noordhuis
eef5d3257d build: check for libkvm and libexecinfo on all the BSDs 2011-12-07 14:36:21 +01:00
Ryan Dahl
e0a207c27a Begin moving static vars into struct for isolates.
Only node.cc, stream_wrap.cc, and tcp_wrap.cc have been done. The rest still
need work.
2011-12-07 01:14:54 -08:00
Ryan Dahl
ebe0fb697a Merge remote branch 'origin/v0.6' 2011-12-06 17:04:51 -08:00
Ryan Dahl
7547c7df1a Deshadow, denamespace variables in node.cc
Prep for isolates.
2011-12-06 17:01:56 -08:00
Ben Noordhuis
fd29448be0 test: add missing copyright headers 2011-12-06 22:02:26 +01:00
Ben Noordhuis
70bc2e32af test: new test, verify that we don't close and reuse fd 0 2011-12-06 22:02:26 +01:00
Ben Noordhuis
23bb5986d4 Remove unused variable.
The file descriptor arg to child_process._forkChild() is not used any more.
Remove it, avoids future confusion.
2011-12-06 22:02:26 +01:00
Ben Noordhuis
57d2857938 uv: upgrade to 0db3274 2011-12-06 22:02:26 +01:00
Ryan Dahl
2003593143 Merge remote branch 'origin/v0.6'
Conflicts:
	deps/v8/src/debug.cc
	deps/v8/src/version.cc
	src/node_version.h
2011-12-06 11:50:54 -08:00
isaacs
580e67015c Apply #2257 fix for Pipe streams as well as TTYs 2011-12-06 10:13:31 -08:00
Fedor Indutny
e609195202 [zlib] added dictionary support 2011-12-05 17:58:31 -08:00
Maciej Małecki
89e894b17a doc: add Travis CI build status image 2011-12-05 16:51:03 -08:00
Maciej Małecki
9023b0b3a2 test: add .travis.yml for testing on Travis CI
As discussed with @isaacs, build reports will be sent to #libuv IRC
channel. E-mail notifications are turned off so that Travis doesn't
bother committers about failures in forks.
2011-12-05 16:50:55 -08:00
isaacs
cf20b6bf65 Fix #2257 pause/resume semantics for stdin
This makes it so that the stdin TTY-wrap stream gets ref'ed on
.resume() and unref'ed on .pause()

The semantics of the names "pause" and "resume" are a bit weird, but the
important thing is that this corrects an API change from 0.4 -> 0.6
which made it impossible to read from stdin multiple times, without
knowing when it might end up being closed.  If no one has it open, this
lets the process die naturally.

LGTM'd by @ry
2011-12-05 16:47:11 -08:00
Ryan Dahl
21d081fd7f Upgrade V8 to 3.7.12 2011-12-05 16:29:01 -08:00
Ryan Dahl
6f86b9cb70 Disable test-setproctitle on darwin 2011-12-05 16:25:32 -08:00
isaacs
db273818f6 s/NPM/npm/
http://npmjs.org/doc/faq.html#If-npm-is-an-acronym-why-is-it-never-capitalized
2011-12-05 16:20:44 -08:00
Ben Noordhuis
36815e4179 process: fix stack overflow when recursively calling process.exit() 2011-12-05 22:43:27 +01:00
Ryan Dahl
1a89c8d061 Add analytics tracking to docs 2011-12-05 11:17:57 -08:00
Ben Noordhuis
fdf180f9ce cli: fix output of --help 2011-12-05 08:42:11 +01:00
Ben Noordhuis
aeb124f7f3 test: create test file in temp dir 2011-12-05 06:37:18 +01:00
Ben Noordhuis
a0fdd5f3f6 uv: upgrade to 34e95d1 2011-12-04 13:22:21 +01:00
Ryan Dahl
c50b0c9237 Now working on Node v0.6.6 2011-12-04 00:59:16 -08:00
Ryan Dahl
6cc94db653 Bump version to v0.6.5 2011-12-04 00:10:23 -08:00
Ryan Dahl
60e26668b3 Remove superfluous 'new' 2011-12-04 00:09:10 -08:00
Ryan Dahl
1cf26e2bf1 Upgrade V8 to 3.6.6.11 2011-12-03 23:31:02 -08:00
Ben Noordhuis
e90623edc2 gyp: upgrade to r1103 2011-12-03 21:28:17 +01:00
Ryan Dahl
46b6954acd Add link to license file on website 2011-12-02 17:06:05 -08:00
isaacs
ffc8110659 Workaround: A/V software prevents folder rename 2011-12-02 13:45:08 -08:00
Ben Noordhuis
49ba55b100 Merge branch 'v0.6'
Conflicts:
	src/node_version.h
2011-12-02 16:34:33 +01:00
koichik
3ebbdc6320 Update ChangeLog 2011-12-03 00:21:55 +09:00
Ben Noordhuis
a29a7c72fa Now working on v0.6.5 2011-12-02 03:15:10 +01:00
Ben Noordhuis
9170077f13 Bump version to v0.6.4 2011-12-02 02:31:41 +01:00
Bert Belder
641f2bedf3 Fix UVException errno bug 2011-12-02 02:21:50 +01:00
Bert Belder
ded97eb892 Exclude getbuf from the windows build
It's not used.
2011-12-02 02:21:50 +01:00
Bert Belder
e84edd2593 Win: make process.cwd and chdir support non-ansi characters
Closes GH-2215
2011-12-02 02:21:50 +01:00
Bert Belder
823a443321 Rename FSError to UVException and move to node.cc 2011-12-02 02:21:50 +01:00
isaacs
1ad30a2af4 npm 1.1.0-alpha-6 2011-12-01 17:12:21 -08:00
Igor Zinkovsky
99c9d19184 binding for uv_pipe_pending_instances 2011-12-01 13:57:47 -08:00
Igor Zinkovsky
dd4b280d8c upgrade libuv to 60630dab0f 2011-12-01 13:56:04 -08:00
Bert Belder
ae648a44c4 Upgrade libuv to 9c064fb 2011-12-01 22:50:09 +01:00
Ben Noordhuis
9b4e8e0a0d fs: fix typo in function names
The build was not affected: the typos were in macros that only come into effect
when _LARGEFILE_SOURCE is not defined - which is never.
2011-12-01 22:29:39 +01:00
isaacs
0f6d3e22d9 Remove duplicate npmrc file 2011-12-01 12:23:43 -08:00
Igor Zinkovsky
3e7f4b0f82 npm msi changes 2011-12-01 21:12:17 +01:00
isaacs
d5f401147a Re #2207 Add default npmrc for MSI install 2011-12-01 21:12:17 +01:00
isaacs
61764613d1 npm 1.1.0-alpha-5
Fix #2186
First part of #2207
2011-12-01 21:12:17 +01:00
Ben Noordhuis
d5feb1c280 Revert "build: compile with -D__DARWIN_64_BIT_INO_T on OS X"
This reverts commit f004d5aeac.

__DARWIN_64_BIT_INO_T is a no-op in most cases and might be actively harmful in
some others.
2011-12-01 21:00:46 +01:00
Ben Noordhuis
3d22dbf27b cli: add -p switch, print result of --eval 2011-12-01 18:02:15 +01:00
Ben Noordhuis
03eb41c2ec net: don't emit 'close' event twice
Don't allow `socket.destroy()` to run twice. The self-destruct sequence itself
is idempotent but it makes the 'close' and 'error' events fire more than once,
which may confuse listeners.

Fixes #2223.
2011-12-01 14:57:06 +01:00
Ben Noordhuis
3ca0517749 build: add --without-npm flag to configure script
Fixes #2200.
2011-11-30 15:50:08 +01:00
Mathias Bynens
456dafc3c6 Docs template: HTML cleanup
Remove references to `/favicon.ico` as it’s the default in all browsers. More
info: http://mathiasbynens.be/notes/rel-shortcut-icon

`type=text/css` and `media=all` are the implied defaults for `<link
rel=stylesheet>` (and `<style>`), so omit these attributes.

Similarly, `type=text/javascript` is the default for `<script>` elements, so
omit these attributes.
2011-11-30 15:28:48 +01:00
Mathias Bynens
cf89beec6f punycode: Update to v0.2.1 2011-11-30 15:28:48 +01:00
Ben Noordhuis
f44d0b9044 crypto: throw exception on unknown digest method
Fixes #2227.
2011-11-30 14:27:53 +01:00
Nathan Rajlich
b204006105 util: ensure that the .inspect function isn't the one being executed
Fixes #2225.
2011-11-30 14:14:24 +01:00
Ben Noordhuis
bbd976b8c4 build: always compile with large file support
Fixes a nasty sizeof(struct stat) mismatch bug that caused random crashes and
silent memory corruption.
2011-11-30 02:28:12 +01:00
Russ Bradberry
754e23db27 fixed problem with rss memory reporting incorrect number over 4 gigs 2011-11-30 02:11:40 +01:00
Ingmar Runge
260383215b node_crypto: use EVP_Cipher*_ex methods, not 'obsolete' versions
This also fixes an issue that made blowfish's ECB mode unusable.
2011-11-30 01:29:35 +01:00
eddy_me08@yahoo.com
eda15387a0 build: regenerate out/Makefile from within the main Makefile
Fixes #2147.
2011-11-29 19:35:58 +01:00
Ben Noordhuis
5fea00581b sys: print stack trace if NODE_DEBUG=sys 2011-11-29 19:22:13 +01:00
Ben Noordhuis
a033261f39 build: DRY configure script 2011-11-29 16:30:35 +01:00
Bert Belder
6ed721afd2 Upgrade libuv to fce90652ed38ab0925131ed141972354a494933b 2011-11-29 12:45:39 +01:00
seebees
aab958b713 OutgoingMessage.prototype.write does not take Array
Changed the type checking for OutgoingMessage.prototype.write so it only accepts string and Buffer.

And test.
Fixes #2162
Fixes #2208
2011-11-29 16:52:15 +09:00
Roman Shtylman
1c62e807e1 doc: add note about NODE_MODULE module_name requirement
module_name needs to match the final binary name
2011-11-28 20:52:40 +01:00
Thomas Shinnick
eba1f7b1a4 child_process: fix order of args to errnoException() 2011-11-28 20:45:01 +01:00
Ben Noordhuis
a5c51b4858 docs: add rel="canonical" link to latest API docs 2011-11-28 16:47:53 +01:00
Ben Noordhuis
216019b72d modules: fix error message for native add-ons without entry points
Trying to load an add-on without "init" or "modname_module" symbols would raise
an "Out of memory" exception. Let's improve that error message.
2011-11-27 22:47:05 +01:00
isaacs
e85a95dfa3 Remove npm's .gitignore, add generated docs 2011-11-27 13:09:04 -08:00
Tim Oxley
fc0a4c2781 docs: fix favicon 2011-11-27 21:52:27 +01:00
koichik
5451ba3aa8 tls: fix https with fs.openReadStream hangs
Fixes #2185.
Fixes #2198.
2011-11-27 16:31:45 +09:00
Ben Noordhuis
2445fb8bdd Fix double #define of NODE_VERSION_IS_RELEASE 2011-11-27 02:09:15 +01:00
koichik
6392eba3f9 test: update an expired certificate 2011-11-27 02:05:24 +09:00
kyle@dontkry.com
34f34e4411 docs: fix typo
Fixes #2193.
2011-11-27 01:45:27 +09:00
Ben Noordhuis
1cf13bca19 build: compile with -D__DARWIN_64_BIT_INO_T on OS X
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.

Fixes #2061 for gyp builds. Solution proposed by Paddy Byers.
2011-11-25 16:53:38 +01:00
Bert Belder
3a160646df Now working on v0.6.4 2011-11-25 12:43:44 +01:00
Bert Belder
cffd0bb68d Merge branch 'v0.6'
Conflicts:
	Makefile
	src/node_version.h
	test/simple/test-http-response-no-headers.js
2011-11-25 12:34:29 +01:00
Bert Belder
b159c6d62e Bump version to v0.6.3 2011-11-25 11:23:28 +01:00
Bert Belder
2335c4bb41 Strip trailing whitespace in changelog 2011-11-25 11:07:57 +01:00
Bert Belder
b480cfaf34 Make the pummel test runner not crash on windows when a directory is locked 2011-11-25 10:27:30 +01:00
Bert Belder
a056ef1f39 Upgrade libuv to 01f64f6 2011-11-25 10:16:43 +01:00
Bert Belder
5b014e0725 Fs: use strncmp instead of memcmp for comparing strings 2011-11-25 09:35:52 +01:00
Author: Igor Zinkovsky
1f16a7b6e5 Enable long paths on windows 2011-11-25 09:35:52 +01:00
Igor Zinkovsky
319580953d update libuv to cfa4112950b1f897fda7 2011-11-24 19:45:35 -08:00
Bert Belder
232e8e19a1 Fix test-stdin-from-file 2011-11-25 03:08:27 +01:00
Bert Belder
95eb729e6f Upgrade libuv to 3a50f8f 2011-11-25 02:13:37 +01:00
Bert Belder
236b217cd7 Fix issues with test-fs-chmod
- The test simultaneously chmods and fchmods the same file.
- On windows, it leaves behind a fixture in read-only mode,
  which causes test-fs-fsync to fail.
2011-11-25 01:25:38 +01:00
Bert Belder
d51a0c353b Upgrade libuv to 45b976a 2011-11-25 01:01:57 +01:00
Ben Noordhuis
55a8a3aad4 test: better fs.lchmod() availability check
fs.lchmod() is a BSD-ism, not a "not Windows"-ism.
2011-11-25 00:56:05 +01:00
Bert Belder
7244b9cee8 Upgrade libuv to ea63f06 2011-11-24 19:57:17 +01:00
Bert Belder
a639cf7d84 Add test for GH-2177 2011-11-24 19:56:41 +01:00
Bert Belder
83152d174c Dgram: correctly report recvmsg errors 2011-11-24 19:11:13 +01:00
Bert Belder
86fba381fd Windows: correctly resolve drive-relative paths 2011-11-24 02:38:34 +01:00
Bert Belder
cbcf4fe768 Don't die when arguments are passed to process.cwd() 2011-11-24 02:19:54 +01:00
Ben Noordhuis
1db9a2adbe build: print "not yet implemented" warning on make install 2011-11-23 13:27:53 +01:00
Ben Noordhuis
16889e22cc docs: fix dgram markdown 2011-11-23 12:56:05 +01:00
Ben Noordhuis
ce3ccc8d5a build: fix circular dependency in doc target 2011-11-23 12:56:05 +01:00
Ryan Dahl
b906e85996 Fixes #2076. Add logos to MSI 2011-11-22 19:23:41 -08:00
Ryan Dahl
055a933fa9 Add exe and msi signing to vcbuild.bat 2011-11-22 18:17:12 -08:00
Ryan Dahl
e5cf3f9751 Fixes #2083. Support installing npm in the .msi 2011-11-22 17:59:18 -08:00
isaacs
3ab15cde25 Update npm to 1.1.0-alpha-2 2011-11-22 17:03:58 -08:00
isaacs
0ba78d5f36 Close #2166 Close the fd in lchmod 2011-11-22 14:00:48 -08:00
Felix Geisendörfer
6e1e9e2fcb Get test-http-response-no-headers.js to pass
Main fix was in 3abebf which added HTTP/0.9 support to http parser.

Changed test because HTTP 1.1 mandates keep-alive when no headers are
given.

Fixes #1711
2011-11-22 22:48:50 +01:00
Ben Noordhuis
246805d386 test: add 'response body with no headers' http test
HTTP/0.9 - fails with a parse error
HTTP/1.0 - works
HTTP/1.1 - fails with an empty response body

See #1711.
2011-11-22 22:47:20 +01:00
Ryan Dahl
8595981195 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	src/node_version.h
	test/simple/test-crypto.js
2011-11-22 13:01:10 -08:00
Ryan Dahl
3abebfea98 Upgrade http-parser to joyent/http-parser@2498961 2011-11-22 12:56:01 -08:00
Ryan Dahl
38c49fbc4a Fix broken commit 2cd5adc 2011-11-22 12:44:01 -08:00
Ryan Dahl
2cd5adc28b Install npm with 'make install' 2011-11-22 12:38:48 -08:00
Ryan Dahl
6035651fad Fixes #2160. Fix tty.getWindowSize docs 2011-11-22 10:24:41 -08:00
Felix Geisendörfer
b3f91f15b2 Remove support for multi-source pipe()
This reverts 6c5b31bd which had too few use cases, too much complexity,
and can be handled in user-land by using `{end: false}`.

Closes #1996
2011-11-22 08:51:19 -08:00
isaacs
e543b0e95e zlib: Fix invalidly failing test 2011-11-22 08:51:19 -08:00
Ben Noordhuis
7defbd27ef test: add DSA sign/verify crypto tests 2011-11-22 16:01:07 +01:00
Ryan Dahl
b488be127a Include NPM, update .pkg to install it.
.msi update coming soon.
2011-11-21 10:50:52 -08:00
Ben Noordhuis
05de01d707 tls: expose more openssl SSL context options 2011-11-21 13:59:43 +01:00
Roman Shtylman
4d05f56dcd tls: expose ssl bug workaround constants
The internet is filled with servers which have various bugs and other
ssl handshake issues. These constants can be used with the Agent
secureOptions option to get around such server limitations when performing
https requests
2011-11-21 13:59:43 +01:00
Maciej Małecki
3f862cf179 test: stdin isn't closed after resume() and pause()
This works on `node v0.4.12`, but doesn't work on `node v0.6.2`
2011-11-21 12:34:19 +01:00
Ryan Dahl
9d1bdbcf05 Fixes #2084. Makeify tools/osx-dist.sh 2011-11-20 19:22:30 -08:00
Ben Noordhuis
61e796decc Now working on v0.6.3 2011-11-19 00:22:13 +01:00
Ben Noordhuis
a4402f0b2e Bump version to v0.6.2 2011-11-18 23:43:03 +01:00
isaacs
975f1930b1 zlib: Fix invalidly failing test 2011-11-18 14:38:44 -08:00
Ben Noordhuis
f004d5aeac build: compile with -D__DARWIN_64_BIT_INO_T on OS X
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.

Fixes #2061. Solution proposed by Paddy Byers.
2011-11-18 21:17:13 +01:00
Ben Noordhuis
3f92031aeb uv: upgrade to 01fbe7b 2011-11-18 21:17:09 +01:00
Ryan Dahl
585936157c Add missing rm 2011-11-18 12:03:35 -08:00
Ben Noordhuis
8bdf6bae30 docs: document dgram error event 2011-11-18 14:18:42 +01:00
Ben Noordhuis
a808ab4ac4 crypto: use the libuv rwlock API 2011-11-18 13:07:13 +01:00
Ben Noordhuis
1b2d333ee3 uv: upgrade to e4680cc 2011-11-18 13:07:01 +01:00
Ben Noordhuis
59a9a9b5b0 buffer: add .read*() and .write*() methods to SlowBuffer prototype
Fixes #2138.
2011-11-18 11:13:37 +01:00
Ryan Dahl
48d21dd541 Force makefile generation in gyp 2011-11-17 17:30:30 -08:00
Trevor Burnham
06d71ad457 docs: document the persistent option for fs.watch and fs.watchFile 2011-11-18 00:00:01 +01:00
Paddy Byers
4f8d6d0834 build: fix gyp xcode project generator
Only attempt to generate FrameworkPhase output for code targets.
2011-11-17 23:49:55 +01:00
Ben Noordhuis
29d8ff51c8 build: remove v8-node.gyp 2011-11-17 23:48:40 +01:00
Ben Noordhuis
9d3faf4f9a crypto: add support for RSA public key signing/verification 2011-11-17 23:01:39 +01:00
Ben Noordhuis
3ac5f1106d crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
2011-11-17 23:01:39 +01:00
E. Azer Koçulu
1cb6fe47fc util: remove the line requiring events 2011-11-17 23:01:39 +01:00
Ben Noordhuis
534e41b474 crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
2011-11-17 21:17:21 +01:00
Ben Noordhuis
bed405cfea Merge remote branch 'origin/v0.6' 2011-11-17 20:06:50 +00:00
Ryan Dahl
b0030af135 Fixes #2140. Fix illumos build. 2011-11-17 11:39:34 -08:00
E. Azer Koçulu
e258169666 util: remove the line requiring events 2011-11-17 20:21:48 +01:00
Ben Noordhuis
4f8a0cd2f9 v8: add platform-solaris.cc to gyp build
Re-applies 77e4abbc3e, lost in a V8 upgrade.
2011-11-17 19:39:39 +01:00
Ben Noordhuis
2c52ccea80 v8: compile with __C99FEATURES__=1 on sunos
Exposes INFINITY, isinf(), isfinite(), etc.

Re-applies d104e5b91c, lost in a V8 upgrade.
2011-11-17 19:39:39 +01:00
Ben Noordhuis
4f38c5ece3 test: add 'response body with no headers' http test
HTTP/0.9 - fails with a parse error
HTTP/1.0 - works
HTTP/1.1 - fails with an empty response body

See #1711.
2011-11-17 16:32:09 +01:00
Ben Noordhuis
8f15582ef3 test: add 'no response headers' http parser test 2011-11-17 13:36:29 +01:00
Artur Adib
960ccdc72c docs: clarify addon docs 2011-11-17 13:15:49 +01:00
Bert Belder
3e696d189c Windows: make Buffer and ObjectWrap available to compiled extensions
Closes GH-2036
2011-11-17 00:54:42 +01:00
Bert Belder
9c70b09e0a Fix strange vcbuild "label not found" error 2011-11-17 00:10:14 +01:00
Ben Noordhuis
5e3b0095de tls: make cipher list configurable
options.ciphers existed but didn't work, the cipher list was effectively
hard-coded to RC4-SHA:AES128-SHA:AES256-SHA.

Fixes #2066.
2011-11-17 00:01:41 +01:00
Ryan Dahl
40cb398867 Working on v0.7.0 2011-11-16 13:38:04 -08:00
Ryan Dahl
93dc713670 Merge remote branch 'origin/v0.6' 2011-11-16 13:37:20 -08:00
Ryan Dahl
44314ccf48 Upgrade libuv to 2007eb8 2011-11-16 13:06:10 -08:00
Łukasz Walukiewicz
3b852d7fab buffer: fix minimum values for writeInt*() functions 2011-11-16 21:30:26 +01:00
Łukasz Walukiewicz
5d0b5a00aa buffer: fix minimum values for writeInt*() functions 2011-11-16 21:27:26 +01:00
Ben Noordhuis
cf2ee19049 crypto: fix 'var may be used uninitialized' compiler warnings 2011-11-15 22:56:11 +01:00
Ben Noordhuis
b9e1bb3d92 build: auto-run tools/gyp_node after ./configure 2011-11-15 17:17:05 +01:00
Ryan Dahl
14b04b06b4 Remove SCONS deprecate WAF
We keep around WAF for node-waf only.

We need great diligence by people over the next couple weeks to work out all
the kinks in the GYP build system. We realize that it is currently several
times slower than the WAF build. Please lend a hand.

Fixes #1504
Fixes #1500
2011-11-14 19:17:42 -08:00
Ryan Dahl
17a82e72f4 Upgrade V8 to 3.6.6.8 2011-11-14 17:17:23 -08:00
Ryan Dahl
4b0241d589 Remove str.format to support python2.5.
Fixes #2077
Fixes #2108

Thanks to David Keegan for debugging and the patch.
2011-11-14 17:09:44 -08:00
Trent Mick
2cd51ef5d4 "Trailer" header should mention "Content-MD5" trailer name in this example.
Fixes #2107
2011-11-14 16:54:24 -08:00
seebees
3222a04d5e test for REPL .save and .load and documentation updates 2011-11-13 19:54:35 +01:00
Mathias Bynens
897208e06d punycode: Update to v0.1.1. 2011-11-13 15:38:27 +01:00
seebees
3421f43351 .load, .save and local scope tab completion
Fixes #2063.

REPLServer.prototype.resetContext:
Reset the line cache

REPLServer.prototype.memory (don't know if I like that name, called from finish)
pushes what cmd's have been executed against it into this.lines
pushes the "tab depth" for bufferedCommands, in this.lines.level

REPLServer.prototype.displayPrompt:
Uses "tab depth" from this.lines.level to adjust the prompt to visually
denote this depth e.g.
> asdf = function () {
… var inner = {
….. one:1

REPLServer.prototype.complete:
Now notices if there is a bufferedCommand and attempts determine locally
scoped variables by removing any functions from this.lines and evaling these
lines in a nested REPL e.g.
> asdf = function () {
… var inner = { one: 1};
… inn\t
will complete to 'inner' and inner.o\t will complete to 'inner.one'
If the nested REPL still has a bufferedCommand it will falls back to the
default.

ArrayStream is a helper class for the nested REPL to get commands pushed to it.
new REPLServer('', new ArrayStream());

Finally added two new REPL commands .save and .load, each takes 1 parameter,
a file and attempts to save or load the file to or from the REPL
respectively.
2011-11-12 11:34:55 -08:00
seebees
b00f5e2e14 Tab Compete test for node REPL
Currently the REPL only tab completes for globally scoped variables
2011-11-12 11:34:55 -08:00
Ben Noordhuis
098fef6740 timers: remember extra setTimeout() arguments when timeout==0
Fixes #2079.
2011-11-12 13:31:28 +01:00
Ryan Dahl
8082858ee7 Now working on v0.6.2 2011-11-11 15:35:10 -08:00
Ryan Dahl
170f2addb2 Bump version to v0.6.1 2011-11-11 14:56:27 -08:00
Ryan Dahl
5bc1809b43 Add 'make dist-upload' 2011-11-11 14:31:15 -08:00
Ryan Dahl
d214576d2b Be consistent with v before version in packages 2011-11-11 14:02:42 -08:00
Igor Zinkovsky
2095eea3da msi changes
- remove license from MSI
- adjust path on install
- add message to the end
2011-11-11 12:50:04 -08:00
Ryan Dahl
2af6431619 Add upload command to vcbuild.bat 2011-11-11 12:38:55 -08:00
Ryan Dahl
895fa3a56b Simplify and move getnodeversion.py 2011-11-11 12:09:48 -08:00
Shigeki Ohtsu
e0f10ecfd9 debugger: correctly handle source with multi-byte characters 2011-11-11 20:29:50 +01:00
Ryan Dahl
4e2343c6b5 Fixes #2073. Cluster should be silent. 2011-11-11 11:24:59 -08:00
Ben Noordhuis
10d4bd8266 test: add more punycode tests 2011-11-11 17:02:43 +01:00
Ben Noordhuis
326b2cb34e punycode: replace with Mathias Bynens's implementation
The currently bundled library doesn't pass all the test cases from RFC 3492.
Mathias's library does.

Home: https://github.com/bestiejs/punycode.js
2011-11-11 17:02:43 +01:00
Yoji SHIDARA
426298c8c1 docs: dgram client should be closed in the callback 2011-11-11 10:39:32 +01:00
Ryan Dahl
74f39041d4 dont use blue for numbers in util.inspect 2011-11-10 23:35:35 -08:00
Ryan Dahl
dc39ab3bbf Improve OSX installer 2011-11-10 18:41:44 -08:00
Igor Zinkovsky
ec90ede1cf fix msi builder 2011-11-10 18:40:49 -08:00
Igor Zinkovsky
13324bf844 throw from stdout.end and stderr.end 2011-11-10 14:51:16 -08:00
Igor Zinkovsky
09329e7833 Add node.rc with a version resource
Fixes #2059
2011-11-10 13:22:13 -08:00
Ben Noordhuis
78ca555845 bench: optimize io.c benchmark
Use static buffers. Most clock ticks were spent in malloc() and free() instead
of read() and write().

Fix measurements. Really fast runs would result in bogus results like:

  Wrote 1048576000 bytes in -0.731630s using 8192 byte buffers: -1366.811093mB/s
2011-11-10 21:13:37 +01:00
Ben Noordhuis
0757c73a20 uv: upgrade to 224584c 2011-11-10 20:10:54 +01:00
Ben Noordhuis
e34a2c170c uv: upgrade to 26806e2 2011-11-10 16:40:56 +00:00
Ben Noordhuis
8dd4fcbe8f fs: don't close uninitialized fs.watch handle
Makes uv_close() assert because the uv_fs_event_t struct contains garbage.
2011-11-10 13:17:51 +01:00
Igor Zinkovsky
f84d86b660 make stdout stream non-destroyable 2011-11-09 15:04:44 -08:00
Igor Zinkovsky
5d89540b77 make stderr stream non-destroyable 2011-11-09 13:53:19 -08:00
Ben Noordhuis
4fc0fdc6ee bench: start (NUM_CPUS-1) workers
The master is a worker too so fork off one less worker.
2011-11-09 17:34:53 +01:00
Ben Noordhuis
cdcb1118c8 Remove stray NODE_MODULE() semi-colons. 2011-11-09 16:34:09 +01:00
Ryan Dahl
0fa3cf94a3 Remove 'report this bug' message from cluster master 2011-11-08 17:07:49 -08:00
Ryan Dahl
da9bf0ee80 Fixes #2047. Fill workers array immediately after fork 2011-11-08 17:03:29 -08:00
Ryan Dahl
3ae644d48c Upgrade libuv to 196e145 2011-11-08 16:59:40 -08:00
Ryan Dahl
2a462abf5f process.kill doesn't create error obj correctly 2011-11-08 16:58:32 -08:00
Ryan Dahl
05727f6e3e Upgrade libuv to 2b7774a 2011-11-08 16:52:45 -08:00
Ryan Dahl
2d13cdfd2a Fixes #2052. Readline get win cols correctly 2011-11-08 13:37:08 -08:00
Ben Noordhuis
efb833f342 crypto: use the right mutex 2011-11-08 20:56:45 +01:00
Ryan Dahl
409915e955 Upgrade libuv to f1859eb
Fixes #2040
Fixes 0e8a55d2a2 (commitcomment-69710)
2011-11-08 11:52:18 -08:00
Ben Noordhuis
97cada0e6a crypto: make module thread-safe 2011-11-08 20:04:23 +01:00
Ryan Dahl
0ba8f05a42 Upgrade V8 to 3.6.6.7 2011-11-08 10:00:12 -08:00
Scott Anderson
0d19d82498 Cluster documentation added. 2011-11-09 00:02:18 +09:00
Ben Noordhuis
6f96e78dea test: fs.realpath() should not call its callback twice
Test case for #2045.
2011-11-08 13:03:29 +01:00
Benjamin Pasero
b1bb17fd2b fs: fix fs.realpath on windows to return on error 2011-11-08 13:02:04 +01:00
Ben Noordhuis
04958e88a4 fs: make mkdir() call callback if mode is omitted
Fixes #2043.
2011-11-08 12:48:09 +01:00
Ben Noordhuis
105d1787dc cluster: fix call to undefined function 2011-11-08 08:29:25 +01:00
Eric Lovett
69d3bf1068 docs: minor grammar fix in cluster page 2011-11-08 00:43:59 +01:00
Ben Noordhuis
d7bcf21340 build: fix race in parallel build
Run `make clean` first, *then* `make all`
2011-11-08 00:25:54 +01:00
Ryan Dahl
6a83df04b6 Update multi-core text on index.html 2011-11-07 10:43:48 -08:00
Ryan Dahl
a9366818a1 Remove v0.4 links from index.html 2011-11-07 10:41:01 -08:00
Ben Noordhuis
edcfea5d02 build: fix man page install path on the BSDs
Fixes #2026.
2011-11-07 06:46:09 +01:00
koichik
1001cf412c bench: update static_http_server benchmark to new API
Fixes #2016.
2011-11-06 01:25:07 +09:00
Fedor Indutny
da82daf54c test: debugger-repl should wait for 'drain' event 2011-11-05 15:24:28 +01:00
Eric Lovett
febe5c44c0 docs: use markdown for link, not html 2011-11-05 13:00:20 +01:00
Ben Noordhuis
099c717baf docs: fix copy/paste error, 0.6.0 is a stable release 2011-11-05 10:44:27 +01:00
Eric Lovett
8f2b03242d docs: minor typo fix in child process docs 2011-11-05 10:41:39 +01:00
Ryan Dahl
9e00b7d3d0 Now working on v0.6.1 2011-11-05 01:55:34 -07:00
Ryan Dahl
865b077819 Bump version to v0.6.0 2011-11-04 23:48:57 -07:00
koichik
96fe50400d docs: fix typo 2011-11-05 12:35:38 +09:00
Ben Noordhuis
10edbbb927 uv: upgrade to c468e2a 2011-11-05 03:13:55 +01:00
Igor Zinkovsky
7335a4234a fix test-module-loading on windows 2011-11-04 18:05:53 -07:00
Igor Zinkovsky
1a9286c6e9 update fs_event_wrap.cc to work with new uv_fs_event_init api 2011-11-04 18:04:52 -07:00
Igor Zinkovsky
6545a6dc5d make updates to work with latest libuv api changes 2011-11-04 18:01:03 -07:00
Bert Belder
b54da8a10f Upgrade libuv to 1997e10b50 2011-11-05 01:50:05 +01:00
Ryan Dahl
5c3954aa6f docs: make std*Stream spawn opts explicitly internal
Fixes #1884.
2011-11-04 15:56:28 -07:00
Jacob H.C. Kragh
c1472ac105 docs: fix some minor typos in the fs documentation
* fchmodSync: replace 'path' with 'fd'
* lchmod: replace 'fd' with 'path'
* utimes, futimes, fsync: mark 'callback' as optional
2011-11-04 23:53:01 +01:00
Ben Noordhuis
89014c9d40 bench: add http_simple cluster edition benchmark 2011-11-04 23:53:01 +01:00
Ryan Dahl
1e3e6b7c15 cluster: add example for message passing 2011-11-04 15:34:18 -07:00
Igor Zinkovsky
5496e67f83 upgrade libuv to 82cf0b38c0
fixes #2004
2011-11-04 15:19:46 -07:00
Ryan Dahl
d42006c80a cluster: Remove eachWorker, workerCount
unnecessary
2011-11-04 15:14:38 -07:00
Ryan Dahl
86528489ec new cluster api 2011-11-04 15:12:11 -07:00
Jacob H.C. Kragh
44a5452a4f docs: fix typo in the documented fchown signature 2011-11-04 20:10:21 +01:00
Matt Robenolt
5213c39038 Close #1930 Convenience methods for zlib
This is a combination of 20 commits. Their commit messages are preserved
below for the benefit of future generations.

* Adding a shortcut to easily compress/decompress a string of text.
* Making the API consistent. unzip should accept a Buffer for input as well.
* Adding docs.
* Oops, typo.
* Propagate error through the callback.
* Adding zlib from string tests.
* Typo in test.
* Remove 'end' listeners, and join buffers properly instead of joining them
  as a string.
* Oops, needs to be rendered to a string.
* Updated test to include multi-byte characters.
* unzip should return a raw Buffer. Updated docs to reflect.
* And finally updating test.
* EventEmitter.destroy() is a bit more customary
* Revert "EventEmitter.destroy() is a bit more customary"
* Renaming internal methods to "buffer" instead of string.
* Remove the 'error' listeners as well.
* @isaacs: spacing/style, and compress duplicate functions into one
* @isaacs: Update docs
* @isaacs: doc style fix
2011-11-04 10:32:57 -07:00
Fedor Indutny
8ef2c13d6c fix debugger-repl test 2011-11-04 18:00:18 +01:00
Fedor Indutny
b5d32d4a9e debugger: do not request continue on connection
* Updated test
* Use `node debug file`, not `node debug -e "..."` in test
2011-11-04 17:50:46 +01:00
Bert Belder
829735e738 Implement process._debugProcess 2011-11-04 17:50:28 +01:00
Bert Belder
35f4182cee Make error reporting from node::DLOpen more consistent 2011-11-04 16:24:35 +01:00
Bert Belder
6ee73a2fee Windows: ErrnoException shouldn't mix up crt and win32 errors 2011-11-04 16:24:35 +01:00
Bert Belder
189dd8f803 Fix line endings and trailing whitespace 2011-11-04 16:24:34 +01:00
Jordan Sissel
358f0ce96b url: add '.' '+' and '-' in url protocol
- Based on BNF from RFC 1738 section 5.
- Added tests to cover svn+ssh and some other examples
2011-11-04 13:36:06 +01:00
Ben Noordhuis
5fd012e67a fs: don't use octal values, not allowed in strict mode 2011-11-04 13:10:07 +01:00
Ben Noordhuis
8974ba31a3 test: fix simple/net-pipe-connect-errors
When trying to connect to something that is not a UNIX socket, Linux returns
ECONNREFUSED, not ENOTSOCK.

We cannot atomically determine if the other end is a) a stale socket, or b) not
a socket at all, so let's accept both error codes.
2011-11-04 05:30:00 +01:00
Ryan Dahl
cf78d04ae2 Upgrade libuv to 9c7ed0d
Fixes test-net-pipe-connect-errors.js on UNIX.
See #2001.
2011-11-03 16:33:54 -07:00
Fedor Indutny
b904a078d8 report debugger's test errors 2011-11-03 14:11:14 -07:00
Ryan Dahl
a936768890 stdout and stderr are blocking when referring to regular files
Fixes message tests.
2011-11-03 13:27:33 -07:00
Ryan Dahl
4a8088a603 Socket.write should reset timeout timer.
Fixes #2002.
2011-11-03 12:37:04 -07:00
Ben Noordhuis
9c11e8a1ca net: implement Server.prototype.address() for pipes 2011-11-03 19:16:10 +01:00
Maciej Małecki
481c17504d test error codes related to pipes
This tests passes on node v0.4, but fails on node v0.5. v0.5 seems to
generally lack error codes for various error events related to UNIX
pipes.

Fixes #2001
2011-11-03 10:54:00 -07:00
Ryan Dahl
2dd68af334 Remove -Werror from V8 build 2011-11-03 10:46:16 -07:00
Ryan Dahl
0e9c1ca673 Downgrade V8 to 3.6.4 2011-11-03 10:34:22 -07:00
koichik
a6dbe0ff23 docs: make fs.mkdir()'s mode argument an option. 2011-11-03 20:04:22 +09:00
Ben Noordhuis
11d68eb3fc fs: make mkdir() default to 0777 permissions
Fixes #1999.
2011-11-03 09:37:23 +01:00
Ben Noordhuis
52eaac4382 uv: upgrade to 0fb3769 2011-11-03 03:25:11 +01:00
Ben Noordhuis
818f0cba55 v8: fix freebsd build, implement VirtualMemory class 2011-11-03 03:23:59 +01:00
Igor Zinkovsky
434ccd2e20 fix process.uptime() on windows 2011-11-02 18:27:43 -07:00
Igor Zinkovsky
24a69d22a0 process.kill to use uv_kill 2011-11-02 17:34:17 -07:00
Ben Noordhuis
359a65a6db http: emit Error object after .abort()
It was emitting the net.Socket object due to misuse of the arguments object.

Fixes #1399.
2011-11-03 01:30:03 +01:00
Igor Zinkovsky
143aeb9ea7 upgrade libuv to e1bee05ecdbffbe9de37830530ad2ae2f1fb41c8 2011-11-02 16:51:26 -07:00
Ryan Dahl
850609ea2d Remove separation of libuv tests 2011-11-02 16:38:59 -07:00
Ben Noordhuis
1ba834bd3f docs: http: link to relevant net.Socket methods 2011-11-03 00:22:02 +01:00
Fedor Indutny
9ad27f7853 ignore undefined messages in the debugger repl
fixes #1995
2011-11-02 15:55:36 -07:00
Ben Noordhuis
c8646e0c41 test: add ChildProcess.prototype.killed test case 2011-11-02 18:37:34 +01:00
Maciej Małecki
6bd0bcd5af child_process: in a new ChildProcess set killed to false
This behavior is consistent with what v0.4 does.
2011-11-02 18:17:51 +01:00
Ryan Dahl
60818b957c Add missing copyright headers 2011-11-02 10:00:57 -07:00
Ben Noordhuis
672b453a76 docs: http: fix docs for the 'close' event 2011-11-02 17:28:46 +01:00
Ben Noordhuis
edea4122b1 Revert "Upgrade V8 to 3.7.1"
This reverts commit 92f5a5d3ca.

V8 3.7.1 in debug mode on ia32 has a curious race-like bug where an fs.Stats
object is not fully formed until some time after it's created. This is easy
to demonstrate by running `make test-debug`.

V8 3.7.0 does not exhibit this behaviour so back we go.

Fixes #1981.
2011-11-02 16:58:35 +01:00
Igor Zinkovsky
cc92234068 fix pummel/test-net-throttle on windows 2011-11-01 16:44:08 -07:00
Maciej Małecki
fc61134b1a doc: fix links
Changes:

  * 'http://github.com' => 'https://github.com'
  * 'https://github.com/ry/node' => 'https://github.com/joyent/node'
  * 'https://github.com/ry/http-parser' =>
    'https://github.com/joyent/http-parser'
  * old issue links
  * wiki link
2011-11-01 22:26:52 +01:00
Igor Zinkovsky
3060266ff1 windows: enable pending accepts knob 2011-11-01 14:14:52 -07:00
Ben Noordhuis
21b64dc7c9 uv: upgrade to 90b0b7d 2011-11-01 22:11:58 +01:00
Ben Noordhuis
37bb37d151 os: rename getNetworkInterfaces() to networkInterfaces() 2011-11-01 18:10:06 +01:00
Maciej Małecki
b4afe605f4 node: remove process.compile
It was deprecated before v0.4.
2011-11-01 17:45:21 +01:00
Ben Noordhuis
362b5a6c40 process: fix process.nextTick() error case regression
Patch and test by Koichi Kobayashi.
2011-11-01 16:30:43 +01:00
koichik
f5a01d1764 test: fix test/message/undefined_reference_in_new_context.js
after 4d4900f, stack trace was changed.
2011-11-01 19:30:19 +09:00
isaacs
06190928c0 doc: Correct blatantly wrong futimes documentation 2011-10-31 16:31:59 -07:00
Ben Noordhuis
4d4900fc65 process: optimize process.nextTick()
33% performance boost on large nextTick queues.
2011-10-31 22:31:14 +01:00
Ben Noordhuis
5fee1ff7bc bench: add process.nextTick() benchmark 2011-10-31 22:02:46 +01:00
koichik
f53d092a2a tls, https: add passphrase option
Fixes #1925.
2011-10-31 17:36:43 +09:00
Ben Noordhuis
b6c582a3a3 docs: tty: remove tty.open() documentation 2011-10-30 21:22:46 +01:00
Ben Noordhuis
a1fa3efd2b core: fix off-by-one error in node::DLOpen()
Fixes loading of modules that use the NODE_MODULE macro on POSIX platforms.
2011-10-30 17:35:08 +01:00
Ben Noordhuis
26874e2e07 docs: addons: fix example 2011-10-30 17:15:10 +01:00
koichik
8a729270c1 fix for --harmony_block_scoping
Fixes #1969.
2011-10-31 00:49:20 +09:00
koichik
52c2988f16 docs: fix option's name of cluster.startMaster() 2011-10-30 11:40:31 +09:00
Ben Noordhuis
a7803c58e4 uv: upgrade to 70381ce 2011-10-30 02:56:51 +01:00
Siddharth Mahendraker
12cf730b69 events: separate maxListeners and _events
Fixes #1479.
Fixes #1923.
2011-10-30 02:14:30 +01:00
Igor Zinkovsky
6d7aa65399 fix pummel/test-child-process-spawn-loop.js on windows 2011-10-28 18:32:27 -07:00
Bert Belder
60efa608d6 Upgrade libuv to e4d6509211 2011-10-29 01:33:01 +02:00
Bert Belder
a56a95b652 Export some functions from node.h 2011-10-29 01:06:53 +02:00
Bert Belder
4a1efb2b9c Support native extension loading on Windows 2011-10-29 01:06:51 +02:00
Bert Belder
dd93c53c4e Make node::DLOpen use uv_dlopen 2011-10-29 01:06:49 +02:00
Bert Belder
2f22024806 Upgrade libuv to 90e15f1110 2011-10-29 01:06:47 +02:00
Bert Belder
c0c4bd4efa Add common.gypi to gyp output 2011-10-29 01:06:45 +02:00
Bert Belder
889620dcd2 Wrap long lines, strip trailing whitespace 2011-10-29 01:06:44 +02:00
Bert Belder
1e2d777601 Remove outdated comment 2011-10-29 01:06:42 +02:00
Bert Belder
6a6a70e80e Fix v8 build on Windows
There's probably a better way to fix this
2011-10-29 01:06:40 +02:00
Igor Zinkovsky
56315494dd fix simple/test-child-process-double-pipe on windows 2011-10-28 15:57:39 -07:00
Igor Zinkovsky
f35a396c54 Revert "remove node_io_watcher"
This reverts commit cc2ac1ccc7.
2011-10-28 15:35:38 -07:00
Ben Noordhuis
ccd8b55b01 linux: unbreak build if HAVE_MONOTONIC_CLOCK=0 2011-10-28 23:47:08 +02:00
Ben Noordhuis
004e6fbe1f docs: addons: fix NODE_SET_METHOD example 2011-10-28 22:36:55 +02:00
Zachary Scott
e35ce7baa1 docs: tty: stdin must be initialized before calling setRawMode 2011-10-28 22:32:04 +02:00
Ben Noordhuis
1d94d4fa70 docs: fix home page link to API docs 2011-10-28 18:22:39 +02:00
Ben Noordhuis
3dee0e4cd8 zlib: compile without -ansi
Source contains C++ / C99 comments, gcc in strict mode doesn't like that.
2011-10-28 17:31:40 +02:00
Igor Zinkovsky
cc2ac1ccc7 remove node_io_watcher 2011-10-27 16:47:37 -07:00
koichik
173f91c791 docs: add zlib.createXxx() functions 2011-10-27 21:21:54 +09:00
Ben Noordhuis
b9529545e1 v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Re-applies 4908e5bf7a.
2011-10-27 11:22:07 +00:00
Ryan Dahl
92f5a5d3ca Upgrade V8 to 3.7.1 2011-10-27 00:48:23 -07:00
Tj Holowaychuk
528c28587f cluster: Add some docs, improve cluster.isWorker()
Fixes #1949.
2011-10-26 16:42:00 -07:00
Ryan Dahl
c5d54010bc node cluster is now a module instead of CLI interface
This is to make room for master process plugins instead of adding CLI
options as proposed in #1879.
2011-10-26 13:50:53 -07:00
Nathan Rajlich
4fb2ac5be1 Add test cases for #1944. 2011-10-27 04:58:51 +09:00
Nathan Rajlich
ebefe77bc0 More bulletproof util.inspect() function.
Use the *real* versions of the Date and RegExp functions, from the
prototype. This defends against code like:

  var d = new Date()
  d.toUTCString = null
  util.inspect(d)
    // TypeError: toUTCString is not a function

Fixes #1944.
2011-10-27 04:58:34 +09:00
Nathan Rajlich
d4379fcee3 Add test case for #1941.
Add test for the false-positives from #1942.
Fix test-sys.js.
2011-10-27 04:33:24 +09:00
Nathan Rajlich
2dbb470ea1 Don't use instanceof in lib/util.js "is" checks.
While using `instanceof`, these functions could easily be faked with something
like:  Object.create(Date.prototype)

So let's just not use it at all. A little slower, but these functions are only
used in the REPL / for debugging so it's OK.

Fixes #1941.
Fixes #1942.
2011-10-27 04:33:24 +09:00
Ryan Dahl
194511ff1a Return IPv4 addresses before IPv6 addresses from getaddrinfo 2011-10-26 12:28:25 -07:00
Nathan Rajlich
3524f41a27 Add docs for the type checking functions in util.js. 2011-10-27 03:38:29 +09:00
Nathan Rajlich
a6a04fb1ec Add test case for the util.js type checking functions. 2011-10-27 03:38:29 +09:00
Nathan Rajlich
b8f3e18a5d Export the type checking functions from util.js.
As per discussion at:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/b08970166e4670cf
2011-10-27 03:38:29 +09:00
Ryan Dahl
b3ddb895d2 Don't compile in node_dtrace.cc when not supported 2011-10-26 11:36:21 -07:00
Zachary Scott
3961b5a131 docs: update email address 2011-10-26 20:00:54 +02:00
Zachary Scott
7fb8c7c37f docs: update socket.io url 2011-10-26 20:00:10 +02:00
koichik
cbcaeedba9 tls: add address(), remoteAddress/remotePort
Fixes #758.
Fixes #1055.
2011-10-27 00:28:16 +09:00
koichik
0e8a55d2a2 tls: does not emit 'end' from EncryptedStream
de09168 and 4cdf9d4 breaks `test/pummel/test-https-large-response.js`.
It is never finished.

Fixes #1936.
2011-10-27 00:18:29 +09:00
Ben Noordhuis
13871fa2f8 build: fix sunos gyp build, include platform file 2011-10-26 05:11:38 +00:00
Ben Noordhuis
15628f6735 sunos: don't use exceptions
Don't use exceptions in platform functions. Fix a resource leak
(leaked kstat handle) while we're at it.
2011-10-26 05:09:21 +00:00
Ben Noordhuis
d7dff34bad gyp: support older bash versions
Older bash versions in `sh -c` mode don't parse `export FOO=42` constructs,
they bail out with a "FOO is not an identifier" error message.

This was fixed somewhere between bash 4.1.0 and 4.1.5 but let's support the
older versions anyway.
2011-10-26 04:59:31 +00:00
Ben Noordhuis
b8847e9ac6 uv: upgrade to 0cb2213 2011-10-26 00:05:24 +02:00
Igor Zinkovsky
0a5708c3e9 fix test-http-curl-chunk-problem.js and test-pipe-file-to-http.js on windows 2011-10-25 14:10:12 -07:00
Ben Noordhuis
680765abec http: fix gcc 3.x build, don't use always_inline 2011-10-25 19:18:58 +00:00
Ben Noordhuis
dddfd0f8b8 test: spawn process.argv[0], not 'node'
'node' may or may not be on the path and may or may not be the version we are
running the test suite for.
2011-10-25 02:24:51 +02:00
Nathan Rajlich
58cb0fa639 Directly export the Stream constructor.
Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.

Fixes #1933
2011-10-24 15:45:35 -07:00
Ryan Dahl
239b3d62de Remove resume and pause events
Too complex; unnecessary.
2011-10-24 13:23:59 -07:00
isaacs
4c5751ba97 Close #1929 zlib Respond to 'resume' events properly 2011-10-24 12:55:45 -07:00
Maciej Małecki
7ee29d1d5b net: Server.listen, Server.close and Socket.connect return this
Just a syntactic sugar for doing, for example:

    var server = net.createServer(function (c) {
      c.end('goodbye, cruel world!\r\n');
      server.close().on('close', function () {
        console.log('really, goodbye!');
      });
    }).listen(1337);

Fixes #1922.
2011-10-24 22:19:42 +09:00
koichik
00aa8935d7 docs: improvement fs, http and https 2011-10-22 23:40:15 +09:00
seebees
216570b5e1 Lint 2011-10-22 14:14:40 +09:00
seebees
a2eaddaa51 Documentation update
http.markdown
  note options now align with url.parse
  added note that hostname is preferred over host.
  added auth
  added not that setting an explicit Authorization header will override basic authentication with 'auth'

https.markdown
  Made a link to http.request and noted that all http.request options are valid.

url.markdown
  added path option
2011-10-22 14:14:40 +09:00
seebees
1ead20f274 remove auth from host
Fixes #1626
2011-10-22 14:14:40 +09:00
seebees
005d607aed http.request(url.parse(x))
http2.js

protocols object to store defaults for http and https, and use as a switch for supported protocols.
options.hostname > options.host > 'localhost'
if I have an options.auth element and I do not have an Authorization header, I do basic auth.
http.request collapses to new ClientRequest since the defaults are handled by the protocol object

test-http-url.parse*

Fixes #1390

Conflicts:

	lib/http2.js
2011-10-22 14:14:40 +09:00
seebees
be4576de7a url.resolveObject(url.parse(x), y) == url.parse(url.resolve(x, y));
added a .path property = .pathname + .search for use with http.request

And tests to verify everything.
With the tests, I changed over to deepEqual, and I would note the comment on the test
['.//g', 'f:/a', 'f://g'], which I think is a fundamental problem

This supersedes pull 1596
2011-10-22 14:14:39 +09:00
koichik
ed744ecbfd docs: remove #1914 from Changelog. 2011-10-22 14:02:36 +09:00
Nathan Rajlich
bdb9d09aef Print out undefined on the REPL when returned.
util.inspect() has a special case for "undefined", so it's nice to be able to
distinguish visually that undefined is the result of an expression.
2011-10-22 14:02:35 +09:00
koichik
7e2d799328 docs: fix typo 2011-10-22 14:02:35 +09:00
Ryan Dahl
9b808c2d1b Now working on v0.5.11 2011-10-21 19:16:06 -07:00
Ryan Dahl
220e61c1f6 Bump version to v0.5.10 2011-10-21 18:46:42 -07:00
Ben Noordhuis
dd6faa5adf uv: upgrade to 179f475 2011-10-21 18:44:19 -07:00
Ben Noordhuis
ac379b3be1 net: bring back .setNoDelay() and .setKeepAlive() 2011-10-21 18:09:23 -07:00
Ben Noordhuis
401c073dd2 uv: upgrade to ec825ff 2011-10-21 18:09:17 -07:00
Ryan Dahl
493d3b9f7c Merge remote branch 'origin/v0.4'
Conflicts:
	ChangeLog
	Makefile
	deps/libev/wscript
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	src/platform_cygwin.cc
	test/pummel/test-net-write-callbacks.js
	test/simple/test-buffer.js
2011-10-21 18:02:30 -07:00
Igor Zinkovsky
8498ee03bc make simple\test-fs-symlink.js work on windows 2011-10-21 17:31:32 -07:00
Maciej Małecki
8f1ba251dd test: #1899 - output in child process raises an exception 2011-10-21 15:53:09 -07:00
Ryan Dahl
d5a21a29f8 getaddrinfo returns ENOTFOUND for invalid domain names
change test-http-dns-error to reflect this.
2011-10-21 15:19:53 -07:00
Ryan Dahl
efa95c2718 Fix test-eio-race on Windows 2011-10-21 14:55:28 -07:00
Ben Noordhuis
3c3ec7b2d7 gyp: upgrade to r1081 2011-10-21 13:49:29 -07:00
Ryan Dahl
9b2335a356 Upgrade libuv to 7738306 2011-10-21 13:44:30 -07:00
Ryan Dahl
de09168e5a Emit 'end' from crypto streams on close
Fixes test/simple/test-tls-peer-certificate.js on Windows

Patch from bnoordhuis.

See also 75a0cf970f
2011-10-21 13:16:41 -07:00
isaacs
2d02e6a992 Add useGlobal flag for standard node repl 2011-10-21 13:02:49 -07:00
isaacs
caf70f5e94 Revert "Don't use a separate context for the repl."
This reverts commit b70fed48a7.
2011-10-21 13:00:37 -07:00
Ben Noordhuis
0ae98dfc66 build: fix wscript on solaris
os.path.exists() in python 2.5.2 returns false for symlinks.
2011-10-21 12:46:55 -07:00
Igor Zinkovsky
69b73f9cf0 make process.kill a no-op on windows 2011-10-21 10:27:22 -07:00
Ryan Dahl
fafb584881 Fix race condition in test-dgram-pingpong 2011-10-21 10:21:23 -07:00
Ben Noordhuis
84d0b1bcc5 http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
2011-10-20 19:19:02 -07:00
Ryan Dahl
c83dda89a4 dns.lookup uses cares_wrap::GetAddrInfo 2011-10-20 18:03:02 -07:00
Ryan Dahl
fb3cccc257 Upgrade libuv to 2c7e8bb 2011-10-20 17:58:35 -07:00
Bert Belder
00bbe958c4 Fix windows build 2011-10-20 15:40:08 -07:00
Ben Noordhuis
145aa636b9 uv: upgrade to 28234d7 2011-10-20 15:30:09 -07:00
Ryan Dahl
be2320d408 Add binding to uv_getaddrinfo 2011-10-20 15:06:53 -07:00
Nathan Rajlich
95d530f2b4 repl: print out undefined
util.inspect() has a special case for "undefined", so it's nice to be able to
distinguish visually that undefined is the result of an expression.
2011-10-20 08:41:33 -07:00
Fedor Indutny
b43eb9678b debugger: fix backtrace err handling 2011-10-20 08:37:51 -07:00
Ben Noordhuis
9bb3a683fe docs: improve buffer.fill() documentation
Fixes #1912.
2011-10-19 18:20:55 -07:00
Ryan Dahl
6cc42927d8 Display sys_errno when UV_UNKNOWN is returned 2011-10-19 16:53:07 -07:00
Ryan Dahl
88af0c8635 Remove os.openOSHandle
Unused.
2011-10-19 16:28:58 -07:00
Ryan Dahl
67b235735e Remove support for cygwin 2011-10-19 16:23:26 -07:00
Ryan Dahl
9d27faa2c4 Revert "Fix #1801 vm: Use 'sandbox' as global_prototype"
Accidentally committed. Revert until review.

This reverts commit 200df8641b.
2011-10-19 11:01:08 -07:00
Thomas Parslow
b0f78afe58 http: Added support for HTTP PATCH verb
Fixes #1907.
2011-10-19 19:59:16 +09:00
koichik
6a72e52520 buffer: use NO_NULL_TERMINATION flag
Refs #394.
Fixes #1902.
2011-10-19 15:03:00 +09:00
isaacs
b70fed48a7 Don't use a separate context for the repl.
Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
2011-10-18 18:18:32 -07:00
elliottcable
200df8641b Fix #1801 vm: Use 'sandbox' as global_prototype
Squashed commit:

(- re tests) Cleaning up the `Script` test suite.

For whatever reason, there were several duplicate test files related to `Script`
and the `'vm'` module. I removed these, and fixed a few other small issues.
(More fixes coming in subsequent commits.)

Squashes: 19e86045a0..1e3dcff4eb

(api fix:1801 new:1801) `'vm'` module uses sandbox as prototype

As described in GH-1801, the `'vm'` module was handling the `sandbox` object
provided by the API consumer in a particularly terrible and fragile fashion: it
was simply shallow-copying any enumerable properties from the sandbox onto the
global context before executing the code, and then eventually copying any values
on the global context back into the sandbox object *afterwards*.

This commit removes all of that implementation, and utilizes the passed sandbox
object as the *prototype of the context* instead. A bit of a hack, but a very
effective one.

This no longer allows for new variables created in the global context to be
placed into your sandbox after execution has completed, but that’s for the best
anyway, as it’s not very in line with the concept of a “box of passed-in
context.” I’m planning to further implement an interface for API consumers to
acquire the *actual global* from within the VM soon, thus allowing for
separation-of-concerns: providing data *to* the VM via the sandbox-prototype,
and exploring the internal environment of the VM itself.

// GitHub cruft: closes #1801

Squashes: 43b8e3c..209ed86
2011-10-18 17:56:35 -07:00
Ryan Dahl
d9bc8455cb Fix test-c-ares.js on Windows by disabling PTR test 2011-10-18 16:12:07 -07:00
Ryan Dahl
6cc0c9e6a9 Remove superfluous nextTick during server binding
This breaks fork().send({}, server._handle) after server.listen() because
server._handle is not set.
2011-10-18 15:12:18 -07:00
Ryan Dahl
dbfc8198a6 Upgrade GYP to r1078 2011-10-18 14:39:39 -07:00
Ryan Dahl
5783a52a9c Remove process.memoryUsage().vsize
Not meaningful cross platform; unused.
2011-10-18 14:31:37 -07:00
Ryan Dahl
d77ce4b998 Fixes #1860. Remove process.writeError
Breaks a few tests in "make test-message"
2011-10-18 13:12:50 -07:00
koichik
d2698d1822 http: add test for #1885 2011-10-17 16:14:35 +09:00
Yoshihiro Kikuchi
f90ba61478 http: tiny fix in http.js
Fixes #1885.
2011-10-17 01:14:45 +09:00
koichik
cdec7e3ae5 docs: improvement tls example 2011-10-16 16:50:16 +09:00
Igor Zinkovsky
5ca3dcd127 test: fix test-child-process-stdin and test-child-process-kill on windows 2011-10-15 22:55:24 +02:00
koichik
d6191f593d net: fix error handling in listen()
Fixes #1894.
2011-10-16 01:30:19 +09:00
koichik
86a67f15a0 docs: add example of tls 2011-10-16 01:26:38 +09:00
koichik
68cc173c6d tls: The TLS API is inconsistent with the TCP API
Add 'secureConnect' event to tls.CleartextStream.

Fixes #1467.
2011-10-15 19:27:21 +09:00
Ben Noordhuis
0b92fa0e93 net: fix connect queue bugs
This commit fixes two bugs in the handling of write requests when the connect()
call is still in progress.

1. The deferred write request's size was counted twice towards `.bytesWritten`.

2. The callback was not called. After connecting, `Socket.write()` was called
   with three arguments (data, encoding, cb) but it ignored the third argument.

Coincidentally fixes test/simple/test-net-connect-buffer.js.
2011-10-15 03:34:09 +02:00
Ben Noordhuis
6df574b744 net: properly account multi-byte chars in .bytesWritten 2011-10-15 03:24:34 +02:00
Igor Zinkovsky
971c3d90eb win: remove pthread-win32 init code 2011-10-15 02:50:16 +02:00
Igor Zinkovsky
107b05772a build: fix windows build 2011-10-15 02:12:53 +02:00
Ben Noordhuis
2f8596ee10 test: fix bug in setproctitle test
Output from `ps` may contain trailing whitespace, trim it.
2011-10-15 02:07:57 +02:00
Ben Noordhuis
4908e5bf7a v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Un-reverts 9bbca99107.
2011-10-14 23:29:35 +00:00
isaacs
e6f147141e doc: Add examples of zlib usage with http 2011-10-14 16:15:08 -07:00
Ben Noordhuis
b6a869ef4f test: check that EventEmitter.on == EventEmitter.addListener 2011-10-15 01:08:41 +02:00
Ben Noordhuis
018e110cd1 test: replace .addListener() calls with .on() 2011-10-15 01:08:36 +02:00
Ben Noordhuis
3108a9ee38 uv: upgrade to 456f831 2011-10-15 00:42:10 +02:00
koichik
19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
koichik
a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00
Ben Noordhuis
e0297ca59b node: fix use of potentially uninitialized variable 2011-10-14 15:05:02 +00:00
Ben Noordhuis
87b34c94fa timer_wrap: add sanity check assert 2011-10-14 15:01:26 +00:00
Ben Noordhuis
9193062e70 tcp_wrap: add sanity check asserts 2011-10-14 15:01:26 +00:00
Ben Noordhuis
0dc844de17 node_script: remove unused variable 2011-10-14 15:01:21 +00:00
Ben Noordhuis
dc0b7364b5 node: fix arguments to uv_timer_start() 2011-10-14 14:43:49 +00:00
Ben Noordhuis
f1d3ae7753 cares_wrap: make destructor virtual
A class with virtual methods should have a virtual destructor.
2011-10-14 14:39:25 +00:00
Ryan Dahl
33b5f2f779 Upgrade V8 to 3.7.0 2011-10-13 17:45:02 -07:00
isaacs
59a5262041 Fix #1882 zlib Update 'availOutBefore' value, and test 2011-10-13 16:47:51 -07:00
Guglielmo Ferri
66a10b6e58 docs: add API documentation note about UDP datagram size 2011-10-13 18:10:01 +02:00
Maciej Małecki
683c1c6583 docs: document process.versions 2011-10-13 17:02:54 +02:00
Simen Brekken
4b0e36810a net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
2011-10-13 16:09:14 +02:00
Ben Noordhuis
fab68aa1ed platform: support long process names on linux 2011-10-13 15:48:02 +02:00
Ben Noordhuis
5faff9ebdf test: test long process name support
On platforms that support it: linux, freebsd, darwin
2011-10-13 15:47:05 +02:00
koichik
1b55010a04 docs: added .json modules. 2011-10-13 17:06:27 +09:00
Brian White
f243ca199b docs: mention util instead of sys 2011-10-13 05:06:42 +02:00
Ryan Dahl
3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Ilya Dmitrichenko
39987cbc80 docs: improved fs.Stats section in API documentation 2011-10-13 02:25:30 +02:00
Arnout Kazemier
e3d2ae0bfd sys has been moved to util 2011-10-13 02:21:37 +02:00
Ryan Dahl
e911171e03 Move some slow tests to pummel 2011-10-12 16:59:00 -07:00
Ryan Dahl
7b4370e5f8 Fix test/pummel/test-watch-file.js 2011-10-12 16:19:46 -07:00
Ryan Dahl
651b8a06d6 Fix test/pummel/test-exec.js 2011-10-12 16:12:24 -07:00
Karl Skomski
9557020dc1 New win32 platform function: GetCPUInfo
Fixes #1644
2011-10-12 15:10:19 -07:00
Daniel Ennis
59be975322 Improve IPC performance.
Reading of JSON data off the buffer, 10-15% performance increase.

Fixes #1864.
2011-10-12 15:06:51 -07:00
Ryan Dahl
73b4b86d29 Add cluster.js to node.gyp 2011-10-12 14:51:25 -07:00
Ryan Dahl
de7fb33879 Add some docs for node cluster 2011-10-12 14:19:32 -07:00
Ryan Dahl
08cb8fce67 Remove process.ARGV
Use process.argv instead.
2011-10-12 14:10:37 -07:00
Ryan Dahl
25ff181300 Revert some changes made in 12486a6
Some of the perf improvements from many-writes-fix branch were accidentally
undone in that commit. This puts them back in.
2011-10-12 12:49:58 -07:00
Ryan Dahl
16e1d5b5ce Remove uname and git-rev detection from http_simple.js 2011-10-12 12:29:40 -07:00
Ryan Dahl
b8966872b3 Upgrade libuv to c903bc3 2011-10-12 12:27:46 -07:00
Ben Noordhuis
6ed8d41ddd docs: fix child_process.send() example 2011-10-12 17:44:47 +02:00
Ben Noordhuis
bc96302fae uv: upgrade to 25a177a
Fixes #1869.
2011-10-12 17:37:35 +02:00
Ben Noordhuis
c82828ec27 test: add test for #1869
fs.readdir() on file should raise ENOTDIR, not UNKNOWN.
2011-10-12 17:37:30 +02:00
Ben Noordhuis
752571c7ba Remove --use-legacy switch from --help section. 2011-10-12 15:47:20 +02:00
Ryan Dahl
87339a22b1 introduce node cluster 2011-10-12 02:58:35 -07:00
Igor Zinkovsky
99757cbeb2 fix simple/test-fs-utimes.js on windows 2011-10-11 22:50:16 -07:00
Ryan Dahl
2b46959075 Add throughput benchmark 2011-10-11 22:40:04 -07:00
Igor Zinkovsky
f164704383 fs.watch documentation 2011-10-11 18:28:16 -07:00
Ryan Dahl
e0b59e7dbc Remove more dead code 2011-10-11 15:20:12 -07:00
Ryan Dahl
7085a04a1e Remove process.ENV 2011-10-11 15:17:32 -07:00
Ryan Dahl
83fce75700 Remove stdio binding source - somehow this was missed in cdf5d91 2011-10-11 14:59:39 -07:00
Ryan Dahl
0e2bbac4e0 Fix test-module-load-list.js 2011-10-11 14:49:39 -07:00
Ryan Dahl
9631e29933 Remove tests relying on !process.features.uv 2011-10-11 14:47:02 -07:00
Ryan Dahl
c8dbaf579c Remove --use-legacy and --use-uv 2011-10-11 14:39:31 -07:00
Ryan Dahl
4f59041990 Fix windows build 2011-10-11 14:25:50 -07:00
Ryan Dahl
cdf5d91fe5 Remove tty_legacy 2011-10-11 13:41:33 -07:00
Ryan Dahl
71cce3f45b Remove dgram_legacy 2011-10-11 13:26:41 -07:00
Ryan Dahl
58e892dadd Remove dns_legacy 2011-10-11 13:21:30 -07:00
Ryan Dahl
96e423a665 Remove child_process_legacy 2011-10-11 13:16:33 -07:00
Ryan Dahl
be0bb2dc13 Remove net_legacy timers_legacy 2011-10-11 13:11:54 -07:00
Ryan Dahl
d2b8037ed0 disable test-sendfd 2011-10-11 13:03:29 -07:00
Fedor Indutny
178e2ce65f docs: improve addons, readline, repl documentation 2011-10-11 21:44:09 +02:00
Ben Noordhuis
49c3a910c6 docs: fix typo in code snippet 2011-10-11 21:05:45 +02:00
Ryan Dahl
53c163cd5b Disable test-child-process-custom-fds.js 2011-10-11 11:27:58 -07:00
Ryan Dahl
728b04067d Upgrade libuv to 4ac1309
Fixes #1857
2011-10-11 10:51:07 -07:00
Tomasz Janczuk
6fadbec797 wix project to create msi installer for windows
Fixes #1706.
2011-10-11 10:29:03 -07:00
Ryan Dahl
b280a2d44d Remove ANOTHER old TODO list 2011-10-11 10:08:49 -07:00
Ryan Dahl
4f4f6dfce8 Remove old TODO list 2011-10-11 10:08:09 -07:00
Ryan Dahl
a29421bcfd Delete another CMake file 2011-10-11 10:07:36 -07:00
Ryan Dahl
6a371834d8 Remove cmake build system
This removes one of the three build systems. CMake has never been officially
supported and is not updated with WAF and GYP. WAF itself is considered
legacy and will be removed once the GYP system is feature complete on
Unixes. GYP is used currently on Windows/MSVS.
2011-10-11 09:58:38 -07:00
Ben Noordhuis
6cb1d26924 v8: fix gyp build on windows 2011-10-11 17:21:35 +02:00
Ben Noordhuis
c215262db4 uv: upgrade to 47d22ac 2011-10-11 16:56:43 +02:00
Ryan Dahl
24dabec039 now working on v0.5.10 2011-10-10 18:56:37 -07:00
Ryan Dahl
3bd9b08fb1 Bump version to v0.5.9 2011-10-10 18:18:56 -07:00
Ryan Dahl
07703fa78e Revert "v8: implement VirtualMemory class on SunOS"
This reverts commit 9bbca99107.
2011-10-10 18:18:12 -07:00
Ryan Dahl
3b1d656da5 Revert "Upgrade V8 to 3.6.6"
Not stable enough.
- Windows snapshot linking broken
- Linux crash on ./node_g test/simple/test-stream-pipe-multi.js

This reverts commit 56e6952e63.
2011-10-10 17:58:30 -07:00
Ben Noordhuis
9bbca99107 v8: implement VirtualMemory class on SunOS 2011-10-10 17:06:24 -07:00
Ryan Dahl
75cfc77527 Upgrade libuv to f7f518a 2011-10-10 17:05:18 -07:00
Ryan Dahl
8c738fa90c child_process.fork: don't overwrite env
thanks to Malte-Thorben Bruns for pointing this out
2011-10-10 14:49:02 -07:00
Ryan Dahl
ca4a0fce65 Remove test-child-process-channel.js 2011-10-10 14:27:52 -07:00
Ryan Dahl
982b19dbd7 Adjust listenFD deprecation message. Remove test. 2011-10-10 14:24:56 -07:00
Ryan Dahl
2c25507b81 process.stderr goes through libuv now
This commit removes one assert from test-console.js in which we check that
process.stderr.write returns true. In the case of a dump to a file we cannot
guarantee this any longer now that it goes through fs.WriteStream.
2011-10-10 14:15:44 -07:00
Ben Noordhuis
6b9f559984 gyp: work around sunos python flock() bug
flock(LOCK_EX) always fails with EBADF, use fcntl(F_SETLK) instead.
2011-10-10 20:52:37 +00:00
Ryan Dahl
e6092f337c tty.WritableStream should be writable 2011-10-10 13:41:04 -07:00
Ryan Dahl
7cf787a2d1 Upgrade libuv to 5656e3
This modifies the TTYWrap constructor to add another argument specifying if
it's a readable or writable TTY . That is stdin or stdout. If a TTYWrap is
not readable then writes to it are blocking.

This makes process.stdout blocking.
2011-10-10 13:33:45 -07:00
isaacs
4f91b72dbe Fix #1851 Correct X/index doc 2011-10-10 12:44:20 -07:00
Ryan Dahl
56e6952e63 Upgrade V8 to 3.6.6 2011-10-10 11:52:42 -07:00
isaacs
ff942c6b39 Fix #1851 Correct X/index doc 2011-10-10 11:47:10 -07:00
Ryan Dahl
0fec213656 Update docs for server fd sharing 2011-10-10 11:36:00 -07:00
Ben Noordhuis
025f5c89c7 uv: upgrade to 41e8574 2011-10-10 16:56:02 +02:00
Ben Noordhuis
326ba25451 tty: unbreak --use-legacy
Fixes #1844.
2011-10-10 15:37:09 +02:00
Brian White
eb40dcb097 Fix typo for fs.write docs
Fixes #1843.
2011-10-09 16:51:42 +09:00
Bert Belder
d3f3f2e455 Windows: exit on ctrl+c
Fixes #1813
2011-10-08 02:52:07 +02:00
Igor Zinkovsky
af014c1a5e fix for simple/test-executable-path.js on windows 2011-10-07 17:48:47 -07:00
Ryan Dahl
12486a6437 Change API for sending handles
Does not support sending net.Server objects only raw TCPWrap objects.
2011-10-07 16:43:55 -07:00
Ryan Dahl
a23d8ad313 Upgrade libuv to 9f6024a
Fixes #1840
2011-10-07 15:20:35 -07:00
Ryan Dahl
26c08a3f35 Do load balancing test in test-child-process-fork2. 2011-10-07 13:58:55 -07:00
Bert Belder
153629c99a Some small optimizations 2011-10-07 13:38:23 -07:00
Ryan Dahl
29ec850478 Simplify arg parsing in String.write 2011-10-07 13:38:23 -07:00
Ben Noordhuis
1bb820a339 net: remove unconditional getpeername() call
Speeds up http_simple benchmark by about 1.0%
2011-10-07 13:38:23 -07:00
Bert Belder
ed65b7b375 Simplify writeReq handling in net_uv 2011-10-07 13:38:23 -07:00
talltyler
10f97f9424 Fixing #1774 about issues when running node with --harmony_block_scoping v8 option
Fixes #1837.
2011-10-08 04:33:10 +09:00
Bert Belder
fcad5e35fd Black hole tcp reads after destroy() 2011-10-07 19:03:23 +02:00
Ryan Dahl
899358e797 Add test-child-process-fork2 and fixes to make it work 2011-10-07 04:03:47 -07:00
Fedor Indutny
4561d9e07b Don't check sign of loadavg
Fixes #1838
2011-10-07 01:32:54 -07:00
Fedor Indutny
698455384f use uv for memory and loadavg functions 2011-10-07 01:31:35 -07:00
Ryan Dahl
b413c77583 Support sending handles to other processes
Needs test.
2011-10-07 01:30:28 -07:00
Ryan Dahl
d2ab314e08 Turn off V8's -Werror in GYP 2011-10-07 01:08:53 -07:00
Ryan Dahl
51f7ba4147 Merge branch 'ipc-binding' 2011-10-07 01:00:40 -07:00
Ryan Dahl
26c5905a99 Reimplement child_process.fork
Fixes test/simple/test-child-process-fork.js
2011-10-07 00:57:41 -07:00
Ryan Dahl
08c12de8e2 Upgrade libuv to 886b112 2011-10-07 00:47:13 -07:00
Ryan Dahl
f6d889523d mv test-child-process-spawn-node.js test/simple/test-child-process-fork.js 2011-10-06 22:56:29 -07:00
Ryan Dahl
471c5701c3 uv_write2 uv_read2_start binding 2011-10-06 22:31:57 -07:00
Ryan Dahl
f018be3b5f Print libuv counters after http_simple exits 2011-10-06 15:02:27 -07:00
Ryan Dahl
c344fbc285 Add process.uvCounters() for debugging 2011-10-06 14:59:38 -07:00
Ryan Dahl
311fe737e8 Upgrade libuv to 60c639f
Also remove unused src/stdio_wrap.cc
2011-10-06 12:34:24 -07:00
Bert Belder
4c1d441159 Fix gyp build 2011-10-06 21:25:13 +02:00
koichik
9797482568 docs: add example to net.connect()
Fixes #1824.
2011-10-06 21:36:46 +09:00
Colton Baker
87286cc737 Fixed a lot of jslint errors.
Fixes #1831
2011-10-05 18:51:06 -07:00
Ryan Dahl
627f379f22 upgrade libuv to 0303197 2011-10-04 16:53:20 -07:00
Ben Noordhuis
bc7cfd7cd7 http: remove legacy http library 2011-10-04 20:51:34 +02:00
Ben Noordhuis
976c6b0826 test: add TXT DNS record lookup test 2011-10-03 16:50:09 +02:00
Christian Tellnes
d9c67aebff dns: implement resolveTxt() 2011-10-03 16:41:29 +02:00
Ben Noordhuis
f1ca485357 zlib: fix assert message 2011-10-03 13:40:42 +02:00
Maciej Małecki
365fdbfc64 test: Update assert module tests 2011-10-02 02:25:52 +02:00
Maciej Małecki
f4f037aa64 docs: Update assert module docs 2011-10-02 02:25:52 +02:00
Maciej Małecki
8c8d518723 assert: Make assert module an assert.ok function
Code can be written:

    var assert = require('assert');
    assert(true);

instead of:

    var assert = require('assert');
    assert.ok(true);
2011-10-02 02:25:52 +02:00
Fedor Indutny
234afa5be1 docs: document watcher debugger commands 2011-10-02 02:19:17 +02:00
Ryan Dahl
f30cba2ba4 add zlib module to doc index 2011-09-30 17:01:07 -07:00
Ryan Dahl
8f23fd545d Now working on v0.5.9 2011-09-30 16:49:30 -07:00
Ryan Dahl
7cc17a0cea Bump version to v0.5.8 2011-09-30 13:59:44 -07:00
Fedor Indutny
360ce526fd debugger: watch, unwatch, watchers
Fixes #1800.
2011-09-30 13:22:56 -07:00
Ryan Dahl
4e43afd973 Fixes #1805. Reset TTY mode on exit. 2011-09-30 13:12:29 -07:00
Ryan Dahl
d1e6a13179 Upgrade libuv to fe18438 2011-09-30 13:12:12 -07:00
Ryan Dahl
007ddcd2cd Move test-net-write-callbacks to pummel
Runs in 3 seconds.
2011-09-30 10:31:39 -07:00
Ryan Dahl
49806864e4 Add test from v0.4 dea49e3
Note this test completes in 3 seconds on v0.4 and 7 minutes on master. NOT
GOOD.
2011-09-30 09:56:37 -07:00
koichik
530082932d docs: Added missing parenthesis to buffer.readUInt8 example.
Fixes #1790.
2011-09-30 17:05:50 +09:00
koichik
4cdf9d4158 tls: Improve TLS flow control
Fixes #1775.
2011-09-30 15:44:45 +09:00
koichik
49ac083dc1 tls: Add test for #1775 2011-09-30 15:44:13 +09:00
Ryan Dahl
84641fcdf0 WAF: Clean out/Release/deps/uv before build 2011-09-29 11:35:21 -07:00
Ryan Dahl
005448bdeb Don't ls node_g after make - it confuses people 2011-09-29 09:52:24 -07:00
Marco Rogers
3fc01d9770 docs: note about empty environment in child processes
Fixes #1794.
2011-09-29 19:50:25 +09:00
Ben Noordhuis
fa44659c66 test: fix typo in error message 2011-09-29 04:51:40 +02:00
Ryan Dahl
dea49e3d19 net: Fix string-concat hot path bug
Also removes functionality added in f9fec3a2d6
because it changes API. (That patch shouldn't have been added anyway.)
2011-09-28 17:49:33 -07:00
Fedor Indutny
1b8b097fad debugger: refactor, no more res.success checks
Fixes #1779.
2011-09-28 11:40:51 -07:00
Fedor Indutny
542156a6a1 debugger: use regexps in repl test
Fixes #1788
2011-09-28 11:39:45 -07:00
Ryan Dahl
416c14f644 Remove a few instances of process.binding('stdio') from src/node.js 2011-09-27 15:04:01 -07:00
Ryan Dahl
7e62bc9828 Move process.stdout unref hack to handle_wrap.cc
See #1726
2011-09-27 15:01:28 -07:00
Fedor Indutny
0a42266824 debugger: double ctrl+break on win should exit node
Fixes #1780.
2011-09-27 14:31:30 -07:00
Ryan Dahl
f63a1f8409 Merge branch 'new-tty-binding' 2011-09-27 13:13:21 -07:00
Ryan Dahl
41d811f41f Fix test-module-load-list.js 2011-09-27 13:11:09 -07:00
Bert Belder
c06af229dc Upgrade libuv to 2c0fca9a41 2011-09-27 13:03:29 -07:00
Bert Belder
81425598db Enable console colors on windows by default 2011-09-27 13:03:29 -07:00
Bert Belder
73fcd43b85 Add new tty js files to node.gyp 2011-09-27 13:03:28 -07:00
Ryan Dahl
2e389c6531 scope.Close in GuessHandleType; don't use uv_is_tty 2011-09-27 13:03:28 -07:00
Ryan Dahl
e1dc6e6d73 Bind uv_tty_get_winsize 2011-09-27 13:03:28 -07:00
Ryan Dahl
1de156abb1 Bind/use uv_guess_handle 2011-09-27 13:03:28 -07:00
Ryan Dahl
74b6426ec6 Initial pass at new TTY js layer
This breaks Windows.
2011-09-27 13:02:11 -07:00
Ryan Dahl
f5bdce9cc0 Disable test-dgram-unix.js test-dgram-unix-anon.js test-dgram-multicast.js 2011-09-27 12:52:48 -07:00
Fedor Indutny
95866a6445 debugger: export port
Fixes test-debugger-client.js

Fixes #1782.
2011-09-27 12:49:03 -07:00
Ryan Dahl
0f8f863043 Fixes #1726, hack to unref process.stdout 2011-09-27 12:41:59 -07:00
Ben Noordhuis
abfcd1fb00 docs: document crypto.randomBytes() 2011-09-27 20:27:57 +02:00
Ben Noordhuis
413d38c43b test: test crypto (P)RNG functions 2011-09-27 20:27:57 +02:00
Ben Noordhuis
c4eaf7e5a9 crypto: implement randomBytes() and pseudoRandomBytes() 2011-09-27 20:27:53 +02:00
Fedor Indutny
67706b8bb7 Export disableColors from repl, share with debugger 2011-09-27 11:58:02 +02:00
Fedor Indutny
f4124e18cb debugger: setBreakpoint('fn()')
Fixes #1777
2011-09-27 00:26:16 -07:00
Ryan Dahl
fa2eaeafda write-only streams should not shutdown
See
https://github.com/joyent/node/issues/1726#issuecomment-2207602
2011-09-26 23:25:50 -07:00
Ryan Dahl
040cf02724 Re-land Bert's test for #1697
Was reverted out in cde81a6675
2011-09-26 12:50:59 -07:00
isaacs
c828ded0c2 zlib: Typo. s/opt/opts/ 2011-09-26 11:50:20 -07:00
Fedor Indutny
c26cf84a08 debugger: fix backtrace with no frames
Fixes #1768
2011-09-26 10:57:19 -07:00
Fedor Indutny
02e0a0aa10 debugger docs
Fixes #1767
2011-09-25 12:38:06 -07:00
Fedor Indutny
82d0ac7ac7 Ctrl+Break on windows starts debugger server 2011-09-25 11:58:23 -07:00
Fedor Indutny
26aab0dc5d EnableDebug immediatly on SIGUSR1
Don't wait for script to break somewhere, because that may not happen if
execution is inside event-loop, not in v8.

Add '\n' to the end of 'debugger listening...' message
2011-09-25 11:58:22 -07:00
Fedor Indutny
9b6acc27aa handle backtrace errors 2011-09-25 11:58:22 -07:00
Fedor Indutny
2c9bcb28be move debugger_running to correct place 2011-09-25 11:58:22 -07:00
Fedor Indutny
9e09fc0508 more cli options
* node debug localhost:5858 - connects to remote debugger
* node debug -p `pgrep node` - connects to running process
* Fixed double-run of debugger on SIGUSR1
2011-09-25 11:58:22 -07:00
Ben Noordhuis
942b92a06e cygwin: fix new[]/delete mismatch 2011-09-25 03:59:50 +02:00
Ben Noordhuis
aff91f79ae cygwin: fix return of uninitialized variable 2011-09-25 03:59:50 +02:00
Ben Noordhuis
d91f64fcbb cygwin: fix new[]/delete mismatch 2011-09-25 03:34:19 +02:00
Ben Noordhuis
6ee676c0e4 cygwin: fix return of uninitialized variable 2011-09-25 03:34:12 +02:00
Eric Lovett
f9fec3a2d6 net: callback to socket.write should always be called asynchronously 2011-09-25 00:23:27 +02:00
Ben Noordhuis
f6bce20e5e buffers: handle bad length argument in constructor
Coerce fractional, negative and non-numeric length arguments to numbers.
Fractional numbers are rounded up, negative numbers and non-numeric values
are set to zero.
2011-09-24 18:31:56 +02:00
Ben Noordhuis
d157131439 buffers: handle bad length argument in constructor
Coerce fractional, negative and non-numeric length arguments to numbers.
Fractional numbers are rounded up, negative numbers and non-numeric values
are set to zero.
2011-09-24 18:27:03 +02:00
Ben Noordhuis
fcba1459f2 uv: upgrade to 8f617b9 2011-09-24 05:23:41 +02:00
Fedor Indutny
43cb4ec76b debugger fix for #1707 2011-09-23 13:42:41 -07:00
Fedor Indutny
39fec6003e debugger: remove useless clearlines, updated test
* remove useless clearline call at Interface start
* silence after .handleBreak()
* output '\b' if this.stdout is not a tty (debugger)
* add '\b' checks for clearline (test)
2011-09-23 13:42:41 -07:00
Fedor Indutny
e406613ee5 test-debugger-repl improvements 2011-09-23 13:42:41 -07:00
Fedor Indutny
78d91ff074 don't use global vars 2011-09-23 13:42:41 -07:00
Fedor Indutny
2010071339 readline: custom streams support 2011-09-23 13:42:41 -07:00
Ben Leslie
a4e10cdb07 Raise an error when a malformed package.json file is found.
The current behaviour will silently ignore any parsing errors
that may occur when loading a package.json file. This makes
debugging errors in the package.json file very difficult.

This changes the behaviour that that errors opening and reading
the file package.json file continue to be ignored, but errors
in parsing will throw an exception.
2011-09-23 12:00:26 -07:00
Ryan Dahl
94bedc60f4 Upgrade libuv to f20297f 2011-09-23 11:10:18 -07:00
Fedor Indutny
1e37efb08b initial tests
* Don't buffer command, before it's execution (repl)
* `quit` command, custom streams for .start, stubbed out test, disable
  history repeation for non-tty (debugger)
2011-09-23 09:38:24 -07:00
Igor Zinkovsky
66293f6e98 fix spelling 2011-09-23 09:20:15 -07:00
Ben Noordhuis
9ad334085f build: explicitly link in libz on non-win32 platforms 2011-09-23 15:40:35 +02:00
Igor Zinkovsky
8fe5712477 fs watcher binding 2011-09-22 22:32:33 -07:00
Ryan Dahl
8d37b6c92b upgrade libuv 2011-09-22 22:29:20 -07:00
isaacs
74c02066fe Add broken test for #1726. 2011-09-22 19:38:01 -07:00
Ben Noordhuis
93aad55342 crypto: fix delete of potentially uninitialized pointer 2011-09-22 06:16:53 +02:00
Ben Noordhuis
fdb0eb5825 crypto: fix read of potentially uninitialized variable 2011-09-22 06:16:47 +02:00
Ben Noordhuis
3a9b08f156 crypto: look up SSL errors with ERR_print_errors() 2011-09-22 06:16:42 +02:00
Ben Noordhuis
9ef962f9ee crypto: fix error message buffer overrun
ERR_error_string() expects a buffer of at least 256 bytes, the input buffer
was not even half that size. Use ERR_error_string_n() instead.
2011-09-22 06:16:34 +02:00
Igor Zinkovsky
de0066c697 remove node_zlib.h from node.gyp 2011-09-21 16:54:35 -07:00
Fedor Indutny
8efe7a8304 [debugger] shorten break message 2011-09-21 13:27:24 -07:00
Fedor Indutny
79fd1f7f0b [debugger] optimize context's properties initialization, make 'list' a function, not a getter 2011-09-21 13:27:24 -07:00
Fedor Indutny
3148f1400e [debugger] fix 'debug> connecting...', fixed autostart (XXX figure out why it wasn't working in some cases), fixed highlighting for first line of module's code 2011-09-21 13:27:23 -07:00
Vitor Balocco
97d355c273 docs: Add anchor links next to each function
Modify doctool.js to automatically create anchor links for
every function, for easy linking.
Include support for functions that have a <h4> level

Fixes: #1718.
2011-09-21 21:08:53 +09:00
Ben Noordhuis
320cf729db crypto: fix delete of potentially uninitialized pointer 2011-09-21 01:58:27 +02:00
Ben Noordhuis
b185751c3f crypto: fix read of potentially uninitialized variable 2011-09-21 01:58:27 +02:00
koichik
b93a7cc99e docs: add links 2011-09-20 15:50:36 +09:00
Ben Noordhuis
ed44098cf6 build: fix SYS_clock_gettime feature check
execute=True makes it fail while cross-compiling.

Fixes #1541.
2011-09-16 17:55:54 +02:00
Ryan Dahl
b31d5ac639 Update website address in Makefile 2011-09-15 17:49:29 -07:00
Ryan Dahl
cfe0f4226b Now working on v0.4.13 2011-09-15 17:31:35 -07:00
Ryan Dahl
771ba34ca7 Bump version to v0.4.12 2011-09-15 16:46:39 -07:00
Ryan Dahl
6312e889b1 Drain OpenSSL error queue? Addresses #1719 2011-09-15 15:04:09 -07:00
isaacs
e06ce7562c Fix #1707 hasOwnProperty usage
If hasOwnProperty is overridden, then calling `obj.hasOwnProperty(prop)`
can fail.  Any time a dictionary of user-generated items is built, we
cannot rely on hasOwnProperty being safe, so must call it from the
Object.prototype explicitly.
2011-09-15 10:54:08 -07:00
isaacs
b3af074a02 Add querystring test for hasOwnProperty usage 2011-09-15 09:52:49 -07:00
isaacs
98990b9779 Fix #1707 hasOwnProperty usage 2011-09-15 09:46:30 -07:00
Ben Noordhuis
5724b54d2e test: add http multi-line header test
Test case for #1569. Verify that http_parser parses multi-line headers.
2011-09-14 16:29:32 +02:00
Ben Noordhuis
8b2a3354f9 http_parser: cherry-pick 3258e4a and b89f944 from upstream
Fixes #1569, parse error on multi-line HTTP headers.
2011-09-14 16:07:37 +02:00
koichik
fdbfc9ceb7 net: Socket write encoding case sensitivity
Fixes #1586.
2011-09-04 13:53:38 +09:00
koichik
3e853e627e buffer: write() should always set _charsWritten.
Refs #1633.
2011-09-03 11:48:27 +09:00
koichik
96ede8cc9b buffer: Avoid overrun with 'binary' encoding.
Fixes #1624.
2011-09-02 09:56:58 +09:00
isaacs
ef27d56cc1 Fixes #1610 Remove DigiNotar CA from trusted list
Details:
https://threatpost.com/en_us/blogs/attackers-obtain-valid-cert-google-domains-mozilla-moves-revoke-it-082911
http://www.coriolis-systems.com/blog/2011/08/diginotar-certificate-security.php
2011-08-30 08:53:21 -07:00
Nathan Rajlich
0c91a835ff util: isRegExp() should not call toString() on its argument
An overloaded toString() method may have side effects
so don't call it for a simple type check.

Back-port of 54b409d to the v0.4 branch.
2011-08-25 19:23:31 +02:00
Ryan Dahl
827b9c5f1f net: fix throw error
Thanks Tobi
2011-08-23 14:30:12 -07:00
koichik
509a676128 Doc improvements 2011-08-23 01:15:32 +09:00
Ryan Dahl
ce9caa237f Fix #1563. overflow in ChildProcess custom_fd.
Backported from master f5db3f1f85
2011-08-20 12:42:58 -07:00
Maciej Małecki
e150bc4f2b docs: process.memoryUsage returns memory usage measured in bytes 2011-08-20 01:00:21 +02:00
isaacs
b4712bf1ac Close #1544 Document slashesDenoteHost flag in url.parse 2011-08-17 18:47:48 -07:00
Ryan Dahl
dc578724b1 Now working on v0.4.12 2011-08-17 18:45:28 -07:00
Ryan Dahl
a745d19ce7 Bump version to v0.4.11 2011-08-17 18:18:10 -07:00
Ryan Dahl
9cd510846e Fixes #1546. Remove expensive debug call. 2011-08-17 13:21:15 -07:00
Ben Noordhuis
decd81838a build: fix freebsd gyp build 2011-08-17 07:50:59 +02:00
Ben Noordhuis
52037d897d uv: upgrade to 2dae0c9 2011-08-17 07:50:58 +02:00
Ben Noordhuis
0f077a78ad gyp: add freebsd support 2011-08-17 07:50:58 +02:00
Ben Noordhuis
1e7a0aa883 gyp: revive sunos support, lost in 6b98a63 2011-08-17 07:50:58 +02:00
Ryan Dahl
ae0dd0d89c Remove extra method declaration 2011-09-20 14:08:55 -07:00
Ryan Dahl
c1ae6ea2f2 Add TTYWrap 2011-09-20 13:39:48 -07:00
Ryan Dahl
6b98a63974 Upgrade libuv to 2ef8f35 2011-09-20 13:34:52 -07:00
Fedor Indutny
b20c98e427 fix 'null' mirroring 2011-09-20 08:35:16 -07:00
Fedor Indutny
a0556fcbe1 repeat last command if empty line was entered 2011-09-20 08:35:15 -07:00
Fedor Indutny
41a41825f6 micro-refactor, use rli.output.write instead of rli.write ('line' event was emitted for those writes) 2011-09-20 08:35:15 -07:00
Fedor Indutny
292e2ea5ad fix breakpoint prefixing in list() 2011-09-20 08:35:15 -07:00
Fedor Indutny
c8ffbcd9f1 added comments, spawn child process automatically at debugger's start 2011-09-20 08:35:15 -07:00
Fedor Indutny
4ff15512f5 remove arrow from current source line 2011-09-20 08:35:15 -07:00
Fedor Indutny
ff05beeef3 fix inspection of zero 2011-09-20 08:35:15 -07:00
Ben Noordhuis
44bebc0d52 crypto: look up SSL errors with ERR_print_errors() 2011-09-20 08:12:35 +02:00
Ryan Dahl
6326b04b07 Fix test-regress-GH-819
Problem was exposed in 12798c6.
2011-09-19 13:41:48 -07:00
Ben Noordhuis
3aa1975c58 build: make wscript work with python 2.4 2011-09-19 16:44:03 +02:00
Ben Noordhuis
243c218c7a tls: remove superfluous setOptions() call 2011-09-19 16:28:22 +02:00
Ryan Dahl
12798c620d dns callbacks should go through MakeCallback 2011-09-18 13:20:16 -07:00
Ryan Dahl
100fc27ebb Upgrade gyp to r1046 2011-09-18 12:25:30 -07:00
isaacs
f90264d246 zlib: lint 2011-09-17 23:03:36 -07:00
isaacs
d104bfd5a6 zlib: Fix test so that it's not trivially passing, then pass it.
Regression from the refactor to move more things into JS.
2011-09-17 23:03:23 -07:00
isaacs
5b8e1dabbc Initial pass at zlib bindings 2011-09-17 18:22:09 -07:00
Ryan Dahl
dcd911e24b Now working on v0.5.8 2011-09-16 18:38:46 -07:00
Ryan Dahl
558241166c Bump version to v0.5.7 2011-09-16 17:54:20 -07:00
Fedor Indutny
145fac7fb1 setBreakpoint w/o arguments should set one on a current line 2011-09-16 17:53:20 -07:00
Fedor Indutny
4a537c1b88 restore breakpoints after restart, fix message handling 2011-09-16 17:53:19 -07:00
Fedor Indutny
d6088b2667 fix spawn call, customFds ain't supported yet 2011-09-16 17:53:19 -07:00
Ryan Dahl
cde81a6675 Revert "Add regression test for issue 1697"
Causing many test failures due to lingering process

This reverts commit 8b754a9e02.
2011-09-16 17:24:34 -07:00
Ryan Dahl
d750927b36 Upgrade libuv to 75a088e 2011-09-16 16:19:33 -07:00
Bert Belder
8b754a9e02 Add regression test for issue 1697 2011-09-17 00:05:15 +02:00
Ben Noordhuis
0ad28fdd37 crypto: fix error message buffer overrun
ERR_error_string() expects a buffer of at least 256 bytes, the input buffer
was not even half that size. Use ERR_error_string_n() instead.
2011-09-16 19:16:32 +02:00
Ryan Dahl
2d0b1ed7ad Upgrade libuv to 2640aae
Add test for bug fixed in joyent/libuv@2640aae1
2011-09-15 15:37:57 -07:00
Ryan Dahl
1b0a5cbaaa Merge remote branch 'origin/v0.4' 2011-09-15 15:08:38 -07:00
Ryan Dahl
b281171030 Support legacy API: process.stdout.fd 2011-09-15 13:57:41 -07:00
Ryan Dahl
5cb1fd2e32 net.Socket(fd) should start readable and writable 2011-09-15 13:35:29 -07:00
Ryan Dahl
763059ee09 Remove pthread-win32 from license file (no longer using it) 2011-09-15 13:05:54 -07:00
Jeroen Janssen
3e667804eb Fix options_file_memory_leak
Fixes #1714.
Fixes #1715.
2011-09-15 12:03:06 -07:00
Ryan Dahl
a1bafc5566 Merge remote branch 'origin/v0.4'
Conflicts:
	deps/http_parser/http_parser.c
	deps/http_parser/test.c
	lib/repl.js
2011-09-15 11:48:37 -07:00
Ryan Dahl
1b15af9dd2 Upgrade V8 to 3.6.4 2011-09-15 09:42:06 -07:00
Ben Noordhuis
f8b90946ae node: disable uv backend if NODE_USE_UV=0 2011-09-15 00:32:07 +02:00
Igor Zinkovsky
6cb15403d3 remove SetCloseOnExec 2011-09-14 13:47:00 -07:00
Ryan Dahl
a6ef3eb271 Upgrade libuv to 4197fc7
and use return value from sync uv_fs functions
2011-09-14 13:46:54 -07:00
Ryan Dahl
70966002c0 Forward customFds to ChildProcess.spawn
Fixes #1695
2011-09-14 12:33:42 -07:00
Fedor Indutny
d2dadf32db [debugger] added setBreakpoint and clearBreakpoint to help message
group commands in help message, added shortcuts info
2011-09-14 10:17:17 -07:00
Fedor Indutny
1dd3b68c4f [debugger] separate history of control and debug, make scripts command getter 2011-09-14 23:05:04 +07:00
Fedor Indutny
19194f87c5 [debugger] setBreakpoint, clearBreakpoint, fix reqSource error handling, show breakpoints in list() 2011-09-14 23:05:04 +07:00
Fedor Indutny
3a7713ff10 [debugger] synonym=>shortcut, added shortcut for backtrace (as in gdb), simplify regexp 2011-09-14 23:05:04 +07:00
Fedor Indutny
f2ec46a7a7 [debugger] color mark in _debugger, kill child on Ctrl+D 2011-09-14 23:05:01 +07:00
Ryan Dahl
0e0fbf7e6a Upgrade libuv to 4b9b692 2011-09-14 08:43:27 -07:00
Ben Noordhuis
92d4ed397b readline: handle null completer graciously
Fixes #1698.
2011-09-14 17:33:07 +02:00
koichik
244675cab1 doc: HTTPS client's options 2011-09-14 23:48:42 +09:00
koichik
e7f64a7d41 doc: HTTPS client's options
Fixes #1494.
2011-09-14 20:17:30 +09:00
Ryan Dahl
70a5659a46 Document child_process.execFile
Fixes #1700
2011-09-13 20:50:49 -07:00
Fedor Indutny
9fb186892c [debugger] requireConnection() returns bool, break UI
Stepping commands will overwrite output of previous step command
2011-09-13 20:40:26 -07:00
Fedor Indutny
57388d8b2e [repl] add error handling for async scope fetching 2011-09-13 20:40:21 -07:00
Ryan Dahl
69c35f990f Doc fixes
Fixes #1701. Thanks baudehlo.
2011-09-13 20:02:54 -07:00
isaacs
dc8f4eed53 Fix #1694 Document require() cycles 2011-09-13 10:59:42 -07:00
Ryan Dahl
cb6b9eb19e Fix windows build 2011-09-12 19:42:12 -07:00
Ryan Dahl
8c87250816 Do not load readline from util.inspect
This causes all modules using console.log() to load readline which seems
unnecessary.
2011-09-12 18:25:23 -07:00
Ryan Dahl
0928f0f290 Fix test-module-load-list
and lazy load modules for process.stdout

This probably breaks test-module-load-list on windows, but it hopefully is
an easy fix to replace "_posix" bindings with "_win32".
2011-09-12 18:12:48 -07:00
Ryan Dahl
0aad61e802 Use net_uv instead of net_legacy for stdio
Also temporary hack to prevent process.stdout from keeping event loop alive
by calling uv_unref on process.stdout initialization.
2011-09-12 17:32:52 -07:00
isaacs
190abcac9d mkdir EEXIST test
Fixed on uv 3c00d87b4239a6b8358e2085f806170c3eca10cf
2011-09-12 17:13:12 -07:00
isaacs
8b6277a460 Update uv to 3c00d87b4239a6b8358e2085f806170c3eca10cf 2011-09-12 17:11:03 -07:00
Ben Noordhuis
718032777d v8: move __C99FEATURES__=1 into common.gypi 2011-09-12 22:52:56 +00:00
Ryan Dahl
caaa59c559 Wrap uv_pipe_open, implement net.Stream(fd);
Fixes simple/test-child-process-ipc on unix.
2011-09-12 15:09:44 -07:00
Ryan Dahl
51f2e8439e Upgrade libuv to e7eeacb 2011-09-12 15:09:26 -07:00
Ben Noordhuis
77e4abbc3e v8: add platform-solaris.cc to gyp build 2011-09-12 21:48:30 +00:00
Ben Noordhuis
d104e5b91c v8: compile with __C99FEATURES__=1 on sunos
Exposes INFINITY, isinf(), isfinite(), etc.
2011-09-12 21:48:30 +00:00
Ben Noordhuis
c18ef0fed5 openssl: fixups for sunos 2011-09-12 21:48:30 +00:00
Ben Noordhuis
e4e1917936 build: fixups for sunos 2011-09-12 21:48:30 +00:00
Ben Noordhuis
d7c16fa372 build: disable -fvisibility=hidden
Not recognized by older versions of gcc.
2011-09-12 21:48:30 +00:00
Ben Noordhuis
12351a2591 build: fix breakage when resuming make 2011-09-12 21:48:30 +00:00
Ben Noordhuis
9f986981f8 build: configure node, v8, cares and openssl 2011-09-12 21:48:29 +00:00
Ben Noordhuis
fe7e00d51a gyp: add sunos support 2011-09-12 21:48:29 +00:00
Ben Noordhuis
0d80040adf uv: upgrade to 9bd8bd7 2011-09-12 23:46:39 +02:00
Ben Noordhuis
7e7e983781 uv: upgrade to b450d87 2011-09-12 18:41:48 +02:00
Thomas Shinnick
7dc2c492e9 fs: unguarded fs.watchFile cache statWatchers checking fixed
Use hasOwnProperty to check filepath cache; previous code could fail if
a filepath duplicated a chained property name.

Fixes #1637.
2011-09-12 15:59:00 +09:00
Thomas Shinnick
e58c036c27 fs: add positioned file writing feature to fs.WriteStream
Patterned on same feature in ReadStream; a small bit of new code added
plus two refactorings of previous code; added two test files.

Fixes #1645.
2011-09-12 14:57:49 +09:00
Thomas Shinnick
e4ebeb630e fs: minor corrections from examining stream read positioning
Fix minor typos, one small refactor, and change emit() in a constructor
to a throw
2011-09-12 14:57:43 +09:00
koichik
389e2a07e6 util: Fix inspection for Error
Fixes #1634.
2011-09-11 23:13:06 +09:00
Fedor Indutny
df480e0357 fix syntax error handling for 'throw ...', fix return value assertion 2011-09-11 02:19:42 -07:00
Bert Belder
55c1546f01 Un-break the windows build 2011-09-11 03:54:08 +02:00
Bert Belder
10e7c52a70 win: make test-cli-eval.js pass 2011-09-11 03:52:44 +02:00
Ryan Dahl
0f211048a0 Upgrade libuv to efa1b54 2011-09-10 18:40:40 -07:00
Ryan Dahl
67cc5c9218 Merge remote branch 'indutny/feature-debugger'
Fixes #1667
2011-09-10 17:46:14 -07:00
Fedor Indutny
b942c6339a Remove obsolete 'using v8::Null'
Fixes #1680.
2011-09-10 17:44:52 -07:00
Fedor Indutny
8c2c7bb8a9 vm context with accessors
fixes #1673
2011-09-10 10:51:58 -07:00
Fedor Indutny
fe4b0f40d6 [debugger] fixed piping from stdout of child process, fixed eval in debug repl (when not on breakpoint) 2011-09-10 23:55:38 +07:00
Fedor Indutny
54520981a4 [debugger] implemented setBreakpoint, etc
Lift prototype methods not only as accessors, but as properties too.
this.print() supports javascript objects inspection
this.error() implemented, don't throw error at callbacks and commands
Fixed list() invokation, when script is not on a breakpoint
Removed obsolete process.nextTick from `step` commands
2011-09-10 19:18:36 +07:00
Fedor Indutny
db6526f962 [debugger] deep cloning (depth = 3) 2011-09-10 18:39:34 +07:00
Fedor Indutny
69fa7ef65d [debugger] fix slow repl evals inside async callbacks 2011-09-10 18:19:47 +07:00
Fedor Indutny
79265fe389 [debugger] rename function, add it to ignore list 2011-09-10 17:57:55 +07:00
Fedor Indutny
5a3639985a [debugger] print data from child process' stdout and stderr 2011-09-10 17:43:22 +07:00
Fedor Indutny
3dd573e858 [debugger] nicier output, clear line before writing 2011-09-10 17:33:07 +07:00
Fedor Indutny
03adceec62 [debugger] more informative break message (reverting back partially) 2011-09-10 12:48:21 +07:00
Ryan Dahl
8821eb24c2 Correct date 2011-09-09 20:18:40 -07:00
Bert Belder
0be4812c35 Now working on v0.5.7 2011-09-10 01:38:51 +02:00
Bert Belder
b49bec5580 Bump version to 0.5.6 2011-09-10 00:29:35 +02:00
Bert Belder
0a72ac3770 Upgrade libuv to bd6066cb 2011-09-10 00:29:27 +02:00
Igor Zinkovsky
79ce48d3f0 fix for test-fs-chmod 2011-09-09 21:09:59 +02:00
Ben Noordhuis
fa334ef0b7 build: install uv-private/*.h, fixes native add-on builds 2011-09-09 17:30:08 +02:00
Bert Belder
97cf216c74 Upgrade libuv to e95a29ee18 2011-09-09 15:05:12 +02:00
Bert Belder
b5db0767d5 net_uv: fix 'set is undefined' error 2011-09-09 14:59:54 +02:00
Bert Belder
f810998871 net_uv: use sufficient buffer to read sock/peername 2011-09-09 14:59:27 +02:00
Igor Zinkovsky
85357abba1 fix test-fs-chmod test 2011-09-09 14:45:37 +02:00
Ryan Dahl
03c2f62020 Upgrade V8 to 3.6.2 2011-09-08 16:11:20 -07:00
Bert Belder
0a127d6a69 Upgrade libuv to 2d1c672e 2011-09-08 23:53:40 +02:00
Ryan Dahl
b6e0433755 Upgrade libuv to 5b567b2 2011-09-08 14:29:12 -07:00
Ryan Dahl
26834b0524 Revert "vm context with accessors"
This reverts commit 4527de8cba.

Causes segfault in test/message/undefined_reference_in_new_context.js
2011-09-08 13:30:52 -07:00
Fedor Indutny
8d7aade663 [debugger] call silent resume in debugEval to prevent incorrect cursor position after repl autocompletion, small refactor in readline 2011-09-09 03:05:21 +07:00
Igor Zinkovsky
65e6ba9cce Enable link, symlink, and readlink on windows 2011-09-08 12:52:08 -07:00
Fedor Indutny
01349bbd70 [debugger] added synonyms for run, cont, next, step, out, shorten breakpoint message and do not output explicit debug> on breaks 2011-09-09 02:33:28 +07:00
Fedor Indutny
46382a728a [debugger] resume stdin at right time when running code remotely 2011-09-09 02:06:07 +07:00
Fedor Indutny
d36d5c34df [debugger] revert to using getter 2011-09-09 02:06:07 +07:00
Fedor Indutny
199f90b138 [debugger] fix messages 2011-09-09 02:06:07 +07:00
Fedor Indutny
22eb2d5084 [debugger] pause stdin on debugEval 2011-09-09 02:06:07 +07:00
Fedor Indutny
3b593c9ec5 [debugger] handle lookup error, no more need to handle SyntaxErrors 2011-09-09 02:06:07 +07:00
Fedor Indutny
e13ed4a8d0 [repl, readline] refactor async completion and execution 2011-09-09 02:06:07 +07:00
Fedor Indutny
2c2397d333 [debugger] simulate getters 2011-09-09 02:06:07 +07:00
Fedor Indutny
00343a9af0 [debugger] display message on repl(), do not display warnings on Ctrl+C 2011-09-09 02:06:07 +07:00
Fedor Indutny
77eb8eabe2 [debugger] use newly added eval argument for REPLServer 2011-09-09 02:06:06 +07:00
Fedor Indutny
0d4dc3a8b5 [repl] let self.eval be configurable on REPLServer initialization 2011-09-09 02:06:06 +07:00
Fedor Indutny
f549f2bf1d [debugger] Fix help message 2011-09-09 02:06:06 +07:00
Fedor Indutny
3b2577b4fe [debugger] restructurize code, eval control repl asynchronously
Move commands closer to each other, use .debugEval and .controlEval for
controlling repl output (no more incorrect 'debug>' prints).
2011-09-09 02:06:06 +07:00
Fedor Indutny
e01635eb9b [debugger] port all commands 2011-09-09 02:06:06 +07:00
Fedor Indutny
eab65e214e [repl] Async global completion 2011-09-09 02:06:06 +07:00
Fedor Indutny
134ab61131 [debugger] two repls, initial 2011-09-09 02:06:06 +07:00
Fedor Indutny
71a9aefa0f [readline, repl] Fix completion grouping, fix parens eval results
handling
2011-09-09 02:06:06 +07:00
Fedor Indutny
42b8b77d9f [repl, readline] async interface
Add async completion and execution interface for repl and readline
2011-09-09 02:06:06 +07:00
Fedor Indutny
bd69afbc83 [debugger] readline => repl
Started porting to high-level javascript API and repl.
2011-09-09 02:06:05 +07:00
Fedor Indutny
4527de8cba vm context with accessors
true copy of sandbox properties

catch sealed errors, pass global's prototype to CloneObject

Fixes #1673
2011-09-08 11:59:21 -07:00
Ben Noordhuis
bb3a1d5b67 http: set .code='ECONNRESET' on socket hang up errors
Fixes #1672.
2011-09-08 20:47:16 +02:00
koichik
6139459d45 util: Fix inspection for sparse array
Fixes #1651.
2011-09-09 00:57:42 +09:00
koichik
98b64422bb util: Divide inspect() into some subroutines 2011-09-09 00:53:37 +09:00
Ryan Dahl
ee2c12d48e Upgrade GYP to r1034 2011-09-08 01:11:45 -07:00
Ryan Dahl
0bca54444a Upgrade V8 to 3.6.1 2011-09-07 21:23:29 -07:00
koichik
526c54c979 buffer: write() should always set _charsWritten.
Fixes #1633.
2011-09-08 11:47:32 +09:00
Ryan Dahl
52044fd1b1 Merge remote branch 'origin/v0.4'
Conflicts:
	lib/net.js
	test/simple/test-buffer.js
2011-09-07 17:51:33 -07:00
Ben Noordhuis
638773628c tls: new[] instead of malloc() in Connection::GetSession() 2011-09-07 20:02:14 +02:00
Sean Cunningham
eb99083d0b tls: add client-side session resumption support 2011-09-07 20:01:14 +02:00
Ben Noordhuis
b66d225c6e docs: document that the build system depends on python >= 2.5.2
Fixes #354.
2011-09-06 23:11:17 +02:00
Thomas Shinnick
4cf0ce5bb4 docs: typos and minor edits in several modules
Mostly quite minor edits.  Those possibly of more interest are:

  emitter.setMaxListeners(n)

    That the limit is per event name for an emitter.

  fs.readlink()

    Not a path, but rather the symbolic link's string value, which
      would be at best a partial path, certainly not a 'resolvedPath'

  global.__filename

    This may be "well-known" but this is a full path to the module
    that referencing code is running in.  It is not the main program's
    path, unless you are in the main program.  Each module knows only
    its own path.

  server.listen(port,...)

    I actually needed this functionality... "gimme just _any_ next port"

  stream.end()
  stream.destroy()

    Yeah, everybody knows what happens to the queued data, but let's
    make it *really* explicit for the first readers.
2011-09-06 18:19:41 +02:00
Maciej Małecki
fb93ab4125 test: test for correct parsing of URLs with plus character in protocol 2011-09-06 17:04:00 +02:00
Maciej Małecki
d0552949b9 url: add plus sign to protocol pattern 2011-09-06 17:03:52 +02:00
Ben Noordhuis
56efe9cbc5 file: translate libuv error codes to errno names
Fixes incorrect error names (ex. ENOEXEC instead of EBADF,
EMLINK instead of ENOENT).

Fixes #1656.
2011-09-06 16:34:21 +02:00
Ben Noordhuis
94b0481a56 uv: upgrade to cc91989 2011-09-06 16:14:14 +02:00
Bert Belder
8153a21613 Improve path parsing on windows
Closes #650
2011-09-06 04:47:36 +02:00
Ben Noordhuis
2d9ab49239 file: fix errno propagation in sync fs calls
Include libuv fs error code in the JS exception.

Fixes #1657.
2011-09-06 02:15:08 +02:00
Ben Noordhuis
554dc63328 uv: upgrade to 58ef43e 2011-09-06 02:15:08 +02:00
Peter Bright
de978991d8 windows: it's rude to clobber quick edit mode
Closes #1429
2011-09-06 00:36:41 +02:00
Ryan Dahl
061811f328 ObjectWraps should be MarkIndependent 2011-09-05 14:40:30 -07:00
Ryan Dahl
ece5c64504 Upgrade libuv to a8017fd 2011-09-05 00:32:15 -07:00
isaacs
ef523e5719 fix test-fs-realpath 2011-09-04 22:14:03 -07:00
Ryan Dahl
fcfec075e3 internal fs functions called with this == ReqWrap 2011-09-04 19:48:55 -07:00
Ryan Dahl
39ea27470c Return ReqWrap from internal fs functions 2011-09-04 19:44:01 -07:00
Ryan Dahl
f5e486ebab Fix test-fs-error-messages.js 2011-09-04 18:48:19 -07:00
Ryan Dahl
7272dbdbc6 Upgrade libuv to 991f6ee 2011-09-04 18:48:19 -07:00
Bert Belder
b5d58f11cb dgram-uv: black hole incoming messages after closing
Fixes test/simple/test-dgram-pingpong.js on windows
2011-09-05 03:30:12 +02:00
Ryan Dahl
01bf209a3d Upgrade libuv to b6ede6c
Fixes require('fs').readdirSync on unix.
2011-09-04 17:17:00 -07:00
Bert Belder
e20d0c1cd0 net-uv: correctly set socket.remoteAddress and -port
closes #1345
2011-09-05 02:10:14 +02:00
Bert Belder
ae2ac4fb1b gyp: add js files to node project 2011-09-05 02:10:12 +02:00
Bert Belder
d01b87d9c4 win: vcbuild.bat should attempt to run vcvarsall.bat 2011-09-05 02:10:12 +02:00
Ryan Dahl
17021ea631 Upgrade libuv to 142a702 2011-09-04 16:17:00 -07:00
Bert Belder
3742aeea4c resolve mingw32 build problem 2011-09-04 22:54:24 +02:00
Bert Belder
c82ab45ee6 uv_getsockname got renamed 2011-09-04 22:53:01 +02:00
Bert Belder
cb1a21b1d4 Upgrade libuv to 7b87ff7c9b 2011-09-04 22:25:40 +02:00
Peter Bright
766430c743 Windows: set executables to be console programs
closes #1644
2011-09-04 19:27:04 +02:00
Logan Smyth
bc0a552a84 docs: Fix merge error in tls docs
Fixes #1648.
2011-09-05 00:48:35 +09:00
Ashok Mudukutore
908ee33f2d build: add RPATH environment variable
Overrides default run-time library paths
2011-09-04 17:26:05 +02:00
Igor Zinkovsky
29e929de1e fix windows build break 2011-09-04 04:11:54 +02:00
Igor Zinkovsky
a3d7782c08 enable missing fs functions on windows 2011-09-03 17:45:22 -07:00
Igor Zinkovsky
ee048aa3ab fix async readdir 2011-09-03 17:44:54 -07:00
Ben Noordhuis
0df8ffe472 uv: upgrade to 6422a14 2011-09-04 02:31:12 +02:00
AJ ONeal
087d210679 docs: explain how url.format works (search trumps query, etc) 2011-09-03 03:29:49 +02:00
Michael Jackson
3bf20e43cf Fixes #1635. Fixed typo 2011-09-02 13:01:05 -07:00
Ryan Dahl
197628846d win: link to psapi.lib
broke in 65c2763
2011-09-02 12:53:20 -07:00
koichik
c28f20f880 docs: console.log() refer to util.format(). 2011-09-03 01:46:53 +09:00
koichik
28a908471d crypto: Fix BIO's usage.
Fixes #1612.
Fixes #1296.
2011-09-03 00:53:47 +09:00
Ben Noordhuis
5ded5e274f crypto: use X509_get_ext_by_NID(NID_subject_alt_name) 2011-09-03 00:49:37 +09:00
Niclas Hoyer
b7e36f8584 added test case for foaf+ssl client certificate 2011-09-03 00:49:37 +09:00
Niclas Hoyer
7b2536a1a2 Added additional properties to getPeerCertificate, now includes subjectAltName, Exponent and Modulus (FOAF+SSL friendly).
Patch written by Nathan,
http://groups.google.com/group/nodejs/browse_thread/thread/1d42da4cb2e51536
2011-09-03 00:49:37 +09:00
Nathan Rajlich
cafcc7e67a test: add test case for util.isDate() behavior 2011-09-02 17:29:33 +02:00
Nathan Rajlich
44574bc39b util: improve util.isDate() function
The old implementation was fragile. i.e. node-time is an example of a user-land
module that exports an extended Date object (with a few added functions on it's
own Date object's prototype). In that case, the old check fails.
2011-09-02 17:29:20 +02:00
Ryan Dahl
2b0a7d63a8 Upgrade libuv to b89f4f3 2011-09-01 17:44:06 -07:00
Karl Skomski
65c27638ec Added some win32 platform functions
Fixes #1617
2011-09-01 14:56:32 -07:00
Ryan Dahl
3efcbadf6b Upgrade libuv to 2e60358
Fixes #1621.
2011-09-01 14:16:04 -07:00
Nathan Rajlich
cf24f561a3 repl: don't eval twice when an Error is thrown 2011-09-01 17:15:07 +02:00
Ryan Dahl
84cf0c5280 crypto: set data before sending to thread pool
fixes test-crypto
2011-08-31 16:11:08 -07:00
Ryan Dahl
c91ec225e6 Upgrade libuv to 836cc20 2011-08-31 15:59:36 -07:00
Maciej Małecki
8d70cc607c Show warning when using lib/sys.js 2011-08-31 19:26:34 +02:00
Jeroen Janssen
f013f15c89 fix win32 uv loop breakage 2011-08-31 10:09:44 -07:00
Ryan Dahl
21cc4c4985 Upgrade libuv to ea4271f
Required adding uv_default_loop() in many places.
2011-08-31 01:53:30 -07:00
koichik
6f60683802 tls: x509 certificate subject parsing fail
Fixes #1568.
2011-08-31 03:47:23 +09:00
Ryan Dahl
d8f7a8655f Strip V8 -Werror 2011-08-30 09:44:19 -07:00
isaacs
6b6f2b1d2c Fixes #1610 Remove DigiNotar CA from trusted list
Details:
https://threatpost.com/en_us/blogs/attackers-obtain-valid-cert-google-domains-mozilla-moves-revoke-it-082911
http://www.coriolis-systems.com/blog/2011/08/diginotar-certificate-security.php
2011-08-30 08:52:49 -07:00
AJ ONeal
8039086470 docs: document querystring behavior for arrays and unassigned parameters 2011-08-30 15:17:05 +02:00
Ben Noordhuis
fe4b7420a3 uv: upgrade to 0ba44cf 2011-08-30 13:09:47 +02:00
Ryan Dahl
b68c6bac96 Fix Windows build 2011-08-30 02:26:29 -07:00
Ryan Dahl
2823ab47dc Upgrade libuv to ca11711 2011-08-30 01:59:38 -07:00
Igor Zinkovsky
bce41fac94 Use new uv_fs_ apis
This will cause master to be unstable for a while as we replace existing eio
calls with uv_fs calls.
2011-08-30 01:36:10 -07:00
Ryan Dahl
1088638725 upgrade libuv to a6ed175 2011-08-30 01:35:54 -07:00
Ryan Dahl
da00ff4999 Upgrade V8 to 3.5.9.1 2011-08-29 15:47:16 -07:00
Ryan Dahl
59fa16f648 Upgrade libuv to cbbb254
Fixes #1506
2011-08-29 15:23:20 -07:00
Ryan Dahl
ff7f7ae386 Fixes #1503. make libuv backend default on unix 2011-08-29 14:01:41 -07:00
Abimanyu Raja
b5144b245b stdio: fix typo in doc comment 2011-08-29 21:26:58 +02:00
Mikeal Rogers
7c87e092fb Sockets should never be attached to a ClientRequest before nextTick().
This way the API for interacting directly with the socket object is
consistent before and after the Agent pool is exhausted.

Fixes #1601.
2011-08-29 12:22:19 -07:00
Jann Horn
1a0edbca86 module: remove 'is URL?' check in module loader, dead code 2011-08-29 18:20:58 +02:00
jkummerow@chromium.org
b5643cb2a6 v8: remove unnecessary break-after-return in switch statement
BUG=v8:1642

Review URL: http://codereview.chromium.org/7781007

This is a back-port of upstream r9043. Fixes build on OS X 10.5.
2011-08-29 16:00:48 +02:00
Peter Lyons
d2defa3012 test: test for issue #752 2011-08-28 23:49:24 +02:00
Peter Lyons
a4eee3d28f http: remove 'headers sent?' check in OutgoingMessage.getHeader()
Fixes #752.
2011-08-28 23:47:10 +02:00
Peter Bright
186364e24f Don't load-time link against CreateSymbolicLink, it doesn't exist on Windows Server 2003.
Fixes #1592.
2011-08-26 19:55:25 -07:00
Igor Zinkovsky
779c93c523 merge vcbuild.bat and generate_projects.bat 2011-08-26 17:06:01 -07:00
Ben Noordhuis
8342f31af9 Now working on 0.5.6 2011-08-27 01:27:52 +02:00
Ben Noordhuis
d2d53d4bb2 Bump version to v0.5.5 2011-08-26 23:24:18 +02:00
Ben Noordhuis
790f13df9c Fix typo in configure script 2011-08-26 20:38:45 +00:00
Ryan Dahl
7d38a3b81c Fix build - due to V8 API change 2011-08-26 13:20:27 -07:00
Ryan Dahl
f1996ffebc Merge remote branch 'origin/v0.4'
Conflicts:
	AUTHORS
	ChangeLog
	doc/api/stdio.markdown
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	test/simple/test-child-process-customfd-bounded.js
	test/simple/test-console-not-call-toString.js
2011-08-26 13:16:16 -07:00
Ryan Dahl
028908ab7c Upgrade V8 to 3.5.8 2011-08-26 13:07:04 -07:00
Ryan Dahl
8af0abde3f prepare for release - website under new user 2011-08-26 10:31:42 -07:00
Ryan Dahl
16b3f2c3ff Fix dns_uv.lookup order 2011-08-26 10:31:42 -07:00
Ben Noordhuis
5e765fe5e8 uv: upgrade to 835782a 2011-08-26 18:10:35 +02:00
koichik
43cdbec3be test: simple/test-tls-client-abort fails on SunOS
Fixes #1583.
2011-08-26 23:57:36 +09:00
Bert Belder
6ab4a4c05c Upgrade libuv to 39aac4a5 2011-08-26 02:39:54 +02:00
Ben Noordhuis
576b11662e uv: upgrade to 6490c6a 2011-08-26 00:23:17 +02:00
Peter Bright
64b41680fd Add headers to improve the IDE experience. 2011-08-24 19:12:39 -07:00
Ryan Dahl
90da5339c1 Upgrade libuv to 40efa9c 2011-08-24 17:43:33 -07:00
Ryan Dahl
48918f5503 Reapply Peter Bright's fixes for GYP on MSVS
Originally 71333b3f5b
2011-08-24 16:23:12 -07:00
Ryan Dahl
06f750c466 fix windows build 2011-08-24 16:20:14 -07:00
Ryan Dahl
f9dae9e8d6 Add dgram_legacy and dgram_uv to node.gyp 2011-08-24 15:55:57 -07:00
Ben Noordhuis
8f245486aa net: fix multicast on sunos
setsockopt(IP_MULTICAST_TTL|IP_MULTICAST_LOOP) takes an unsigned char as
its argument on sunos.

Partially fixes simple/test-dgram-multicast: test hangs after socket
close but it no longer throws EINVAL exceptions.
2011-08-24 22:46:55 +00:00
Ben Noordhuis
accc34c50f test: fix simple/test-eval
Test expects output of console.error(process.argv) to be spread out
over several lines but if /path/to/node is short, it stays on a single line.
2011-08-25 00:18:39 +02:00
Ryan Dahl
52a40e0fd5 Add process.features.debug; fixes simple/test-executable-path.js 2011-08-24 14:16:35 -07:00
Ryan Dahl
2876141c42 dns_uv: add localhost hack for windows 2011-08-24 13:43:05 -07:00
Ben Noordhuis
2513538109 test: add dgram tests to test-uv list 2011-08-24 22:27:25 +02:00
Ben Noordhuis
48f4b2be2b docs: remove unix dgram documentation 2011-08-24 22:27:25 +02:00
Ben Noordhuis
bba432f00e dgram: add socket.fd compatibility hack to dgram_uv.js 2011-08-24 22:27:25 +02:00
Ben Noordhuis
11e3cfce8b dgram: integrate libuv support for UDP over IPv6 2011-08-24 22:27:24 +02:00
Ben Noordhuis
cbd4033619 dgram: integrate libuv UDP support 2011-08-24 22:27:24 +02:00
Ben Noordhuis
9cb624986c tcp_wrap: update after libuv API change 2011-08-24 22:27:24 +02:00
Ben Noordhuis
2aefea5a2f stream_wrap: update after libuv API change 2011-08-24 22:27:24 +02:00
Ben Noordhuis
28998a8cfe uv: upgrade to 80e5491 2011-08-24 22:27:24 +02:00
Ben Noordhuis
7003d6eff5 Move ARRAY_SIZE macro to node.h 2011-08-24 22:27:24 +02:00
Mikeal Rogers
cdbecc48a1 docs: Improved http2 agent docs
Fixes #1517.
2011-08-25 00:55:51 +09:00
Igor Zinkovsky
19ff87a9db vcbuild.bat - for building from cmd-line using msbuild 2011-08-23 23:55:11 -07:00
Ryan Dahl
06428d853c tools/test.py to support marking files a libuv-broken
Use

  export NODE_USE_UV=1
  python tools/test.py --libuv simple pummel

To run the equivalent of "make test-uv".
2011-08-23 23:45:46 -07:00
Ryan Dahl
4e1d6fca8e Mark tests which are broken in libuv 2011-08-23 23:45:21 -07:00
Ryan Dahl
4fa13152af Support MSVS build directories in tools/test.py 2011-08-23 19:59:07 -07:00
Nathan Rajlich
8ec31a3362 Use Object.getPrototypeOf() on the object in the REPL tab-completion.
Some people use __proto__ to augment an Object's prototype after it's been created.
This patch helps make the "new" prototype properties visible if necessary.

This is also more consistent with the while logic below.
2011-08-23 15:35:36 -07:00
Ryan Dahl
b15ab5de51 Upgrade V8 to 3.5.7 2011-08-23 15:17:57 -07:00
Ryan Dahl
42529ddfb5 waf: Don't build out/Debug/node_g - just out/Debug/node
This is to match how GYP does it.
2011-08-23 15:13:09 -07:00
Ryan Dahl
ea156359e9 net_legacy: Fix throw typo
Thanks Tobi
2011-08-23 14:27:50 -07:00
Ryan Dahl
a7300c8297 WAF builds in out/ instead of build/ 2011-08-23 14:10:39 -07:00
Ryan Dahl
879eb16280 Have WAF variants match GYP configuration names 2011-08-23 14:10:35 -07:00
Ryan Dahl
85f7b78e9b gyp: Further fixes to target_defaults for mac 2011-08-23 13:19:17 -07:00
Evan Martin
8a29e5ea5b gyp: Don't pass C++ flags to C compiler, and don't pass -ansi in OpenSSL builds. 2011-08-23 13:19:17 -07:00
Evan Martin
a916d888f2 common.gypi: don't nest "target_defaults" within "target_defaults"
The "conditions" block is already within a "target_defaults", so its
children amend target default settings already.
2011-08-23 13:19:17 -07:00
koichik
485d5b5dff dns: Force the DNS module to invoke callbacks asynchronously.
Fixes #1164.
2011-08-24 03:01:41 +09:00
Ryan Dahl
e3413f08fd net_uv: throw when people construct net.Socket(fd)
Easier to catch compatibility errors.
2011-08-23 02:31:22 -07:00
Ryan Dahl
c4454d2efc net_uv: Don't error on ECONNRESET
Fixes #1571.
2011-08-22 19:11:38 -07:00
Ryan Dahl
80dd818290 Upgrade GYP to r1010 2011-08-22 17:09:57 -07:00
Ryan Dahl
c2ae39b8d6 gyp: -ldl on linux 2011-08-22 20:07:07 -04:00
Ryan Dahl
cf2e68d960 net_uv: handle read errors 2011-08-22 15:03:27 -07:00
Ryan Dahl
b8d40be611 Upgrade libuv to joyent/libuv@ce20791 2011-08-22 14:52:28 -07:00
Mikeal Rogers
103990b640 Fixes #1531 2011-08-22 14:31:25 -07:00
Maciej Małecki
94963ab39a Add failing test for https2 compatibility
Issue #1531
2011-08-22 14:30:58 -07:00
Ryan Dahl
2e5a8e071e Update license info for openssl 2011-08-22 11:36:38 -07:00
Peter Bright
0110c90382 Upgrade to 0.9.8r.
Build in Win32.
2011-08-22 11:30:47 -07:00
Ryan Dahl
e80cac6225 import openssl from chrome 2011-08-22 11:30:45 -07:00
koichik
1adfd48448 Doc improvements 2011-08-23 00:18:46 +09:00
Ryan Dahl
f5db3f1f85 Fix #1563. overflow in ChildProcess custom_fd. 2011-08-20 12:39:40 -07:00
Maciej Małecki
962a9e808c docs: process.memoryUsage returns memory usage measured in bytes 2011-08-20 00:59:31 +02:00
Ryan Dahl
05e6f318c6 Upgrade V8 to 3.5.6 2011-08-18 16:59:30 -07:00
Ben Noordhuis
63607a0304 bench: make number of response body chunks configurable in http_simple 2011-08-17 23:26:23 +02:00
Ben Noordhuis
8e8f36f958 Fix #1546 some more. Remove expensive debug call. 2011-08-17 22:53:42 +02:00
isaacs
711a356468 Close #1544 Document slashesDenoteHost flag in url.parse 2011-08-17 13:43:09 -07:00
Ryan Dahl
8320af7ef3 Merge remote branch 'origin/v0.4'
Conflicts:
	doc/api/tls.markdown
2011-08-17 13:25:44 -07:00
Ben Noordhuis
d72c6940f8 bench: make http_simple send chunked encoding if requested 2011-08-17 20:39:20 +02:00
koichik
4cf931db17 http: improve compatibility of legacy API
In http1, legacy http.Client shares one connection with multiple requests.
But in http2, it uses concurrent connections.
With --use-http1, test/simple/test-http-legacy.js passes.
However, it fails without --use-http1 (use http2).

This improves compatibility of legacy http.Client API between http1 and http2.

Fixes #1530.
2011-08-17 00:19:55 +09:00
koichik
8293bb8a32 test: refactored http test.
Many http tests had used legacy http.Client.
This refactored it to use modern API.

Fixes #1528.
2011-08-16 23:59:57 +09:00
Antranig Basman
c05936ca13 vm: fix incorrect dispatch of vm.runInContext for argument "filename"
Adds test case and documentation for vm.runInContext and vm.createContext.

Fixes #1140.
2011-08-16 14:50:04 +02:00
Ryan Dahl
72246d97a2 Complete GYP support for Python 2.5.2 2011-08-15 18:26:48 -07:00
Ryan Dahl
e57ed540e6 GYP Support python 2.5.2 2011-08-15 21:18:21 -04:00
Ryan Dahl
b433c42a56 gyp: Support Linux 2011-08-15 21:17:02 -04:00
Mikeal Rogers
584ae7b084 Remove http.cat. fixes #1447 2011-08-16 01:24:41 +02:00
Ryan Dahl
721f26520d Upgrade GYP to r999
To fix osx/make build http://codereview.chromium.org/7618052
2011-08-15 15:47:18 -07:00
Ryan Dahl
66f77963a3 Upgrade GYP to r995 2011-08-15 13:49:15 -07:00
Ryan Dahl
25a5e90289 Fix GYP build on OSX
Broken due to DOS line endings.

  ./configure-gyp
  make -f Makefile-gyp
2011-08-15 13:41:07 -07:00
Ben Noordhuis
5e37e10e41 module: fix pointer reference to out-of-scope variable
Reported by Tom Hughes.
2011-08-15 20:08:18 +02:00
Nathan Rajlich
54b409d650 util: isRegExp() should not call toString() on its argument
An overloaded toString() method may have side effects
so don't call it for a simple type check.
2011-08-15 17:22:48 +02:00
Mickaël Delahaye
e8d268fd5f Fix docs for fs.*chown
Fix bad parameters of fs.chown[Sync], fs.fchown[Sync] and
fs.lchown[Sync] in documentation.

Fixes #1533.
2011-08-15 22:45:41 +09:00
Bert Belder
9728723508 node_crypto: interface with libuv, not libev 2011-08-15 02:30:35 +02:00
koichik
4d186f270f Docs: Not memcpy, but memmove
Fixes #1520.
2011-08-14 23:10:36 +09:00
Peter Bright
16788f461a Rename gyp files to produce useful solution names.
Hoist common settings into common.gypi.

Restrict v8's common.gypi to v8 projects.

Ensure v8 doesn't use /MP in debug builds.

Add basic settings for other platforms.

Make uv import common.gypi properly.

Remove LTCG warning.
2011-08-13 19:57:42 -07:00
Thomas Shinnick
a5d90c435c path.js: correct three harmless .length typos
lib/path.js routines normalizeArray() and resolve() have for loops that
count down from end of an array.  The loop indexes are initialized using
"array.length" rather than "array.length-1".  The initial array element
accessed is always beyond the end of array and the value is 'undefined'.
Strangely, code exists that acts to ignore undefined values so that the
typos are unnoticeable.

Existing tests emit no errors either before or after changing to "length-1".
Tests _do_ start failing at "length-2". (Actually it is node that starts
to fail at "length-2" - that's a valid enough test...)
2011-08-14 04:10:42 +02:00
Ben Noordhuis
bfc2982f10 uv: upgrade to 5899192 2011-08-14 03:15:12 +02:00
Ben Noordhuis
eaac88163a module: fix pointer reference to out-of-scope variable
Reported by Tom Hughes.
2011-08-14 01:25:39 +02:00
Thomas Shinnick
59b815b097 test: add typed arrays to known globals list 2011-08-13 23:51:31 +02:00
Fedor Indutny
c0d8311f6b small NPN doc fix
Fixes #1522.
2011-08-14 02:51:35 +09:00
Artem Zaytsev
a38bda9fb2 platform: fix GetFreeMemory() on 64 bits freebsd
v_free_count is defined as u_int v_free_count (struct vmmeter sys/vmmeter.h:87)
but variable info defined as unsigned long, this cause error on 64-bits systems
because higher 32 bits remain uninitialized
2011-08-12 19:17:05 +02:00
Ben Noordhuis
97b0000c53 build: add src/v8_typed_array.cc to gyp sources list 2011-08-12 18:58:54 +02:00
Ben Noordhuis
cbea40eaf2 typed arrays: fix signed/unsigned compiler warnings 2011-08-12 18:52:06 +02:00
Ben Noordhuis
4726504663 typed arrays: preliminary benchmarks 2011-08-12 18:42:24 +02:00
Ben Noordhuis
efcbe3b21a typed arrays: add Float64Array 2011-08-12 18:42:24 +02:00
Ben Noordhuis
83b211ecb2 typed arrays: alias method subarray() to slice() 2011-08-12 18:42:24 +02:00
Ben Noordhuis
7cab4d6870 typed arrays: integrate plask's typed array implementation 2011-08-12 18:42:24 +02:00
Glen Low
04122ad2d3 crypto: PBKDF2 function from OpenSSL 2011-08-12 16:23:11 +02:00
Ben Noordhuis
01b64fc36b uv: upgrade to 7f82995 2011-08-12 16:14:58 +02:00
Brian White
b7c23ac3f5 Incorporate endianness into buffer.read* function names instead of passing in a boolean flag 2011-08-12 15:49:57 +02:00
Ben Noordhuis
a002f4f453 test: enable simple/test-http-dns-error for make test-uv 2011-08-12 15:46:44 +02:00
Ben Noordhuis
028b33b18a test: add test for #1202, uncatchable exception on bad host name 2011-08-12 15:46:18 +02:00
Ben Noordhuis
4e204f37fd net: defer DNS lookup error events to next tick
net.createConnection() creates a net.Socket object
and immediately calls net.Socket.connect() on it.

There are no event listeners registered yet so
defer the error event to the next tick.

Fixes #1202.
2011-08-12 15:42:45 +02:00
Ben Noordhuis
e00c2ec5e3 build: remove 1024 char read limit from cmake file 2011-08-12 15:32:43 +02:00
Ben Noordhuis
3cac57658f test: add test for #1202, uncatchable exception on bad host name 2011-08-12 15:23:29 +02:00
Ben Noordhuis
fa378ee4d8 net: defer DNS lookup error events to next tick
net.createConnection() creates a net.Socket object
and immediately calls net.Socket.connect() on it.

There are no event listeners registered yet so
defer the error event to the next tick.

Fixes #1202.
2011-08-12 15:22:56 +02:00
Arnout Kazemier
7ba30a4c2e Small changes for fs.watchFile. Fixed broken markdown. Changed variable f to a proper filename.
Fixes #1507.
2011-08-12 21:57:58 +09:00
Ryan Dahl
5b58473b40 Now working on v0.5.5 2011-08-12 02:15:19 -07:00
Ryan Dahl
cfba1f5922 Bump version to v0.5.4 2011-08-12 01:17:05 -07:00
Ryan Dahl
6c614fe585 Upgrade libuv to 65f71a2 2011-08-12 01:14:46 -07:00
Ryan Dahl
89bed19513 Upgrade V8 to v3.5.4 2011-08-11 23:59:21 -07:00
Ryan Dahl
fb7faefbf5 Upgrade libuv to d358738 2011-08-11 17:25:55 -07:00
Ryan Dahl
2c11718d79 Add some debug output to test-child-process-double-pipe 2011-08-11 17:25:55 -07:00
Ryan Dahl
3a219de586 net_uv: resume on closed net.Socket shouldn't crash 2011-08-11 17:25:54 -07:00
Ben Noordhuis
3cd694c9f3 build: .gitignore build/ directory 2011-08-12 01:10:41 +02:00
isaacs
ac4791393e Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:36:02 -07:00
isaacs
3210809d0a Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:31:29 -07:00
Ben Noordhuis
eb09b0644b http: destroy socket on error
Needs further investigation, the test passed without `--use-uv`.

Fixes failing test:
  test/simple/test-http-dns-fail.js
2011-08-11 23:39:38 +02:00
Ryan Dahl
3d4ae3ab4d net_uv: pipes don't have getsockname 2011-08-11 10:44:20 -07:00
koichik
d1a2628499 Doc improvements
related to #1472.
2011-08-12 02:00:42 +09:00
Ben Noordhuis
79f064f565 net: properly export remoteAddress to user land
Fixes failing test:
  test/simple/test-net-remote-address-port.js
2011-08-11 17:51:03 +02:00
Ben Noordhuis
f52a8db280 test: fix logic error in test-net-remote-address-port.js
The test intended to register an 'at exit' listener
but called `process.exit()` instead.
2011-08-11 16:26:01 +02:00
Christopher Wright
0d8d04e585 Correct code span
Fixes #1489.
2011-08-11 16:29:37 +09:00
Peter Bright
b9d777734d Fix MSVS building. 2011-08-11 04:52:33 +02:00
Bert Belder
74e8fa2e57 Upgrade libuv to ca633920f564167158d0bb82989d842a47c27d56 2011-08-11 04:38:41 +02:00
Ben Noordhuis
fcf9cfa137 node: propagate --use-uv to child processes 2011-08-11 02:47:43 +02:00
Ben Noordhuis
ef496dc39d uv: upgrade to e8497ae 2011-08-11 02:46:02 +02:00
Ryan Dahl
e6b06bc6c5 win: fix test-process-env
Remove support for setting process.env.TZ as it doesn't seem we can do it
x-platform without fixing V8.
2011-08-10 17:15:13 -07:00
Ben Noordhuis
e62cdd0488 uv: upgrade to b328e4c 2011-08-11 01:40:16 +02:00
Ben Noordhuis
c4549b8573 uv: upgrade to b6b97f3 2011-08-11 00:37:45 +02:00
Ben Noordhuis
460614125b tcp: propagate libuv tcp accept() errors to net_uv.js 2011-08-11 00:36:58 +02:00
Ryan Dahl
46b0654347 Upgrade libuv to db190c7 2011-08-10 14:23:26 -07:00
Ryan Dahl
72c412767d net_uv: Handle failed shutdown req 2011-08-10 14:09:39 -07:00
Ryan Dahl
c171a0851a Add test-pipe-file-to-http to test-uv 2011-08-10 13:33:22 -07:00
Ryan Dahl
4f03f1bead net_uv: fix test/simple/test-pipe-file-to-http.js 2011-08-10 13:27:11 -07:00
Ryan Dahl
35d0df919a test: Allow common.ddCommand to be run in presence of existing file 2011-08-10 11:32:37 -07:00
Ryan Dahl
4983bd348d x-platform func for spawning pwd in tests
Fixes test-child-process-buffering
2011-08-10 11:23:55 -07:00
Bert Belder
43da0e6fe4 Explicitly disable cr/lf conversion for test fixtures
Otherwise git's autocrlf feature makes test fail on windows.
2011-08-10 19:59:37 +02:00
Bert Belder
c96ef84427 Revert "Make test-sync-fileread pass even when git cr/lf conversion is enabled"
We'll solve this problem with a .gitattributes file.
This reverts commit 27ef0b0903.
2011-08-10 19:59:36 +02:00
Fedor Indutny
942f8b5afb Add NPN and SNI documentation.
Fixes #1420.
Fixes #1426.
2011-08-10 09:44:35 -07:00
Bert Belder
27ef0b0903 Make test-sync-fileread pass even when git cr/lf conversion is enabled 2011-08-10 04:30:31 +02:00
Bert Belder
764dfbb1bf Open files in binary mode, on msvc too 2011-08-10 04:23:44 +02:00
Ryan Dahl
3ce4adf3c6 Remove unnecessary line 2011-08-09 18:05:57 -07:00
Ryan Dahl
b3bc009a89 Fix test-net-server-on-fd-0 for windows by removing assert
Rename to regression test for GH-746 as the fd 0 behavior was not what the
bug report was about.
2011-08-09 18:01:54 -07:00
Ryan Dahl
501b0b91be Add fixed tests to test-uv 2011-08-09 17:46:29 -07:00
Ryan Dahl
3b0f2cecff Fix dd command tests for Windows 2011-08-09 17:43:57 -07:00
Ryan Dahl
665a4e4a1d Fix test/simple/test-repl 2011-08-09 16:38:48 -07:00
Ryan Dahl
03a119eb70 Improve win compat of test-repl 2011-08-09 16:07:16 -07:00
Tom Hughes
421b6e89aa crypto: fix incorrect ssl shutdown check 2011-08-09 23:56:00 +02:00
Tom Hughes
25118b0a26 net: fix incorrect sizeof() 2011-08-09 23:56:00 +02:00
Tom Hughes
94db871ecf crypto: fix incorrect ssl shutdown check 2011-08-09 23:54:49 +02:00
Tom Hughes
a8692a0154 net: fix incorrect sizeof() 2011-08-09 23:54:31 +02:00
Ryan Dahl
0696e78d64 Improve assert error messages
1. actual and expected should be displayed in the same order they were given

2. long values should be truncated.
2011-08-09 14:20:06 -07:00
Ben Noordhuis
fd1fc5080f eio: define HAVE_UTIMES 1 on cygwin, fixes build
Fixes #1483.
2011-08-09 22:57:09 +02:00
Ryan Dahl
acc120a37b windows: fix test-umask 2011-08-09 13:55:04 -07:00
Ryan Dahl
bf6b5299b4 Upgrade libuv to e5f513c 2011-08-09 12:26:54 -07:00
Ryan Dahl
cbecd88199 Readd the static libpthread-win32 libraries 2011-08-09 12:25:26 -07:00
Ryan Dahl
9e5cd012e2 Revert "Unify configure scripts"
This reverts commit 71435ede81.
2011-08-09 10:19:48 -07:00
Ryan Dahl
2689d262ec Make buffer.INSPECT_MAX_BYTES public for mscdex 2011-08-08 19:04:34 -07:00
Ryan Dahl
7332c4022f Truncate Buffer.inspect at 50 bytes 2011-08-08 17:50:43 -07:00
Ryan Dahl
ab0b1f9f13 Fix test-executable-path 2011-08-08 17:35:26 -07:00
Ryan Dahl
2126989a32 Fix test-http-upgrade-server and test-http-parser
Problem was introduced in last http-parser upgrade which fixed a long
standing bug with the upgrade event and removed several callbacks.
2011-08-08 17:12:26 -07:00
Robert Mustacchi
0df08c6a0c Endian argument should be a boolean. Signed integers shouldn't run through checks for unsigned integers. Clean up jslint. Provide unchecked uint entry points. 2011-08-08 17:01:57 -07:00
Ryan Dahl
f145e35a93 Tests should point at the build directory until GYP is default 2011-08-08 17:01:44 -07:00
Ryan Dahl
df22ccb0de Merge branch 'gyp' 2011-08-08 16:22:41 -07:00
Ryan Dahl
587f6c3117 Fix test-child-process-exec-cwd. 2011-08-08 16:17:18 -07:00
Ryan Dahl
71435ede81 Unify configure scripts 2011-08-08 15:09:42 -07:00
Ryan Dahl
c110fbcc99 Revert "Remove scons"
This reverts commit bd270b48a7.
2011-08-08 14:15:51 -07:00
Ryan Dahl
09f2d386df Upgrade libuv to 75c10905 2011-08-08 14:14:47 -07:00
Ryan Dahl
03b5831f90 Bring back old Makefile and configure script
GYP and WAF need to live in parallel for some time.
2011-08-08 14:12:44 -07:00
Ryan Dahl
d53fccbce5 Fix MSVS build 2011-08-08 12:32:34 -07:00
Ryan Dahl
db1bf679d8 Move GYP file to the project root 2011-08-08 12:11:48 -07:00
Ryan Dahl
f03ea7045c generate-project.bat: Point at the right path 2011-08-08 10:25:55 -07:00
Ryan Dahl
f57d70d3c9 sketch out configure support 2011-08-08 08:55:39 -07:00
Ben Noordhuis
f69822c70e http2: reword confusing comment 2011-08-08 17:38:50 +02:00
koichik
d439c092c2 Improve util.format() compatibility with browser.
Fixes #1434.
2011-08-08 23:24:05 +09:00
Mikeal Rogers
24a1f6ecc5 Fixes https host header default port handling. 2011-08-07 17:37:56 -07:00
isaacs
ef35f4d6c1 Test for default host headers on default ports in https and http 2011-08-07 17:37:56 -07:00
Ben Noordhuis
fc57df283c docs: rename readline.md to readline.markdown 2011-08-08 00:59:14 +02:00
Tom Hughes
b267dc458d cmake: Various fixes.
* Allow overriding install path with CMAKE_INSTALL_PREFIX.
* make sure js2min.py can be found when building out of source.
* Replace empty macros with void(0).
  Expressions like "debug(x) && foo()" fail if debug(x) is an empty macro.
* Make sure node-natives.h creation is deterministic.
* Fix version string.
  The copyright header made the node_version.h file larger
  than the previously set file read limit.
2011-08-08 00:57:30 +02:00
Ben Noordhuis
d5c95f02af docs: rename readline.md to readline.markdown 2011-08-08 00:56:04 +02:00
Ryan Dahl
13d685bdab symlink in ./node and ./node_g for make users 2011-08-07 14:54:37 -07:00
Ryan Dahl
b031429dc3 Add generate-projects.bat 2011-08-07 14:54:14 -07:00
Ben Noordhuis
54bb53bf32 docs: fix typo in tls API docs 2011-08-07 23:30:03 +02:00
Peter Bright
e38fc6cc84 Disable optimization in debug builds.
Enable full optimization in release builds.
2011-08-07 14:22:59 -07:00
Peter Bright
588ef72ce0 Silence VC++ warnings about use of badly-designed parts of the C library. 2011-08-07 14:22:45 -07:00
Peter Bright
bcff53dfb5 Fix missing prototype warnings. 2011-08-07 14:22:34 -07:00
Peter Bright
79d9f62946 Fix bad platform name. 2011-08-07 14:22:17 -07:00
Ryan Dahl
cafe446f42 Add 'make test' and friends 2011-08-07 01:24:00 -07:00
Peter Bright
6ac8c55989 Make MSVS build.
MSVS settings don't actually need to be guarded by conditions. gyp will do
the right thing.
2011-08-06 22:39:28 -07:00
Peter Bright
b88c48177a V8 GYP should attempt to not use cygwin. 2011-08-06 20:13:50 -07:00
Peter Bright
71333b3f5b Modify GYP scripts for VC build 2011-08-06 19:53:11 -07:00
Ryan Dahl
5aa75ebe71 Upgrade libuv - it now depends on pthreads 2011-08-06 19:11:55 -07:00
Ben Noordhuis
ad31e5af56 build: don't try to ls -lh executables that don't exist
Avoids `ls: cannot access build/debug/node_g: No such file or directory`.
Not an actual error but it confuses people.
2011-08-07 00:09:08 +02:00
Logan Smyth
3056c2ca76 Add documentation for SecurePair and its 'secure' event.
Fixes #1443.
2011-08-06 23:31:17 +09:00
Ryan Dahl
3ebbf6ebf7 Complete eio upgrade 2011-08-06 03:47:09 -07:00
Ryan Dahl
610436f242 clean merge scabs 2011-08-06 03:46:41 -07:00
Ryan Dahl
88afc406ca Upgrade libuv to 48877ed 2011-08-06 03:38:11 -07:00
Peter Bright
13d6a1f67f Basic VC++ compatibility work. 2011-08-06 03:31:29 -07:00
Ryan Dahl
bd270b48a7 Remove scons 2011-08-06 03:12:09 -07:00
Ryan Dahl
bef9f56cac Bring gyp into the tools directory; handwritten makefile 2011-08-06 03:12:08 -07:00
Ryan Dahl
466cbfef1b gyp: fix makefile build 2011-08-06 03:12:08 -07:00
Ryan Dahl
7a38b63358 gyp fix build again 2011-08-06 03:12:08 -07:00
Ryan Dahl
4eeeb756bc gyp: Fix build 2011-08-06 03:12:07 -07:00
Ryan Dahl
f038252ba5 add build/gyp_node build script 2011-08-06 03:12:07 -07:00
Ryan Dahl
51ffed1cd0 Upgrade libuv for gyp reasons 2011-08-06 03:12:07 -07:00
Ryan Dahl
43d7cfca18 gyp: fix test runner 2011-08-06 03:12:06 -07:00
Ryan Dahl
a979ab9d99 Improve gyp build - now works kind of 2011-08-06 03:12:06 -07:00
Ryan Dahl
f55f478523 add deps/v8/build ??? 2011-08-06 03:12:06 -07:00
Ryan Dahl
bea4827de0 More progress with gyp 2011-08-06 03:12:05 -07:00
Ryan Dahl
518430db3a WIP 2011-08-06 03:12:05 -07:00
Ryan Dahl
81a999c954 Upgrade libuv for gyp support 2011-08-06 03:11:33 -07:00
Ryan Dahl
4f3c8b3972 WIP 2011-08-06 03:11:33 -07:00
Ryan Dahl
c3ccbea5cd Upgrade http_parser to 965f91bc76b2d1601e23 2011-08-06 03:04:42 -07:00
koichik
bbb38b8918 [doc] add link to npm search in Readme.md
Fixes #1459.
2011-08-06 15:25:40 +09:00
Tony Huang
891a6f24a0 add the document of the new api routine: path.relative 2011-08-06 15:02:25 +09:00
Bert Belder
9e8d812ce9 Make test-child-process-exec-env work on windows 2011-08-05 22:57:45 +02:00
Bert Belder
567470b136 Child processes: support windowsVerbatimArguments option 2011-08-05 22:57:45 +02:00
Ben Noordhuis
69ce415d38 uv: fix build on systems that don't have pipe2()
This is libuv commit 2fbcbe9, cherry-picked for node.
2011-08-05 17:16:47 +02:00
koichik
ae77b4d553 Doc improvements
Documents util.format().
Thanks @bnoordhuis and @shigeki.
Fixes #1424.
2011-08-05 23:42:24 +09:00
Bert Belder
0878293120 Upgrade libuv to c834d5de9e4747e5138bed9140320b44622ab6de 2011-08-05 09:15:04 +02:00
Ben Noordhuis
30d20cf405 Revert commits 12c8b27 and 88f416a, fixed properly in 2fe4558. 2011-08-05 04:29:16 +02:00
Ben Noordhuis
2fe4558c10 uv: cherry-pick libuv commit 041d60e into node
Fixes execve-after-fork race in uv_spawn().
2011-08-05 04:27:18 +02:00
Ben Noordhuis
5a49522ba7 child process: don't send signal if process is already terminated
Fixes failing test test/simple/test-exec-max-buffer.js
2011-08-04 21:28:49 +02:00
Ryan Dahl
eeece4f5ea Upgrade V8 to 3.5.3 2011-08-04 12:18:09 -07:00
Ben Noordhuis
b8c8e9c113 net_uv: add listenFD shim that throws when called 2011-08-04 21:05:42 +02:00
Ben Noordhuis
2bbb468428 child process: bind to libuv's kill process API
Fixes failing test test/simple/test-child-process-kill.js
2011-08-04 18:40:41 +02:00
Ben Noordhuis
ac722bbed6 module: strip byte order marker when loading *.js and *.json files
BOMs make V8 raise a 'SyntaxError: Unexpected token ILLEGAL' exception.

Fixes #1440.
2011-08-04 16:52:55 +02:00
Ben Noordhuis
f9cfd70946 test: fix bad test in test-cli-eval.js
The test checked that stdout was empty. Forgetting to escape brackets
in the argument to --eval made that true on UNIX systems: the error
was written to stderr.

Props to Peter Bright for reporting the issue.
2011-08-04 16:43:11 +02:00
Ben Noordhuis
0c4e735401 ev: fix infinite loop in ev_walk() 2011-08-04 01:38:53 +02:00
Ben Noordhuis
88f416a5ed docs: add race warning to child_process.kill() 2011-08-03 16:50:47 +02:00
Ben Noordhuis
12c8b27e24 test: fix exec-after-fork race in test/simple/test-child-process-kill.js 2011-08-03 16:05:49 +02:00
Bert Belder
09bb1d64dc Upgrade libuv to ec143961d135adb3f49f5a2322774ef43e2520b9 2011-08-03 01:45:03 +02:00
Bert Belder
6efc86df6a Upgrade libuv to dbaddc4423d61fa16cca299650f8378cffba9cce 2011-08-03 00:27:16 +02:00
Ben Noordhuis
38f948a373 http: make http2 the default, legacy backend is available with --use-http1
Fixes #1441.
2011-08-02 23:40:56 +02:00
Mikeal Rogers
48dcb905f6 Update tests for http2. 2011-08-02 12:12:14 -07:00
Bert Belder
a962cca390 V8: Don't use mprotect on Cygwin as virtual memory is managed directly via WinAPI calls.
Upstream fix: http://codereview.chromium.org/7549009
2011-08-02 18:38:35 +02:00
Bert Belder
91ecfbcae8 Remove platform_win32_winsock 2011-08-02 18:38:34 +02:00
Ryan Dahl
158bfab922 Now working on v0.5.4 2011-08-02 01:08:01 -07:00
Ryan Dahl
4585330afe Bump version to v0.5.3 2011-08-02 00:17:41 -07:00
Ryan Dahl
21964fa779 Upgrade libuv to b2ed24d 2011-08-02 00:16:15 -07:00
Ryan Dahl
8ace421bfd Complete removal of node_child_process_win32.cc 2011-08-01 22:51:14 -07:00
Ryan Dahl
3ce671284b Remove node_child_process_win32.cc 2011-08-01 22:34:16 -07:00
Ryan Dahl
6d5218bc7d Merge branch 'v0.4'
Conflicts:
	doc/api/crypto.markdown
	doc/api/modules.markdown
	src/platform_win32.cc
2011-08-01 21:52:03 -07:00
Igor Zinkovsky
a6e0a91a70 windows: remove dependency on rpcrt4 and ole32 2011-08-01 20:44:27 -07:00
Ryan Dahl
89b14fc0ff Upgrade libuv to 2e9a743 2011-08-01 20:26:26 -07:00
Igor Zinkovsky
1c09cc1550 windows: set stdio streams to binary mode 2011-08-01 18:30:13 -07:00
Bert Belder
70bf121f21 Partial fix for test-child-process.cwd on windows 2011-08-02 03:27:19 +02:00
Ryan Dahl
2908f323e1 win: fix test-child-process-exec-cwd 2011-08-01 17:40:57 -07:00
Ryan Dahl
a44748b3d7 win2k3: fix test-child-process-env 2011-08-01 17:18:01 -07:00
Ryan Dahl
bceab40b02 Upgrade libuv to c35548a 2011-08-01 17:06:03 -07:00
Ben Noordhuis
e1bb241b51 test: add targets test-http2 and test-all-http2
Passes `--use-http2` to node. Fixes #1430.
2011-08-02 01:52:24 +02:00
Ben Noordhuis
e0d7c2cfa3 Upgrade libuv to 404d697 2011-08-02 01:16:58 +02:00
Ryan Dahl
99c15e5661 child_process_uv: don't attempt to pass test-child-process-deprecated-api 2011-08-01 16:05:57 -07:00
Ryan Dahl
ced0b14185 Add test-tls-securepair-server to test-uv 2011-08-01 16:02:23 -07:00
Ryan Dahl
e3ac47771c child_process_uv: fix test-child-process-stdin and -ipc 2011-08-01 15:40:44 -07:00
Tom Hughes
707b1dee84 cmake: Update for libuv. 2011-08-01 15:14:14 -07:00
Ryan Dahl
76fd364dfe Upgrade libuv to 5af7423f 2011-08-01 14:49:58 -07:00
Igor Zinkovsky
925b467a4e fix test-child-process-env on windows 2011-08-01 14:49:10 -07:00
Ryan Dahl
1710bea355 Add a few more asserts to test/simple/test-child-process-stdin.js 2011-08-01 14:48:45 -07:00
Ben Noordhuis
7c07e75db9 Upgrade libuv to b700896 2011-08-01 22:26:28 +02:00
Ryan Dahl
c48b2a98d8 windows: Fix test-module-load-list 2011-08-01 12:09:05 -07:00
Ryan Dahl
9166f85285 Remove debug code 2011-08-01 10:28:32 -07:00
Ryan Dahl
b30ad11b59 child_process_uv: Handle spawn errors 2011-08-01 10:22:24 -07:00
Ben Noordhuis
8da4831ed0 Upgrade libuv to 023f99a 2011-08-01 18:16:27 +02:00
Ryan Dahl
f0f941a59e link to rpcrt4 and ole32 on win32 2011-07-31 18:19:37 -07:00
Ryan Dahl
baa6a925c2 Upgrade libuv to e9bee51 2011-07-31 18:13:05 -07:00
Ryan Dahl
624dd38d89 child_process_uv: fix test/simple/test-child-process-env 2011-07-31 17:51:43 -07:00
Ryan Dahl
ef767a152b child_process_uv: fix simple/test-child-process-cwd 2011-07-31 16:50:53 -07:00
Ryan Dahl
19a62589b2 child_process_uv: add exec, fix simple/test-child-process-exec-cwd 2011-07-31 16:24:29 -07:00
Ryan Dahl
4ac633bf21 Forgot to add child_process_uv.js 2011-07-31 16:00:47 -07:00
Ryan Dahl
7772f21b60 initial pass at lib/child_process_uv.js 2011-07-31 15:58:10 -07:00
koichik
d3d8f1b972 Add %% escape to util.format()
Fixes #1273.
2011-07-30 23:56:17 +09:00
Paul Querna
5501a5a641 Add stdlib include for free(), fixing build on linux after f01b241 2011-07-29 18:28:12 -07:00
Ryan Dahl
f01b241057 add wrapper for uv_spawn
process.binding('process_wrap')
2011-07-29 18:03:44 -07:00
Ben Noordhuis
874260b40f util: add sprintf-like format() function
Fixes #1407.
2011-07-30 02:11:31 +02:00
Fedor Indutny
9010f5fbab Add support for TLS SNI
Fixes #1411
2011-07-29 16:57:28 -07:00
Ryan Dahl
9dd979228d Upgrade libuv to 7108ca88 2011-07-29 15:43:56 -07:00
Robert Mustacchi
de0b8d601c jslint cleanup: path.js, readline.js, repl.js, tls.js, tty_win32.js, url.js 2011-07-29 11:58:02 -07:00
isaacs
703a1ffe52 Revert "AMD compatibility for node"
This reverts commit 9967c369c9.

Conflicts:

	test/simple/test-module-loading.js
2011-07-29 11:56:38 -07:00
koichik
c72223e2a9 Doc improvements
related to #1391, #1415.
2011-07-30 03:18:33 +09:00
koichik
bffb758243 Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:47:54 +09:00
koichik
62aaf56d1b Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:47:17 +09:00
koichik
8b3ba47f88 Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:07:37 +09:00
Fedor Indutny
759fb36df3 crypto: dispose persistent properties on class destruction 2011-07-28 15:16:04 +02:00
Ryan Dahl
799c7bdcb6 Fix test-module-load-list for use-uv 2011-07-27 20:03:02 -07:00
Ryan Dahl
8527f00c3c Lazy load a few modules 2011-07-27 19:54:31 -07:00
Ryan Dahl
ea9ee1fb7e Add process.moduleLoadList for better startup transparency 2011-07-27 19:30:32 -07:00
Ryan Dahl
bca6e35b2b Don't always enable debug on startup
Improves startup time. Problem introduced in
4ab5476e89
2011-07-27 17:33:06 -07:00
Ryan Dahl
497fe79f97 Speed up startup time
Reverts 2a05fe784d.
2011-07-27 16:36:05 -07:00
Ryan Dahl
1ca5b6cd05 Remove pkg-conf file 2011-07-27 16:21:54 -07:00
Tom Hughes
eab8bebced Fix memleak in libeio. 2011-07-27 23:24:55 +02:00
Ben Noordhuis
8430148ccb uv: upgrade to fc7bc2b 2011-07-27 20:10:11 +02:00
Aku Kotkavuo
562bef5ff3 Add missing parentheses in buffer docs.
Fixes #1405.
2011-07-27 23:12:17 +09:00
Ben Noordhuis
83b82f900f wrap: upgrade pipe_wrap and tcp_wrap to new libuv API 2011-07-27 04:13:49 +02:00
Igor Zinkovsky
187fe27a6e stdio binding + javascript to enable process.stdin.listen() 2011-07-27 03:59:33 +02:00
Ben Noordhuis
de261713bf uv: upgrade to a1adfe3 2011-07-27 03:54:00 +02:00
SAWADA Tadashi
d3a84bea7b Fix crypto encryption/decryption with Base64.
Fixes #738.
Fixes #1205.
2011-07-27 00:19:02 +02:00
Ben Noordhuis
2d65f3c59a Include "platform.h", not <platform.h> - conflicts with system headers
Fixes #1003.
2011-07-26 22:09:03 +02:00
Ben Noordhuis
a7bdaabf60 Include "platform.h", not <platform.h> - conflicts with system headers
Fixes #1003.
2011-07-26 22:05:08 +02:00
Felix Geisendörfer
1b3ebc32d7 Fix test-net-stream.js
I broke this in 09ee293.
2011-07-26 17:31:08 +02:00
Ben Noordhuis
0082ef271e http: add --use-http2 switch 2011-07-26 17:00:53 +02:00
Ben Noordhuis
2ed23314c3 http: make http and http2 co-exist
http2 is currently disabled pending addition of a --use-http2 switch
2011-07-26 17:00:53 +02:00
Mikeal Rogers
915fa1e44f doc: http2 documentation 2011-07-26 17:00:53 +02:00
Mikeal Rogers
2b929c7f19 http: http2 implementation 2011-07-26 16:59:52 +02:00
Felix Geisendörfer
09ee29318f Emit 'close' after all connections have closed
Fixes #1383
2011-07-26 11:07:17 +02:00
Ben Noordhuis
df3a8fcb62 cli: don't print result of --eval
Fixes #572.
2011-07-25 23:59:10 +02:00
koichik
d32971a8cb Doc improvements and change argument name.
Fixes #1318.
2011-07-25 23:57:25 +09:00
Ben Noordhuis
deb100fb17 eio: remove trailing comma from enumerations
Fixes compile-time error in strict mode. Fixes #567.
2011-07-25 15:37:21 +02:00
Alexander Uvarov
216829e752 Docs for Socket::bytesRead, Socket::bytesWritten 2011-07-25 13:29:03 +02:00
Alexander Uvarov
14b75a126f Add Socket::bytesRead, Socket::bytesWritten 2011-07-25 13:28:38 +02:00
isaacs
c050d0fa19 Finish removing require.paths
Fix require() completion bug in repl, and correct man output
2011-07-24 18:04:45 -07:00
isaacs
bf0802402d Note that require.paths is gone in 0.5
Rather than say it "may disappear", let's just be clear that it *has*
disappeared, and exactly how long it'll be supported for.
2011-07-24 17:18:33 -07:00
Stefan Bühler
db993956d6 Fix crypto hmac to accept binary keys + add test cases from rfc 2202 and 4231
Fixes #324.
Fixes #1027.

Instead of converting buffers to strings and back again to char array
directly use the buffer data in hmac_init (same as in hmac_update).
2011-07-24 19:48:18 +09:00
Ben Noordhuis
aa0308d618 process: add process.features, remove process.useUV
Partially fixes #1385.
2011-07-23 23:16:48 +02:00
koichik
50e147bd03 Add an optional length argument to Buffer.write()
Fixes #243.
Fixes #1361.
2011-07-24 02:01:02 +09:00
Daniel Pihlström
fa829b0fd3 convert nonbuffer data to string in fs.writeFile/Sync
Fixes #657.
2011-07-23 23:56:08 +09:00
Jeroen Janssen
2fe780b36c build: add wscript detection for node_version 2011-07-23 16:23:01 +02:00
SAWADA Tadashi
e357acc55b Fix crypto encryption/decryption with Base64.
Fixes #738.
Fixes #1205.
2011-07-23 21:56:41 +09:00
Vicente Jimenez Aguilar
b8e9bf0993 Typos in ChangeLog file.
Fixes #968.
2011-07-23 21:16:45 +09:00
koichik
3eb246485a Doc improvements 2011-07-23 14:29:13 +09:00
Bert Belder
7a6a77e07c Windows/cygwin: no more GetConsoleTitleW errors on XP 2011-07-22 21:06:51 +02:00
Ryan Dahl
82905fa3aa Now working on v0.5.3 2011-07-22 11:51:43 -07:00
Bert Belder
78487b6256 Windows/cygwin: no more GetConsoleTitleW errors on XP 2011-07-22 16:33:55 +02:00
Ryan Dahl
08ffce1a00 Bump version to v0.5.2 2011-07-22 03:55:26 -07:00
Bert Belder
9e77b1a82e Upgrade libuv to 2806b0386b266ee7377459b49156a60a15b1dfea 2011-07-22 12:23:56 +02:00
Ryan Dahl
0ed1354119 Merge branch 'v0.4'
Conflicts:
	ChangeLog
	deps/v8/src/version.cc
	doc/index.html
	src/node_version.h
	test/simple/test-url.js
	wscript
2011-07-22 03:10:38 -07:00
Ryan Dahl
daead5f5bb win: fix simple/test-tls-client-abort.js 2011-07-22 02:11:02 -07:00
Ryan Dahl
8eb1edc8ea net_uv: Fix test-net-server-bind 2011-07-22 01:20:27 -07:00
Ryan Dahl
fea524e145 Merge branch 'V8-3.4' 2011-07-21 22:20:54 -07:00
Ryan Dahl
f319e12621 Upgrade V8 to 3.4.14 2011-07-21 22:20:37 -07:00
Ben Noordhuis
984dc057e3 net_uv: throw if Server.prototype.close() is called twice
Follows net_legacy behaviour.
2011-07-22 01:23:50 +02:00
Ben Noordhuis
345df289eb test: test pipe API with raw net.Stream() object
Test case for #1379.
2011-07-22 00:54:50 +02:00
Ben Noordhuis
8ddb334c2a net_uv: emit 'close' event in Server.prototype.close() 2011-07-22 00:54:50 +02:00
Ben Noordhuis
07bcdc2f51 net_uv: release uv handle in Socket.prototype.destroy() 2011-07-22 00:54:50 +02:00
Ben Noordhuis
59b04427d3 net_uv: defer handle creation to connect() or bind() time
Fixes #1379.
2011-07-22 00:54:50 +02:00
Ryan Dahl
20ced0ea1e Add tls tests to test-uv 2011-07-21 15:42:08 -07:00
Ryan Dahl
a6a3bf6d47 escape backslashes for windows pipe name 2011-07-21 14:19:24 -07:00
Ryan Dahl
a0198d065d Remove logos from package 2011-07-21 13:39:53 -07:00
Ben Noordhuis
4b77626add test: make test-http-unix-socket use common.PIPE
Don't unlink the socket, that's the responsibility of libuv and/or node.
2011-07-21 21:27:01 +02:00
Ben Noordhuis
725fcf5587 test: add test-net-pingpong to make test-uv list 2011-07-21 21:27:01 +02:00
Ben Noordhuis
bff9602966 test: add common.PIPE, pipe name for tests 2011-07-21 21:26:57 +02:00
koichik
691497babe Doc improvements
corresponds to #1374 and #1334.
2011-07-22 00:20:47 +09:00
Bert Belder
4d3a907f73 Upgrade libuv to 1028a9c6a75fde47b848c09c450fc066249fac1b 2011-07-21 15:41:28 +02:00
Bert Belder
3de406cc58 Add tests for process.nextTick bugs on windows
These are supposed to pass w/ libuv, so add them to the test-uv tests.
2011-07-21 15:26:10 +02:00
Trent Mick
bbf7e8ed5e http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374.
2011-07-21 14:20:40 +02:00
Trent Mick
a8f96d3314 http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374.
2011-07-21 14:15:33 +02:00
Yoshihiro Kikuchi
d3d776f978 test: added test/simple/test-fs-watch-file.js 2011-07-21 13:36:11 +02:00
Yoshihiro Kikuchi
3c4c36068e fs: added an argument check in fs.watchFile
Fixes #1324.
2011-07-21 13:35:47 +02:00
Ryan Dahl
133036fdad upgrade libuv to 6e50576 2011-07-20 19:57:03 -07:00
Ben Noordhuis
1b89323e92 uv: back-port c4611a4 from libuv 2011-07-21 03:51:23 +02:00
Ben Noordhuis
53aac9dde6 uv: upgrade to afc9987 2011-07-21 03:51:23 +02:00
Ben Noordhuis
0c396c05fd test: beef up checks in test-http-unix-socket.js, add to make test-uv 2011-07-21 03:51:23 +02:00
Ben Noordhuis
37cbc355d5 net: add bindings to libuv pipe API 2011-07-21 03:51:23 +02:00
isaacs
588d885e81 Close #1357 Load json files with require()
Signed off by everybody.
2011-07-20 17:39:23 -07:00
Ben Noordhuis
1b0e054737 url: throw descriptive error if url argument to parse() is not a string
Fixes #568.
2011-07-21 00:51:48 +02:00
Ben Noordhuis
6f0740e67b crypto: check for SSL_COMP_get_compression_methods()
Function was named SSL_COMP_get_compression_method() (singular)
in OpenSSL 0.9.7 and older.

Fixes #1242.
2011-07-20 22:24:11 +02:00
Ryan Dahl
0599cb7afa process.stdout/process.stderr should use net_legacy for now 2011-07-20 11:08:43 -07:00
Ben Noordhuis
9cc2bd11d3 Upgrade libuv to ce5eb6d 2011-07-20 18:06:16 +02:00
Ryan Dahl
effc4469d0 Now working on v0.4.11 2011-07-20 00:37:26 -07:00
Ryan Dahl
1b8dd65d6e Bump version to v0.4.10 2011-07-19 23:51:42 -07:00
Ryan Dahl
58655da3aa Use ms instead of sec for gc idle times
We were calling V8::IdleNotification too often.
2011-07-19 16:18:13 -07:00
Ryan Dahl
e3c1cf3b5b Remove toc on logo page 2011-07-19 15:01:05 -07:00
isaacs
ddfc6b78cc Close #1360 url: Allow _ in hostnames. 2011-07-19 11:56:44 -07:00
isaacs
dcecfc5f1b Close #1360 url: Allow _ in hostnames. 2011-07-19 09:55:01 -07:00
Reid Burke
973153d1cc Properly respond to HEAD during end(body) hot path
During write(), _hasBody is checked to make sure a body
is allowed -- this is now also checked during end(body)
when write() isn't used.

Concise final chunk for HEAD req's res.end(data).

Instead of simply clearing data, check _hasBody
earlier to avoid sending cruft when chunkedEncoding
is used.

Fixes #1291.
2011-07-20 00:24:17 +09:00
Ryan Dahl
87d974bb8f complete upgrade 2011-07-19 02:50:33 -07:00
Ryan Dahl
62f7c7961d Upgrade libuv to d4563a1 2011-07-19 02:47:15 -07:00
Ryan Dahl
6050af4fd7 net_uv: properly initialize writeQueueSize
Fixes simple/test-tcp-wrap-listen.js
2011-07-19 02:19:27 -07:00
Ryan Dahl
061ce7b0ac net_uv: Fix simple/test-http-expect-continue.js 2011-07-19 02:04:34 -07:00
Ryan Dahl
4ef8f06fe6 Finally remove node::EventEmitter 2011-07-19 01:46:38 -07:00
Ryan Dahl
0a3fc1d9c8 Remove StatWatcher's dep on C++ EventEmitter 2011-07-19 01:23:50 -07:00
Ryan Dahl
2e16ae703e Upgrade libuv to 4eff34da4 2011-07-18 16:26:37 -07:00
Ryan Dahl
85404c5c55 Move HandleWrap rules to one place 2011-07-18 13:47:56 -07:00
Ben Noordhuis
e5cceffe6a Replace reinterpret_cast with BitCast in deoptimizer to please certain compilers.
This is a back-port of upstream V8 rev 8672.

Fixes #1354.
2011-07-18 13:39:22 +02:00
Ryan Dahl
bd2d90feff Change text on homepage about Web Workers 2011-07-18 04:36:36 -07:00
Ryan Dahl
61cda1e34e PipeWrap should use HandleWrap::Close 2011-07-18 04:30:40 -07:00
Ryan Dahl
0c7bf8132e Abstract out HandleWrap class 2011-07-18 04:22:16 -07:00
Ryan Dahl
cc0f608c7c Add pipe_wrap 2011-07-18 03:08:54 -07:00
Ryan Dahl
1ae148909a Abstract StreamWrap from TCPWrap 2011-07-18 03:08:54 -07:00
Ryan Dahl
404a4db611 Output size of binaries on 'make' 2011-07-18 03:08:54 -07:00
isaacs
448eab2587 Close #1349 Delimit NODE_PATH with ; on Windows 2011-07-17 14:35:49 -07:00
Pierre-Alexandre St-Jean
93899cb0cb node-amqp is now being maintained by Theo Schlossnagle https://github.com/postwait/node-amqp 2011-07-17 22:40:01 +02:00
Ben Noordhuis
9f9a4cb928 Fix Math.pow crashes on machines without SSE2.
This is a back-port of r8577 from V8's upstream 3.1 branch.

Fixes #829.
2011-07-16 16:00:06 +02:00
Ben Noordhuis
61dfe5d2a9 Revert dcf6955: Fix V8 mingw32 build
Patch has been merged upstream in V8 3.4.6.

Fixes #1351.
2011-07-16 14:51:45 +02:00
Steve Engledow
292345fe62 Improve --help message and Fix -e/--eval switch
--help should at least give some hint that node takes the -e switch

Update help message to include -e and swap eval block with module load block so argv works correctly

[steve@sane node](master)$ ./node -e 'process.argv' foo bar
[ '/home/steve/code/node/node', 'foo', 'bar' ]

:)

Add simple test for -e option.

Fixes #1311.
2011-07-16 15:24:36 +09:00
koichik
4662ace916 Fix message tests
V8 3.4.12.1 changed exception log format.

3.14.10:
node.js:189
        throw e; // process.nextTick error, or 'error' event on first tick
        ^

3.4.12.1:
node.js:189
        throw e; // process.nextTick error, or 'error' event on first tick
              ^

The caret was moved.
2011-07-16 14:12:00 +09:00
Devon Govett
562b469b35 More accurite error messages when writing beyond the length of a Buffer.
Fixes #1336.
2011-07-16 12:56:14 +09:00
Igor Zinkovsky
d798866917 Apply PTW32_STATIC_LIB define to debug build of eio 2011-07-15 18:26:09 -07:00
Ryan Dahl
5709643289 Merge branch 'V8-3.4' 2011-07-15 17:47:37 -07:00
Ryan Dahl
ef1be160d6 Upgrade V8 to 3.4.12.1 2011-07-15 17:47:20 -07:00
koichik
e8bc80cf15 Doc improvements
Fixes #1334.
2011-07-16 09:45:43 +09:00
Henry Rawas
f3f3b12364 net_uv: getsockname binding 2011-07-15 16:44:13 -07:00
vegorov@chromium.org
17bff6082a Correctly propagate toolchain setting in SConstruct.
Patch by Bert Belder.

Review URL: http://codereview.chromium.org/7309014

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@8555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-16 00:40:32 +02:00
vegorov@chromium.org
442c5c95ad MinGW32: define STRUNCATE and change strncpy_s implementation to follow specification.
This fixes the debug build for MinGW32

Patch by Bert Belder.

Review URL: http://codereview.chromium.org/7308007

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@8552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-16 00:38:34 +02:00
Bert Belder
1c2dd454db libuv: stop g++ from complaining about anonymous struct usage 2011-07-16 00:31:47 +02:00
isaacs
7f0047c2d5 Close #1348 Remove require.paths
Module.globalPaths is still set to a read-only copy of the global
include paths pulled off of the NODE_PATH environment variable.

It's important to be able to inspect this, but modifying it no longer
has any effect.
2011-07-15 15:11:33 -07:00
isaacs
ebc4d5cd29 Remove duplicate docs about main module 2011-07-15 15:11:32 -07:00
AJ ONeal
eb7d762c55 Document that 'Buffer' is a global variable 2011-07-15 23:59:10 +02:00
Ryan Dahl
f4154d2940 Add 'make test-uv-debug'
To run: ./configure --debug && make test-uv-debug
2011-07-15 13:52:38 -07:00
Henry Rawas
3a96469319 connect-timeout callbacks after close 2011-07-15 13:43:28 -07:00
Ryan Dahl
130be31cff Upgrade libuv to 1be48f12a0
and bindings for new req interface
2011-07-15 13:41:44 -07:00
Ryan Dahl
f5a7de1ea7 windows: fix simple/test-executable-path 2011-07-15 11:05:12 -07:00
Ryan Dahl
48f65b3d57 Use uv_exepath 2011-07-15 10:46:11 -07:00
Wojciech Wnętrzak
25c1a5e804 added information about relative paths in File System module 2011-07-15 09:54:56 -07:00
Wojciech Wnętrzak
9a16f1c7d0 added information about relative paths in File System module 2011-07-15 09:54:20 -07:00
Shigeki Ohtsu
3c733c57b7 ev: define HAVE_SYNC_FILE_RANGE if kernel >= 2.6.17 *and* glibc version >= 2.6 2011-07-15 15:41:28 +02:00
Henry Rawas
e70702c620 connect-buffer play back queued write and end 2011-07-14 17:19:07 -07:00
Ryan Dahl
306af25325 Now working on v0.5.2 2011-07-14 16:56:39 -07:00
Ryan Dahl
f8bfa54d0f Bump to v0.5.1 2011-07-14 16:10:36 -07:00
Ryan Dahl
041c983290 Merge branch 'v0.4'
Conflicts:
	deps/libev/wscript
	doc/api/modules.markdown
2011-07-14 15:52:08 -07:00
Ryan Dahl
ab0d88142e Comment out wsa_get_proto_info(AF_INET6) - not needed - causes warning in Win2k3 2011-07-14 15:34:08 -07:00
Ryan Dahl
b5e7b7870a Revert "net_uv: fix localhost resolution - was defaulting to ::1 on OSX"
Breaks test/internet/test-dns.js

This reverts commit 6d8b082eed.
2011-07-14 15:29:21 -07:00
Brian White
612875765d Addons should not -DEV_MULTIPLICITY=0
Fixes #1229
Fixes #1332
2011-07-14 15:25:19 -07:00
Henry Rawas
77ecc5a41a add working http tests 2011-07-14 15:22:47 -07:00
Ryan Dahl
6d8b082eed net_uv: fix localhost resolution - was defaulting to ::1 on OSX 2011-07-14 14:49:50 -07:00
Ryan Dahl
7a782164b9 Upgrade libuv to f5ff8694 2011-07-14 14:29:24 -07:00
Elijah Insua
b722aaa8c5 Close #1303 Stream.pipe returns the destination
Squashed:

* Simple change to make Stream.pipe(destination) return the destination Stream
* Test: ensure Stream.pipe(destination) returns the destination Stream
* updated Stream.pipe() documentation to reflect that it now returns the
  destination stream
2011-07-14 14:25:49 -07:00
isaacs
9b5098f509 Close #1281 Make require a public member of module
Reviewed by @felixge
2011-07-14 14:25:49 -07:00
Henry Rawas
876712a074 test-tcp-wrap dont assume port 80 priveleged' 2011-07-14 14:18:47 -07:00
Henry Rawas
a13506b48f net_uv: sockets should be writable during connection 2011-07-14 14:18:17 -07:00
Henry Rawas
8adc6b8921 net_uv: Add maxConnections support 2011-07-14 13:23:08 -07:00
koichik
8caf7fdb05 Add tests for #1085 and #1304
Fixes #1327.
2011-07-15 01:58:43 +09:00
Stefan Rusu
5b02d564c3 Fixes #1085. The agent end event may call detachSocket() after the socket is detached and destroyed by abort(). This patch avoids that behavior. 2011-07-15 00:33:28 +09:00
Stefan Rusu
901ebed8ff Fixes #1304. The Connection instance may be destroyed by abort() when process.nextTick is executed. 2011-07-15 00:32:46 +09:00
Kip Gebhardt
7097eca5a7 Adding documentation for 'agent' option in http.request().
Fixes #1243.
2011-07-14 04:06:46 +09:00
koichik
a3e3ad40b1 Fix fs can't handle large file on 64bit platform
fs.read() and fs.write() can't handle more than 2GB files on 64bit platform.
Also fs.truncate() can't handle more than 4GB files.

Fixes #1199.
Fixes #1094.
2011-07-14 02:52:54 +09:00
koichik
5208abe723 Fix Buffer drops last null character in UTF-8
Reproduce:

    $ node
    > buf = new Buffer('\0')
    <Buffer >
    > buf.length
    0
    > buf = new Buffer(1)
    <Buffer 28>
    > buf.write('\0')
    0

Fixes #394.
Fixes #1210.
2011-07-14 02:21:56 +09:00
koichik
5f97c9a005 Improvements AssertionError message
Fixes #217.
2011-07-14 02:08:24 +09:00
koichik
128d1bab2a The Node.JS website should link to whichever ChangeLog will be updated soonest.
Fixes #1316.
2011-07-14 02:00:57 +09:00
koichik
701ae3c995 Document error in console.timeEnd
Fixes #1109.
2011-07-14 00:10:17 +09:00
AJ ONeal
8cc9ac0df2 added explanation of exports
Fixes #1075.
2011-07-14 00:08:31 +09:00
koichik
d05afa50e6 Doc improvements
Fixes #297.
2011-07-14 00:06:12 +09:00
Henry Rawas
92057554d5 fix socket-timeout. Also fix makefile test list name net-stream 2011-07-13 00:29:26 +02:00
Henry Rawas
9057d3f17e fix isip test 2011-07-12 22:42:09 +02:00
Henry Rawas
fad91d16ea test-net-reconnect needs socket connect event 2011-07-12 09:54:40 -07:00
Ryan Dahl
6bcd96c253 Update favicon 2011-07-11 12:24:49 -07:00
Ryan Dahl
360f4b78dd Fix wallpaper links 2011-07-11 08:48:02 -07:00
Ryan Dahl
b1c90a4e22 logo update 2011-07-11 08:30:37 -07:00
Ben Noordhuis
09130147cf Tell BSD users to run gmake instead. 2011-07-11 14:17:23 +02:00
koichik
7e8735b3fe Doc improvements. Explained the flags of fs.open().
Fixes #1268.
2011-07-09 17:09:26 +09:00
koichik
87b6dc21c8 Doc improvements
moved 'continue' event from http.Agent to http.ClientRequest.
added 'close' event to http.ClientResponse.
added 'open' event to fs.ReadStream.

Fixes #1169.
2011-07-09 13:23:28 +09:00
Ben Noordhuis
13a521e698 Fix off-by-one error in assertion.
Fixes test/simple/test-http-buffer-sanity.js
2011-07-09 03:24:51 +02:00
Henry Rawas
dcf6955c10 Fix V8 mingw32 build
Reported to V8
http://code.google.com/p/v8/issues/detail?id=1508
2011-07-08 18:21:29 -07:00
Igor Zinkovsky
a58b6439de Statically link in dependencies for node.exe 2011-07-08 17:44:58 -07:00
koichik
d38fac2230 Fixes #1260
RegExp object is no longer Function.
http://code.google.com/p/v8/issues/detail?id=617
2011-07-08 17:18:42 -07:00
koichik
8faf941109 Fixes #1267.
Error message of JSON.parse() was changed.
2011-07-08 17:18:31 -07:00
Ryan Dahl
91f1b250ec mraleph emit hack 2011-07-08 17:08:52 -07:00
Ryan Dahl
e5564a3f29 Upgrade V8 to 3.4.10 2011-07-08 16:40:11 -07:00
Ryan Dahl
0df2f74d36 Add several asserts to tcp_wrap
OnAlloc and OnConnection should not be occurring after uv_close was
called on the handle.
2011-07-08 15:22:40 -07:00
Henry Rawas
19f248400f test-uv: add more test cases 2011-07-08 14:30:12 -07:00
isaacs
fc80ee947a docs for chown/chmod 2011-07-08 22:41:30 +02:00
Henry Rawas
ff49299b48 add tests to "make test-uv" 2011-07-08 13:06:36 -07:00
Ryan Dahl
15286c8361 Start 'make test-uv' command 2011-07-08 10:40:53 -07:00
Henry Rawas
1018e7d23f isIP test 2011-07-08 10:36:16 -07:00
Henry Rawas
e81a89b116 fix eaddrinuse bug 2011-07-07 16:31:41 -07:00
Henry Rawas
3c52fd006e net_uv: fix test-net-eaddrinuse.js 2011-07-07 15:55:12 -07:00
Henry Rawas
b6f6a1ca11 ipv6 node 2011-07-07 15:51:55 -07:00
Ben Noordhuis
b62ecdc5bb Revert 3e2a2a7. Always send a HTTP/1.1 status line to the client. 2011-07-07 23:54:13 +02:00
Ben Noordhuis
3e8667d829 Revert 8dc8773. Always send a HTTP/1.1 status line to the client. 2011-07-07 23:49:31 +02:00
Ryan Dahl
395b670e58 Add deps/uv/src/ares to include path 2011-07-07 14:39:25 -07:00
Ryan Dahl
132ae752fa Escape $CC and $CXX when passed to uv and V8 2011-07-07 14:17:39 -07:00
Ryan Dahl
6b78b6bf72 Export $CC and $CXX to uv and V8's build systems
Now you can compile with clang by doing

  make distclean
  CC=clang CXX=clang++ ./configure
  make
2011-07-07 11:53:59 -07:00
Ryan Dahl
8a9fdedc9e complete libuv upgrade. sorry 2011-07-07 11:32:12 -07:00
Ryan Dahl
a2f2aa97ad Upgrade libuv to 9518ab65949257384bf7e407d8502a6437fdda4b 2011-07-07 08:56:48 -07:00
avz
cc83455534 sysctl(CTL_HW, HW_PHYSMEM) always returns unsigned long. Will work fine for 32 and 64 bit systems. Closes #1233. 2011-07-06 21:52:21 -07:00
Joe Shaw
3dbb3cdb6a SendTo and SendMsg expect a buffer only, not a string; fix the error message. Closes #1239. 2011-07-06 21:31:13 -07:00
Ryan Dahl
073fbea0f5 Bring back execScript
Undoing
http://codereview.chromium.org/7060008
https://groups.google.com/forum/#!topic/v8-dev/JTRHrPHFBts
2011-07-06 16:55:50 -07:00
isaacs
87900b14da url: Don't swallow punycode errors 2011-07-06 13:17:50 -07:00
isaacs
8475e1527d punycode: Test for integer overflow 2011-07-06 13:17:50 -07:00
Jeremy Selier
2a848fa727 Close #1149 IDNA and Punycode support in url.parse
Using @bnoordhuis's punycode lib.

Close #1174 also
2011-07-06 13:17:50 -07:00
Ryan Dahl
08a334fa45 Upgrade libuv to 0bf38570e8c7837bd830388f7b57f138aebb3395 2011-07-06 12:13:45 -07:00
Ryan Dahl
2dfed9f69a Now working on version v0.5.1 2011-07-05 22:13:55 -07:00
Ryan Dahl
ae7ed8482e Bump to v0.5.0 2011-07-05 18:45:03 -07:00
Ryan Dahl
111305c1bd Support SunOS 121. Check for ifaddrs in wscript for SunOS build. 2011-07-05 18:31:59 -07:00
Bert Belder
a845bf74ae Libuv: add cygwin support
Fails a few tests
2011-07-06 02:50:50 +02:00
Yoshihiro Kikuchi
82cfdb88fa fix an broken question.
Fixes #1274.
2011-07-06 09:24:37 +09:00
Ryan Dahl
d1eba2b18b Revert "Fixes #1260"
Due to downgrade of V8.

This reverts commit 3e2abd12d3.
2011-07-05 16:49:13 -07:00
Ryan Dahl
8b2f5af2a0 Revert "Fixes #1267."
Revert due to V8 downgrade.

This reverts commit 04c9169892.
2011-07-05 16:40:13 -07:00
Ryan Dahl
64a06c5ffd Revert "Error argument for http.ServerRequest 'close'"
Too slow.

This reverts commit e7ac6d8fcd.
2011-07-05 15:48:31 -07:00
Ryan Dahl
149562555c Downgrade V8 to 3.1.8.25
There are serious performance regressions both in V8 and our own legacy
networking stack. Until we correct our own problems we are going back to the
old V8.
2011-07-05 14:51:29 -07:00
Ben Noordhuis
f087206067 Verify that the argument passed to vm.runInContext() is a context object.
Fixes #558.
2011-07-05 23:39:13 +02:00
Ben Noordhuis
b74d119b34 Parse the command line before initializing V8.
Doing it the other way around means that V8 won't pick
up command line switches like `--prof`.

Props to Joshua Kehn for reporting the issue and Jeff Fifield
for pointing out the cause.

Fixes #900.
Fixes #1217.
2011-07-05 13:25:27 -07:00
Bert Belder
72e18d7f19 dns_uv: match the old api better, fix tests 2011-07-05 21:17:17 +02:00
Ryan Dahl
c0d3f1f485 uv: exception.code isntead of exception.errno 2011-07-05 12:08:17 -07:00
Ryan Dahl
32a0752d49 Merge branch 'V8-3.4' 2011-07-05 11:42:20 -07:00
Ryan Dahl
6054dcc130 Upgrade V8 to 3.4.9 2011-07-05 11:41:56 -07:00
Ryan Dahl
9c77169112 make test-process-uptime fail less often 2011-07-05 11:26:21 -07:00
Ryan Dahl
ede1acc1ed Revert "Remove 'connect' event from server side sockets"
Fixes #1276

This reverts commit f0a440d886.
2011-07-05 10:56:15 -07:00
Ryan Dahl
e8542b6220 Fix internet testcase config 2011-07-05 10:31:37 -07:00
Ryan Dahl
d964b4c5aa net_uv: enable another test case in test-net-pingpong 2011-07-05 10:08:35 -07:00
Alex Xu
f1b7c42524 Typo: stout -> stdout
Closes #874
2011-07-05 02:42:56 +02:00
Alex Xu
1c174cc1aa Typo: stout -> stdout
Closes #874
2011-07-05 02:42:32 +02:00
Bert Belder
4062a42aae Avoid assertion failure closing tty stdin on windows 2011-07-05 02:33:13 +02:00
avz
0c3a7c075e Fix wrong error handling at Open() after open(2) in sync mode 2011-07-05 02:05:37 +02:00
Ben Noordhuis
1e6b72e8cb Test case for issue #1228: errno masked in fs.openSync(). 2011-07-05 02:05:09 +02:00
Bert Belder
1e29fe65c3 Fix make test-internet 2011-07-05 01:53:01 +02:00
Ben Noordhuis
3e2a2a76fd Test cases for #1234: don't send HTTP/1.1 responses to HTTP/1.0 clients. 2011-07-05 01:41:37 +02:00
Ben Noordhuis
f91988979f Don't send a HTTP/1.1 status line to HTTP/1.0 clients.
Fixes #1234.
2011-07-05 01:41:30 +02:00
Ben Noordhuis
c6846565cf Clean up temporary file on exit.
Unbreaks test/simple/test-http-get-pipeline-problem.js,
it assumed a fixed number of files in the tmp directory.
2011-07-05 01:38:07 +02:00
Bert Belder
1037f5c113 Fix bug in timers_uv timeout recomputation
Closes #1209
2011-07-05 01:31:23 +02:00
Ben Noordhuis
222f85fdf4 Test cases for #1234: don't send HTTP/1.1 responses to HTTP/1.0 clients. 2011-07-05 01:13:57 +02:00
Ben Noordhuis
8dc87731c7 Don't send a HTTP/1.1 status line to HTTP/1.0 clients.
Fixes #1234.
2011-07-05 01:13:57 +02:00
Ben Noordhuis
092fc42fbf Clean up temporary file on exit.
Unbreaks test/simple/test-http-get-pipeline-problem.js,
it assumed a fixed number of files in the tmp directory.
2011-07-05 01:13:57 +02:00
Ryan Dahl
24a671a8aa legacy c-ares binding should use legacy timer 2011-07-04 15:56:56 -07:00
Bert Belder
858f23094e Bindings for libuv-integrated c-ares 2011-07-05 00:17:20 +02:00
Bert Belder
c953ecfb9e Fix v8 mingw build 2011-07-05 00:04:58 +02:00
Bert Belder
3b16a89b3a Fix net_uv.isIPv4/6 bug 2011-07-05 00:04:57 +02:00
Adam Luikart
7f30f13543 Update POSIX splitPathRe to allow control chars. Fixes #1230.
Use [\s\S] instead of . to match any char, including newlines.
2011-07-04 22:50:27 +02:00
koichik
04c9169892 Fixes #1267.
Error message of JSON.parse() was changed.
2011-07-05 04:15:51 +09:00
Niklas Fiekas
a3e5da07b4 Removed/Fixed TODO DRY 2011-07-04 21:15:00 +02:00
Ryan Dahl
38f3bf6610 net_uv: add isIP
Issue #1270: Doesn't completely pass test/simple/test-net-isip.js yet.
2011-07-04 11:33:29 -07:00
Joe Shaw
f6fa20fd55 Fix a misnamed argument; multicastAddress -> multicastInterface. Closes #1237. 2011-07-04 19:40:24 +02:00
Jörn Horstmann
ff50310cc5 Fixed a typo in a comment: "realpatch" -> "realpath" 2011-07-04 19:40:23 +02:00
Ben Noordhuis
20d7c47d6e Document that path.join() and path.resolve() ignore non-string arguments.
Fixes #514.
2011-07-04 19:40:20 +02:00
Mariano Iglesias
02ebcd8e26 Adding missing v8 namespace to NODE_PSYMBOL 2011-07-04 19:40:19 +02:00
Joe Shaw
7962eeef22 Fix a misnamed argument; multicastAddress -> multicastInterface. Closes #1237. 2011-07-04 10:00:31 -07:00
Jörn Horstmann
8cecc50b9d Fixed a typo in a comment: "realpatch" -> "realpath" 2011-07-04 09:53:30 -07:00
Mariano Iglesias
075605f304 Adding missing v8 namespace to NODE_PSYMBOL 2011-07-04 09:50:10 -07:00
Brett Kiefer
220e2281e4 Fix issue 915 (Failed to find kqueue on FreeBSD) with the relevant portion of a patch submitted to node.js dev (http://groups.google.com/group/nodejs-dev/browse_thread/thread/3aaf7fe2ca390fdc) by Davie Siegel. The issue is that event.h requires types.h on FreeBSD. This rearranges some of the logic but looks like it should still be valid for Darwin. 2011-07-04 09:27:15 -07:00
koichik
c60cdcda4e Fix net.Socket.connect argument parsing
Fixes #1251.
2011-07-05 00:52:16 +09:00
Ben Noordhuis
bd0baf2338 Check that PR_SET_NAME is defined.
Avoids breaking the build with older (pre-2006) linux kernels.
Raises a JS exception if the script tries to assign to `process.title`.

Fixes #840.
2011-07-04 17:23:14 +02:00
Ben Noordhuis
8e0d788842 Test for #402: writing base64 at position > 0 should not mangle the result.
This is a regression test, the bug itself was fixed in v0.3.x.
2011-07-04 17:07:50 +02:00
Ben Noordhuis
d6188bdd27 Document behaviour of the encoding parameter of fs.writeFile().
Fixes #401.
2011-07-04 16:26:46 +02:00
koichik
bcf3c7d31c Fix doctool uses RegExp object as a Function
RegExp object is no longer Function.
http://code.google.com/p/v8/issues/detail?id=617

Fixes #1262.
2011-07-04 22:52:44 +09:00
koichik
3e2abd12d3 Fixes #1260
RegExp object is no longer Function.
http://code.google.com/p/v8/issues/detail?id=617
2011-07-03 12:19:44 -07:00
koichik
38a0145869 Fix doctool uses RegExp object as a Function
RegExp object is no longer Function.
http://code.google.com/p/v8/issues/detail?id=617

Fixes #1262.
2011-07-03 11:27:23 -07:00
koichik
432d54900e Remove duplicate section in modules.markdown
Fixes #1263
2011-07-03 11:26:44 -07:00
Ryan Dahl
6d8b43c366 http: Fix agent id creation
Unbreaks test-regress-GH-877.js
2011-07-03 11:05:14 -07:00
Ryan Dahl
44d30f2d65 Fix require with --eval
Caused by bad merging of d6ec8f

Fixes #1261.
2011-07-03 10:49:20 -07:00
Ryan Dahl
69d20f5352 use_uv: Correct readyState on connecting 2011-07-02 00:18:36 -07:00
Ryan Dahl
a1e8fcc5ae Merge branch 'v0.4' 2011-07-01 20:32:41 -07:00
Ryan Dahl
5a2155dc71 Set process.useUV also on env NODE_USE_UV=1 2011-07-01 19:30:26 -07:00
Henry Rawas
56ec4e4f3c net_uv: fix test-net-connect-timeout.js test 2011-07-01 17:53:48 -07:00
Ryan Dahl
efca5456b8 Fixes #877. Don't wait for socket pool to establish connections.
Thanks to Yann Biancheri for putting together an initial test.
2011-07-01 15:49:42 -07:00
Ryan Dahl
f78f654131 Revert "debugger: don't allow users to input non-valid commands"
breaks 'print' command

This reverts commit 37d529f818.
2011-07-01 15:38:53 -07:00
Ryan Dahl
70a8927a93 Upgrade libuv to ba1c38f to fix mingw build 2011-07-01 10:59:42 -07:00
Robert Mustacchi
2cfab04037 Fix solaris build (http://codereview.chromium.org/7282034/) 2011-07-01 09:51:43 -07:00
Ryan Dahl
17ac0316d0 Complete libuv upgrade 2011-07-01 09:38:47 -07:00
Ryan Dahl
412e413edc Upgrade libuv 2011-07-01 09:30:44 -07:00
Henry Rawas
4c480551c3 net_uv: reuse socket 2011-07-01 09:01:06 -07:00
Yoshihiro KIKUCHI
99b210d7ea tiny fixes in tty_posix.js
Close #1158
Close #1160
Close #1252
2011-07-01 00:33:41 -07:00
Ryan Dahl
e38ae476ef net_uv: Stub out setKeepAlive 2011-06-30 14:53:22 -07:00
Henry Rawas
2e1af6df49 Fix V8 mingw32 build
Reported to V8
http://code.google.com/p/v8/issues/detail?id=1508
2011-06-29 20:51:30 +02:00
Ryan Dahl
1cb7b67ac3 Upgrade libuv to 8fd916d6ddc9c7fd0e3e8e668efbc2d782e8e742 2011-06-29 19:35:17 +02:00
Henry Rawas
dd175a4ede fix mingw build 2011-06-29 19:12:26 +02:00
Ryan Dahl
be1b55289f net_uv: Fix server.listen argument parsing 2011-06-29 18:04:55 +02:00
Ryan Dahl
33af2720f2 Upgrade V8 to 3.4.8 2011-06-29 17:26:51 +02:00
Ryan Dahl
6afdca885a Add docs about NODE_USE_UV to man page 2011-06-29 17:16:52 +02:00
Ryan Dahl
20996dbc2b Revert "Add support for file descriptor type detection."
This reverts commit 911cbd0cef.

This patch is broken on Linux and I don't want to think about the
functionality during the Windows port. We can reconsider it after v0.6.
2011-06-29 15:25:11 +02:00
Henry Rawas
d64e070e26 net_uv: Delay listen emit 2011-06-29 15:20:53 +02:00
Ryan Dahl
d005cc5cc9 Enable new timer binding only on --use-uv 2011-06-29 15:14:55 +02:00
Ryan Dahl
263e33a738 Revert "Get rid of the old timer binding"
This reverts commit cc82724fdc.

Conflicts:

	src/node.cc
	wscript
2011-06-29 15:06:40 +02:00
Ryan Dahl
23b8931b62 Merge branch 'v0.4'
Conflicts:
	src/node.js
	src/node_version.h
2011-06-29 14:50:03 +02:00
Ryan Dahl
e286480e34 Now working on v0.4.10 2011-06-29 14:44:38 +02:00
Ryan Dahl
de44eafd78 Bump to v0.4.9 2011-06-29 13:24:02 +02:00
Ryan Dahl
1e7769dfa3 Merge branch 'v8-3.1' into v0.4 2011-06-29 12:49:37 +02:00
Ryan Dahl
61553ccdda Upgrade V8 to 3.1.8.25 2011-06-29 12:49:17 +02:00
Ryan Dahl
09b8a5e2cf Dont install ares_build.h or ares_rules.h 2011-06-29 02:44:26 +02:00
Henry Rawas
4e1e60fbf0 Fix the MinGW build 2011-06-28 23:14:00 +02:00
Ryan Dahl
8cb5338f35 Fix test-tcp-wrap-listen 2011-06-28 13:56:02 +02:00
Henry Rawas
47a5d93256 Fix test-net-pingpong.js on windows 2011-06-28 13:52:36 +02:00
Ryan Dahl
f657d58fe1 Upgrade libuv to f9b9bb44bd6e2b74729b5d1ff481adf4213e9a0b 2011-06-28 13:37:03 +02:00
koichik
6c121edc60 Fix mismatch createConnection and Socket.connect
net.createConnection() is wrapper for net.Socket.connect(),
but There is mismatch between them.

net.createConnection(port, [host])
net.Socket.connect(port, [host], [callback])

Fixes #1208.
2011-06-28 13:36:45 +02:00
Ben Noordhuis
c626f8bd8f Test case for issue #1218: uncatchable exception on TLS connection error. 2011-06-27 13:18:31 +02:00
Ben Noordhuis
c95da949ec Prevent "undefined symbol: ev_rt_now" link errors in third-party modules.
Fixes #1181.
2011-06-23 00:35:35 +02:00
Ryan Dahl
02699a3a8e net_uv: child process use net_legacy; recognize NODE_USE_UV=1 env var 2011-06-20 15:51:03 +02:00
Ryan Dahl
d0a9e64245 net_uv: Don't add listenerCallback when null 2011-06-20 14:48:00 +02:00
koichik
d6ec8f668e Fix -e/--eval can't load module from node_modules
With -e or --eval, require() can load module using relative path.

    node -e 'require("./foo")'

But it can't load module from node_modules directory.

    node -e 'require("foo")'

Fixes #1196.
2011-06-20 13:47:27 +02:00
Ben Noordhuis
5c38163787 Fixes #1197. Fix failing os.getNetworkInterfaces() test in test-os.js 2011-06-20 13:31:14 +02:00
Ryan Dahl
d627083ed5 Fixes #1187. Support multiple 'link' headers 2011-06-20 12:51:30 +02:00
Ryan Dahl
feb26d6c74 Fixes #1203. Add missing scope.Close to fs.sendfileSync 2011-06-20 12:48:38 +02:00
Sam Shull
b057770f8a Fixes #1204. Add missing headers files to include
This commit fixes install of required dependencies for native
extensions.
2011-06-20 12:45:44 +02:00
Ryan Dahl
95b409c578 Upgrade libuv.
Also remove c-ares since it's included in libuv now.

libuv version b7b7df090ca285e53eb51bf518c4e5064876596
2011-06-17 19:53:19 +02:00
Ryan Dahl
f6ce86af04 net_uv: Export Socket and Stream 2011-06-17 18:09:15 +02:00
Ryan Dahl
dc0556c8cd net_uv: Implement end(), destroySoon() 2011-06-17 17:10:12 +02:00
Ryan Dahl
e697cfb6fc net_uv: shim up more methods 2011-06-17 14:27:02 +02:00
Ryan Dahl
52b517c6ab Revert "Add --cov code coverage option"
This can be done in user space. EG https://github.com/cloudkick/whiskey

This reverts commit da9b3340eb.
This reverts commit b4ff36a41b.

Conflicts:

	src/node.cc
2011-06-17 14:03:05 +02:00
Ryan Dahl
710f8e2acc Add --use-uv command-line flag to use libuv backend 2011-06-17 13:51:40 +02:00
Ryan Dahl
312ed83827 Support eof in net_uv 2011-06-17 13:36:16 +02:00
Ryan Dahl
8bf5b8d352 Initial pass at new net.js for libuv 2011-06-16 21:11:05 +02:00
Ryan Dahl
9696c27c45 tcp_wrap: implement shutdown 2011-06-16 16:08:17 +02:00
Ryan Dahl
ea8969787c tcp_wrap: Don't return req object on error. 2011-06-16 16:03:04 +02:00
Ryan Dahl
97296e405c tcp_wrap: add writeQueueSize 2011-06-16 15:49:44 +02:00
Ryan Dahl
ddc989333d tcp_wrap: implement socket.connect() 2011-06-16 15:33:47 +02:00
Ryan Dahl
dae73dbd28 tcp_wrap: onread oncomplete parameter massage 2011-06-16 15:12:57 +02:00
Ryan Dahl
dafe32d3bf tcp_wrap: implement write 2011-06-16 13:16:54 +02:00
Mark Cavage
7c51275bce Cleanup crypto verify to not print unnecessary errors 2011-06-15 20:02:21 +02:00
Ryan Dahl
3d7d994ffc Merge branch 'v0.4'
Conflicts:
	doc/api/modules.markdown
	test/simple/test-crypto.js
2011-06-15 14:43:37 +02:00
Mathias Buus
39246f65df Closes #1177 remove one node_modules optimization
to better support certain project structures.
2011-06-14 15:32:41 -07:00
Ryan Dahl
86214c9f16 tcp_wrap: Initial wrap of uv_read_start 2011-06-14 18:03:01 +02:00
Ryan Dahl
5fd9adccdb Remove confusing comment in node_buffer.h 2011-06-14 13:18:32 +02:00
Ryan Dahl
1261b17129 libuv wraps: Dispose of JS object on close() 2011-06-14 13:03:49 +02:00
Mark Cavage
88552c51ae Support for signature verification with RSA/DSA public keys
Fixes #1166.
2011-06-14 12:50:00 +02:00
Ryan Dahl
55636e5526 tcp_wrap: Remove listener deck 2011-06-14 12:47:07 +02:00
isaacs
9967c369c9 AMD compatibility for node, with docs and tests
Closes #1173
Closes #1170
2011-06-13 16:11:13 -07:00
Trevor Burnham
f46811633c Documenting require.main, fixing #997 2011-06-13 13:39:02 -07:00
Bert Belder
2eb1274d6c Compensate for uv_async_init api change 2011-06-12 20:53:04 +02:00
Ryan Dahl
1ba2c32135 Massage util.inherits for perf increase 2011-06-11 08:51:48 +02:00
Ryan Dahl
effeeb5cf2 Bind uv_listen() 2011-06-10 18:25:27 +02:00
Ryan Dahl
062759194b Initial binding to uv_tcp_t 2011-06-10 18:17:48 +02:00
Ryan Dahl
623f513071 Upgrade libuv 2011-06-10 18:17:44 +02:00
Bert Belder
09ac99f1f4 Avoid tick spinner spinning forever 2011-06-08 05:06:16 +02:00
Bert Belder
406f44a86b Build on windows again 2011-06-08 05:06:15 +02:00
Bert Belder
126e3ba2d3 Get rid of node_idle_watcher 2011-06-08 05:06:15 +02:00
Bert Belder
cc82724fdc Get rid of the old timer binding 2011-06-08 05:06:14 +02:00
Bert Belder
d9aa9b54cf Use timer_wrap instead of the old timer binding 2011-06-08 05:06:13 +02:00
Bert Belder
5c9a262eb0 Compatibility issue and warning in x-forwarded-for dtrace probe 2011-06-08 05:06:09 +02:00
Ryan Dahl
7a5977b5d6 Upgrade libuv to e58a1abff02d7bacf89a56de9050e27690a97bc5 2011-06-07 18:59:44 +02:00
isaacs
794cb60f9e typo 2011-06-04 10:41:41 -07:00
isaacs
580ab7ba2c Avoid instanceof for native object types
For classes defined in the module, this is fine.  For 'Error'
it's probably not very hazardous.  However, testing 'Object'
and 'String' is much more reliable using typeof, to work with
the repl and NODE_MODULE_CONTEXT modes.
2011-06-04 10:38:49 -07:00
Dave Pacheco
e142fe2be6 DTrace probes: support X-Forwarded-For
INTRO-385
2011-06-04 16:05:01 +02:00
Ryan Dahl
b6a742d76f Merge branch 'v0.4' 2011-06-03 16:37:56 +02:00
Siddharth Mahendraker
37d529f818 debugger: don't allow users to input non-valid commands
Fixes #1144.
2011-06-03 14:50:12 +02:00
Ryan Dahl
1d7a46a588 Disabling SSL compression is dependent on OpenSSL version 0.9.8
Fixes #1087.
2011-06-03 14:50:02 +02:00
Ryan Dahl
4956e3c0a2 Upgrade http-parser to eee60127c0df551be085cc8e7983e36d7700d885 2011-06-03 14:12:14 +02:00
Ryan Dahl
0cb4484d43 Doc improvements
Fixes #1147.
Fixes #1139.
Fixes #1126.
Thanks ctide, kext, disfated.
2011-06-03 13:27:35 +02:00
Jérémy Lal
f23c45f7f4 Option to disable SSL v2
Fixes #880
2011-06-03 08:37:28 +02:00
Ryan Dahl
b96ae6674d document require.cache 2011-06-03 08:14:35 +02:00
Fuji, Goro
8971b59365 node -e '' should mean eval(''), not invoke REPL
Fixes #1116
2011-05-31 22:10:39 -07:00
Ryan Dahl
650a308634 Move MakeCallback and SetErrno to node.cc 2011-05-28 13:44:03 -07:00
Ryan Dahl
4d22405f0f TimerWrap: mimic libev ref count semantics 2011-05-28 13:21:03 -07:00
Ryan Petrello
58a1d7ec30 Close #562 Close #1078 Parse file:// urls properly
The file:// protocol *always* has a hostname; it's frequently
abbreviated as an empty string, which represents 'localhost'
implicitly.

According to RFC 1738 (http://tools.ietf.org/html/rfc1738):

A file URL takes the form:

   file://<host>/<path>

where <host> is the fully qualified domain name of the system on
which the <path> is accessible...

As a special case, <host> can be the string "localhost" or the empty
string; this is interpreted as 'the machine from which the URL is
being interpreted'.
2011-05-27 10:47:34 -07:00
Ryan Dahl
9d1bad8960 Implement new wrap for uv timer 2011-05-25 10:17:02 -07:00
Ben Noordhuis
eb4c9ed881 Fix resource leaks in node_crypto.cc
Fixes #1097.
2011-05-24 23:36:54 -07:00
Brian White
9b3472637e Crypto documentation fixes
Fixes #1104.
2011-05-24 23:35:18 -07:00
Ryan Dahl
8f06547548 Fixes #1102. Install ev.h into $PREFIX/include/node/ev/ev.h 2011-05-24 13:43:10 -07:00
Felix Geisendörfer
f0a440d886 Remove 'connect' event from server side sockets
Sockets emitted by the 'connection' event are always connected, having
them emit the 'connect' event makes no sense. It only confused people,
as it's not clear if you have to listen to 'connect' or not.

That try..catch block was also very scary. It would silently swallow
exceptions in 'connect' listeners and destroy the socket. Makes no
sense.

Fixes #1047.
2011-05-24 11:22:59 -07:00
Felix Geisendörfer
2b91256c61 Fix error handling bug in stream.pipe()
Problem: Since stream.pipe() is registering it's own error handlers on
the source and destination stream, it needs to replicate the
EventEmitter 'error' emitting semantics of throwing an error if there
are no other listeners. However, there was a off-by-one error because
the check for remaining listeners was done after cleanup() which means
the pipe's own listener was no longer included.

This would cause 'error' events on either the dest or the source to
throw if there was one other error listener, and while swallowing
the 'error' event if there was no other listener.

Solution: I added a test demonstrating the two issues and fixed the
problem by correcting the off-by-one error.

Fixes #1095.
2011-05-24 10:50:33 -07:00
Brian White
d22259426c Fix incorrect documentation for assert.fail()
Fixes #1100.
2011-05-24 10:44:14 -07:00
Ryan Dahl
a72284e264 Fix windows EOL chars 2011-05-23 17:38:55 -07:00
Bert Belder
9cec08e490 Batch of ev -> uv changes 2011-05-23 17:31:29 -07:00
Ryan Dahl
207901e7de Guard tick_spinner start/stop
All tests passing on OSX. Thanks to Bert for debugging this.
2011-05-23 15:38:57 -07:00
Ryan Dahl
d3426789d2 Upgrade libuv to d91b5012bd32b60f1a0f35241f7ac45c147f0c8a 2011-05-23 15:25:21 -07:00
Ryan Dahl
2c79f13634 Upgrade libuv to 40f0ad6d364cff76adaf1c7f182b1dc939f36617 2011-05-22 13:08:31 -07:00
Ryan Dahl
860cb906a6 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-05-22 13:02:06 -07:00
Ryan Dahl
823604a4e0 Now working on v0.4.9 2011-05-21 00:10:23 -07:00
Ryan Dahl
7dd22c26e4 Bump to v0.4.8 2011-05-20 19:40:06 -07:00
Ryan Dahl
80b0225b98 Merge branch 'v8-3.1' into v0.4 2011-05-20 19:25:30 -07:00
Ryan Dahl
cee4ce39a9 Upgrade V8 to 3.1.8.16 2011-05-20 19:24:37 -07:00
Ryan Dahl
70dd6d4ea3 Fix TJ's assert error
Unable to reproduce but connect's "make test TESTS=test/static.test.js" does
it occasionally.
2011-05-20 15:41:04 -07:00
Mark Cavage
a55a9ff3c2 Additional docs for net.listenFD()
Fixes #1080.
2011-05-20 15:02:22 -07:00
Ryan Dahl
59274e8a33 Merge branch 'v0.4'
Conflicts:
	lib/crypto.js
	lib/tls.js
2011-05-20 10:29:16 -07:00
Ryan Dahl
9c7f89bf56 CryptoStream.prototype.readyState shoudn't reference fd
Fixes #1069
2011-05-20 10:20:22 -07:00
Brian White
2de0611b43 Remove unused variable
Fixes #1077
2011-05-20 08:51:55 -07:00
Robert Mustacchi
7ea19d02fd Use same make as when originally invoked 2011-05-20 08:34:25 -07:00
Robert Mustacchi
317653b4df Rework getNetworkInterfaces() for Linux, SunOS, Mac OS X 2011-05-20 08:34:18 -07:00
David Trejo
8a0ac5b422 Add test for agent upgrade and example in docs 2011-05-19 18:44:42 -07:00
Ryan Dahl
73ea01cd64 Revert "Upgrade libuv to 9c2dd6bea970b2376696aba070bdfc2873843cfb"
This reverts commit 4b60e87afe.

Event loop ref count broken.
2011-05-19 17:50:13 -07:00
Alexandre Marangone
6c28fcf661 (char *) casting for all strings args to kstat function to avoid warnings
Fixes #1071.
2011-05-19 14:53:31 -07:00
Alexandre Marangone
5d9dc1c6d5 Adding os.totalmem() and os.freemem() for SunOS 2011-05-19 14:53:07 -07:00
Fedor Indutny
21724ecaec Share SSL context between server connections
Fixes #1073.
2011-05-19 14:45:42 -07:00
Ryan Dahl
6461af1baa Fix buffer test 2011-05-19 12:41:17 -07:00
Ryan Dahl
5e409c2f1a makeFastBuffer should not segfault but rather throw on non-buffer 2011-05-19 12:13:48 -07:00
Ryan Dahl
4b60e87afe Upgrade libuv to 9c2dd6bea970b2376696aba070bdfc2873843cfb 2011-05-19 10:37:51 -07:00
Ryan Dahl
3ac0ada758 Merge branch 'v0.4' 2011-05-19 10:34:42 -07:00
David Trejo
f4e69e44ff readline docs 2011-05-18 21:13:49 -07:00
David Trejo
68d840b47d readline docs 2011-05-18 21:12:15 -07:00
Ryan Dahl
85934bcf2a Remove libev/macos kqueue override - goes in libuv 2011-05-17 14:55:26 -07:00
Ryan Dahl
63c0d71213 Changes for job bullets 2011-05-17 13:25:25 -07:00
Ryan Dahl
0271b785a1 fork: Use utf8 for channel encoding 2011-05-17 10:51:30 -07:00
Ryan Dahl
85bc8d02fa Merge branch 'v0.4'
Conflicts:
	src/node_crypto.cc
2011-05-16 19:29:02 -07:00
Ryan Dahl
103a450d3a Remove 'binary' encoding assert - add tests
Don't write large characters to buffers with binary encoding. You will be
silently injured.
2011-05-16 15:01:33 -07:00
isaacs
249361cab7 Close #1054 More clear documentation for module system 2011-05-16 23:30:43 +02:00
Ryan Dahl
e83c6959db Disable compression with OpenSSL.
This improves memory and speed. Users may apply compression in "userland"
above the CryptoStream layer if they desire.
2011-05-16 10:33:19 -07:00
koichik
d4f82ea590 Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"
Fixes #1038
2011-05-16 10:21:16 -07:00
Brian White
e505a1215c Add reading/writing of floats and doubles from/to buffers
Code for readIEEE754/writeIEEE754 is from jspack: http://code.google.com/p/jspack/
2011-05-15 18:39:07 -07:00
koichik
80c2fe9456 Fix event listener leak check timing
Fixes #1041.
2011-05-14 14:43:00 -07:00
koichik
56aa2fd4c3 Fix doc - missing dns.resolveNs() and dns.resolveCname()
Fixes #1039.
2011-05-14 14:36:58 -07:00
Felix Geisendörfer
9d717f6bef Update http.ServerRequest docs
The documentation for 'end' was wrong, and 'close' now has an `err`
parameter.
2011-05-14 14:21:41 -07:00
Felix Geisendörfer
e7ac6d8fcd Error argument for http.ServerRequest 'close'
Problem: It was not possible to detect the reason for a premature
connection termination in http requests.

This patch provides a new `err` argument to the 'close' event which
can be inspected to differentiate between a timeout and a client
actively terminating the connection.

Also contains tests for this new behavior for http and https.
2011-05-14 14:15:31 -07:00
Felix Geisendörfer
1fde5f51b4 Make https 'timeout' events bubble up
Also adds a test case for it.
2011-05-14 13:38:04 -07:00
Ryan Dahl
91bd144d2c check_tick_watcher to use libuv 2011-05-13 07:09:28 -07:00
Ryan Dahl
a46c63bae7 prepare_tick_watcher to use libuv 2011-05-13 07:06:20 -07:00
Ryan Dahl
17c88db158 move tick_spinner on libuv 2011-05-13 06:59:33 -07:00
Ryan Dahl
efca334be2 Integrate libuv into build system 2011-05-13 00:54:00 -07:00
Ryan Dahl
9a3dd754be Add trademark stuff to homepage 2011-05-11 13:40:42 -07:00
Ryan Dahl
337c48db5f Rename spawnNode to fork 2011-05-11 13:32:40 -07:00
Ryan Dahl
7ea7094314 Improve spawnNode docs 2011-05-11 12:31:35 -07:00
Ryan Dahl
9e26dab150 child_process.spawnNode
For making easy worker processes.
2011-05-11 02:24:48 -07:00
isaacs
307f39ce9e Fix a url regression
The change for #954 introduced a regression that would cause
the url parser to fail on special chars found in the auth
segment.  Fix that, and also don't create invalid urls when
format() is called on an object containing an auth member
containing '@' characters or delimiters.
2011-05-10 13:57:25 -07:00
Ryan Dahl
11beac70e2 Docs: server.pause() server.address() socket.address() 2011-05-09 10:49:27 -07:00
Trevor Burnham
31ed87b0a9 Documenting require.main, fixing #997 2011-05-09 10:29:09 -07:00
isaacs
205b9beb6b Merge branch 'v0.4'
Conflicts:
	lib/tls.js
	lib/url.js
	src/node_version.h
	test/simple/test-buffer.js
	test/simple/test-url.js
2011-05-07 20:38:32 -07:00
Ryan Dahl
110f06578d Agent socket errors bubble up to req only if req exists
Fixes #836.
2011-05-07 12:30:58 -07:00
Marcel Laverdet
c2b5ea218c Attempt to connect to debug process more than once
The debugger would give up after only 100ms but on my system this
timeout isn't enough. The startup process is now modified to try 6
times every 50ms instead.

Fixes #1010.
2011-05-06 20:53:40 -07:00
Ryan Dahl
5ab3ea3955 Point changelog to correct branch
Fixes #1002. Thanks cjavapro.
2011-05-06 16:05:04 -07:00
Ryan Dahl
55bff5bab9 TLS: simplify logic 2011-05-06 17:06:36 -07:00
Nathan Rajlich
72824d8d2d Make sure 'ARCH' get's defined with the CMake build system.
Fixes #1004.
2011-05-06 16:03:39 -07:00
Ryan Dahl
c33790262b Added docs for fs.fsync and fs.fsyncSync
Thanks baudehlo. Fixes #1009.
2011-05-06 16:02:22 -07:00
Håvard Stranden
9f0b1a9bc6 Add Diffie-Hellman support to crypto module
Fixes #573
2011-05-06 14:36:04 -07:00
Ryan Dahl
00aee73692 Add docs for buffer.fill() 2011-05-06 13:42:55 -07:00
Konstantin Käfer
5e1b7cadb4 Add Buffer::fill method to do memset
Fixes #477.
2011-05-06 13:39:12 -07:00
Ryan Dahl
fc8afd45c7 Fix crash in debugger 2011-05-05 16:52:05 -07:00
Ryan Dahl
ad487d3226 Add on('error') to http request example
for indexzero
2011-05-05 15:40:55 -07:00
Ryan Dahl
c409aab397 Assert, Debug output in normal default build 2011-05-04 21:41:01 -07:00
Ryan Dahl
75a0cf970f cleartextstream.destroy() should destroy socket.
This fixes a critical bug see in MJR's production. Very difficult to build a
test case. Sometimes HTTPS server gets sockets that are hanging in a
half-duplex state.
2011-05-02 15:03:50 -07:00
Robert Mustacchi
9812e31e8b Add reading/writing of C integers to buffers 2011-05-01 14:02:33 -07:00
Ben Noordhuis
82bc25d5ad Remove oprofile flags in wscript.
V8 3.1.5 (commit 550f73a) dropped oprofile support so don't pass
prof=oprofile to scons.

See http://codereview.chromium.org/6474037/

Fixes #998.
2011-05-01 08:00:34 -07:00
Ryan Dahl
8d88c00b77 Merge branch 'v8-3.1' into v0.4 2011-04-30 11:38:55 -07:00
Ryan Dahl
eb57d1b9b1 Upgrade V8 to 3.1.8.14 2011-04-30 11:38:25 -07:00
koichik
fcc04e67c8 Fix SlowBuffer.write() with 'ucs2' throws ReferenceError. 2011-04-28 04:57:00 -04:00
koichik
1343ee8d54 Doc improvements. 2011-04-28 04:54:28 -04:00
isaacs
7c6f0147df Better stream.pipe() tracking.
This commit does three things:

1. Uses an exposed counter rather than a hidden array for tracking dest
streams that may have multiple inputs.  This allows for significantly
faster lookups, since the counter can be checked in constant time rather
than searching an array for the dest object.  (A proper O(1) WeakMap
would be better, but that may have to wait for Harmony.)

2. Calls the 'end' event logic when there is an 'error' event on the
source object (and then throws if there are no other error listeners.)
This is important, because otherwise 'error' events would lead to
memory leaks.

3. Clean up the style a bit.  Function Declarations are not allowed
within blocks in ES strict.  Prefer Function Declarations to Function
Expressions, because hoisting allows for more expressive ordering of
logic.

Downside: It adds "_pipeCount" as part of the Stream API.  It'll work
fine if the member is missing, but if anyone tries to use it for some
other purpose, it can mess things up.
2011-04-27 22:08:21 -07:00
Ryan Dahl
8a03cf7a7b Fix docs for process.arch 2011-04-27 11:49:24 -04:00
isaacs
a7ce79124e Add arch/platform to os module 2011-04-26 20:04:32 -07:00
Nathan Rajlich
b1be5409bd Implement process.arch to get a String of the current processor architecture, with docs. 2011-04-26 19:56:10 -07:00
isaacs
bbffd9e502 Close #983 Better JSON.parse error detection
Previous pattern would only catch ILLEGAL, not { or other
known-but-unexpected JSON tokens.
2011-04-26 09:48:28 -07:00
Mark Cavage
a2328dc73c Add support for Unix Domain Sockets to HTTP
fixes #979.
2011-04-25 16:52:31 -07:00
George Miroshnykov
68c8a69f4c Close #962: Fixed typo in vm.runInNewContext docs.
EDIT: Also added another typo fix to this commit. --isaacs
2011-04-25 13:45:58 -07:00
isaacs
8df6f9e544 Close #974 Properly report traceless errors.
Also, tests for the same.
2011-04-25 12:22:18 -07:00
isaacs
8fd1c68f06 A test that running 100 stream pipes in parallel is ok 2011-04-22 19:33:23 -07:00
Ryan Dahl
0325a21ff3 Correct attribution 2011-04-22 19:04:43 -07:00
Ryan Dahl
621b024b6e Bump bounds on #897 test - was too small for slow machines 2011-04-22 17:50:40 -07:00
Ryan Dahl
1f470b68d6 Now working on v0.4.8 2011-04-22 17:49:56 -07:00
Ryan Dahl
c85455a954 bump version to v0.4.7 2011-04-22 17:06:25 -07:00
Ryan Dahl
c8e447ee63 Fix timeouts with floating point numbers bug
fixes #897.
2011-04-22 16:38:29 -07:00
Ryan Dahl
3ce5e6fe5e Use better ports on the home page 2011-04-22 16:01:34 -07:00
Robert Mustacchi
ed657e9d46 Add loadavg for SunOS 2011-04-21 19:52:01 -07:00
Tim Baumann
6c7c4aeab6 Don't overwrite an user-specified repl.writer 2011-04-21 12:26:27 -07:00
Wade Simmons
d00739ce56 make it possible to do repl.start('', stream) 2011-04-21 12:20:50 -07:00
isaacs
0b3ecc05a6 Close #955 Change ^C handling in REPL
Press with text on the line: Cancels
Press on a bare line: Print a message
Press again on a bare line: Exit
2011-04-21 12:17:21 -07:00
Nebu
934c82b8b8 Partially documented the readline module. 2011-04-21 11:42:40 -07:00
isaacs
efca5f8e78 docs for chown/chmod 2011-04-20 16:04:46 -07:00
isaacs
3935adced0 GH-853 fs.lchown and fs.lchmod 2011-04-20 16:04:39 -07:00
isaacs
5cfac21852 GH-853 fs.fchmod and fs.fchown 2011-04-20 16:04:33 -07:00
isaacs
90802d628d Close #954 URL parsing/formatting corrections
1. Allow single-quotes in urls, but escape them.
2. Add comments about which RFCs we're following for guidance.
3. Handle any invalid character in the hostname portion.
4. lcase protocol and hostname portions, since they are
case-insensitive.
2011-04-20 15:44:34 -07:00
Fedor Indutny
c9b40da368 OpenSSL NPN in node.js
closes #926.
2011-04-19 11:32:26 -07:00
Ryan Dahl
9e6498d5fa Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-04-18 18:58:16 -07:00
Ryan Dahl
d3d35ec3ca add docs for console object 2011-04-18 16:52:53 -07:00
Ryan Dahl
cbdd92e184 Add community link on homepage 2011-04-16 13:55:03 -07:00
Ryan Dahl
da9b3340eb Add covhtml.js tool 2011-04-15 00:12:19 -07:00
Ryan Dahl
b4ff36a41b Add --cov code coverage option 2011-04-14 23:42:08 -07:00
Ryan Dahl
ed316ae350 Docs: some encodings contains multibyte chars.
fixes #888
2011-04-14 15:11:35 -07:00
koichik
74d94b0dd1 Fix docs - Move module's description to right position 2011-04-14 14:40:50 -07:00
Felix Geisendörfer
80711b0ff9 Feature: WriteStream#bytesWritten property
Implemented a new property for writable file streams that keeps track
of the bytes written (not queued). This helps when you are piping
another stream to a file, and would like to know how big the file is
without having to issue another stat call.

closes #930
2011-04-14 14:26:46 -07:00
Felix Geisendörfer
6c5b31bd80 Fix: Multiple pipes to the same stream were broken
When creating multiple .pipe()s to the same destination stream, the
first source to end would close the destination, breaking all remaining
pipes. This patch fixes the problem by keeping track of all open
pipes, so that we only call end on destinations that have no more
sources piping to them.

closes #929
2011-04-14 14:12:01 -07:00
Ryan Dahl
8417870f51 Don't emit error on ECONNRESET - just close
Fix #670
2011-04-14 10:42:57 -07:00
Ryan Dahl
61100788ad Now working on v0.4.7 2011-04-13 22:03:48 -07:00
Ryan Dahl
58002d56bc Bump to v0.4.6 2011-04-13 21:20:05 -07:00
Ryan Dahl
bb621f7c2e CryptoStream.write returns false when queue > 128kb
Previously the return value of write was dependent on if it was paused or
not which was causing a strange error demoed in the previous commit.

Fixes #892
2011-04-13 20:32:46 -07:00
Ryan Dahl
050bbf0bc4 TLS use RC4-SHA by default 2011-04-13 18:43:08 -07:00
Theo Schlossnagle
e2d9018535 SSL_OP_CRYPTOPRO_TLSEXT_BUG
fixes #873
2011-04-13 18:35:56 -07:00
Theo Schlossnagle
d6f5b8a2a6 allow setting of ciphers in credentials
fixes #873
2011-04-13 18:35:39 -07:00
Theo Schlossnagle
2a88dd3bc1 TLS: Add secureOptions flag
Also, secureOptions flag was added (and passed through) and allows
the context to have all supported SSL_OP_* set via createCredentials.
All SSL_OP_ flags (outside of ALL) have been added to constants.
2011-04-13 18:25:33 -07:00
Ryan Dahl
598792ba91 Merge branch 'v0.4'
Conflicts:
	src/platform_sunos.cc
	test/simple/test-os.js
2011-04-14 01:11:21 +00:00
Theo Schlossnagle
d0e84b0088 Pass secureProtocol through on tls.Server creation
The secureProtocol option to building the SSL context was not being properly
passed through in the credentials in the tls code. This is fixed.
2011-04-13 17:49:50 -07:00
Scott McWhirter
90348a616d Add os.cpus() and os.uptime() support for sunos 2011-04-13 17:42:54 -07:00
Ryan Dahl
2f98451561 Revert "Add os.cpus() and os.uptime() support for sunos"
Cherry-pick fail. Breaks linux. Will land again shortly.

This reverts commit e8cf98c841.
This reverts commit d953856d87.
This reverts commit 752bbd6b42.
2011-04-13 17:31:09 -07:00
Scott McWhirter
e8cf98c841 Add os.cpus() and os.uptime() support for sunos 2011-04-14 00:18:19 +00:00
Ryan Dahl
296ff04cdc Test to demonstrate #892 2011-04-13 12:49:13 -07:00
Brian White
ac1da4b407 Add remoteAddress and remotePort for client TCP connections
https://groups.google.com/d/topic/nodejs-dev/Asr87_YFSkg/discussion
2011-04-13 10:24:28 -07:00
koichik
9533e879f0 Fix Buffer.write() with UCS-2 should not be write partial char
closes #916.
2011-04-13 09:55:49 -07:00
Felix Geisendörfer
301f53c2aa Allow omission of end option for range reads
Problem: Sometimes it is useful to read a file from a certain position
to it's end. The current implementation was already perfectly capable
of this, but decided to throw an error when the user tried to omit
the end option. The only way to do this, was to pass {end: Infinity}.

Solution: Automatically assume {end: Infinity} when omitted, and remove
the previous exception thrown. Also updated the docs.

closes #801.
2011-04-13 09:46:28 -07:00
Ryan Dahl
af96447016 Modify text about buffer.write and partial chars
Fixes GH-913.
2011-04-13 01:27:00 -07:00
Nick Campbell
425b57bedc Lowercase protocol and hostname since casing isn't significant.
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
2011-04-13 01:10:47 -07:00
Jakub Lekstan
81cbd42cf5 Fixes the circular reference in vm modules.
Fixes the circular reference problem. Closes GH-822.
2011-04-12 15:51:57 -07:00
Ryan Dahl
9b3b37e498 Add docs about Buffer._charsWritten
Fixes GH-907.
2011-04-12 15:21:04 -07:00
Abe Fettig
83727a4c86 Fix bug where http response.readable was never set to false
Closes GH-867.
2011-04-12 14:55:18 -07:00
Felix Geisendörfer
bc8489580c Allow to remove all EventEmitter listeners at once
This patch adds support for calling EventEmitter#removeAllListeners
with no parameters in order to remove all listeners as once.

See discussion: https://groups.google.com/forum/#!topic/nodejs-dev/Mcyal1ThTHY

Closes GH-889.
2011-04-12 14:47:16 -07:00
Ryan Dahl
0f47f63746 Fix doc - no setBodyEnocoding anymore
Thanks Frederic. Closes GH-859.
2011-04-11 17:30:36 -07:00
koichik
682b66c0c1 Auto completion of built-in debugger suggests prefix match rather than partial match. 2011-04-11 17:28:28 -07:00
koichik
ca028f4b37 Fix docs: There were 2 descriptions of 'request' event. 2011-04-11 17:27:24 -07:00
Scott McWhirter
d953856d87 Remove extra kstat_open 2011-04-11 17:03:50 -07:00
Scott McWhirter
752bbd6b42 Add os.cpus() support for sunos 2011-04-11 17:03:50 -07:00
Ryan Dahl
d2298d225c Add documentation around module.exports and scope of global objects
Closes GH-852.
2011-04-11 17:01:25 -07:00
Ben Weaver
d63a551f86 Update how REPLServer uses contexts
* Always use `this.context` or `self.context`.
* Move `resetContext` to `REPLServer.createContext`.
* Add `REPLServer.resetContext`, memoize `context` here.
* Memoize `exports.repl` in `start`.

Closes GH-851.
2011-04-11 16:52:23 -07:00
Ryan Dahl
6b5a7033bb Merge branch 'v8-3.1' into v0.4 2011-04-11 16:08:10 -07:00
Ryan Dahl
0b1920b202 Upgrade v8 to 3.1.8.10 2011-04-11 16:07:54 -07:00
Ryan Dahl
9ccf0e527f Don't error on ENOTCONN from shutdown() 2011-04-11 15:33:24 -07:00
Ryan Dahl
bfa9db9dd6 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
	test/simple/test-buffer.js
2011-04-03 23:42:56 -07:00
Ryan Dahl
dcc2dd5e1f Add example to sha1 docs 2011-04-03 01:09:00 -07:00
George Stagas
3002c01f40 Changed script to vm and corrected order to match index 2011-04-02 02:35:44 -07:00
George Stagas
21e3b668cb Added favicon.ico 2011-04-02 02:35:23 -07:00
Ryan Dahl
ffb3ee6084 Remove reference to CommonJS in documentation 2011-04-01 22:18:23 -07:00
Ryan Dahl
61d0b5af87 Now working on version v0.4.6 2011-04-01 19:06:41 -07:00
Ryan Dahl
787a343b58 Bump version to v0.4.5 2011-04-01 18:00:43 -07:00
isaacs
7ee8c5676b Modify futimes test to allow ENOSYS 2011-04-01 17:41:42 -07:00
isaacs
6d85da185c Closes GH-721 Set default host header properly
However, this test is failing for some quite unrelated issue.
Getting some odd "socket hangup" crashes, and only the first request
ever makes it to the server.
2011-04-01 17:40:41 -07:00
isaacs
e1a72f0e2e Closes GH-535 Immediate pause/resume race condition
Calling resume() immediately after calling pause() would trigger
a race condition where it would try to read() from a file
descriptor that was already being read from, causing an EBADF
2011-04-01 17:40:19 -07:00
isaacs
4d64f36338 Closes GH-310 Format slashes properly 2011-04-01 17:40:19 -07:00
Ryan Dahl
a7254f3df9 Revert "Disable compression with OpenSSL."
This reverts commit 362785f704.
2011-04-01 12:38:42 -07:00
Ryan Dahl
f2dd8dd2b9 Fix test/message/undefined_reference_in_new_context
Broke after 75db199.
2011-04-01 12:36:58 -07:00
Ryan Dahl
362785f704 Disable compression with OpenSSL.
This improves memory and speed. Users may apply compression in "userland"
above the CryptoStream layer if they desire.
2011-04-01 09:49:25 -07:00
Ryan Dahl
4877279efa Add timers to globals section
Closes GH-864.
2011-04-01 09:19:08 -07:00
Ryan Dahl
5c35dff419 Don't load root certs for each SSL context 2011-03-31 23:40:19 -07:00
Ryan Dahl
ad861e1354 Merge branch 'v8-3.1' into v0.4 2011-03-31 10:07:59 -07:00
Ryan Dahl
6631983dd1 Upgrade V8 to 3.1.8.8 2011-03-31 10:07:48 -07:00
Ryan Dahl
ed74db01f3 process.stderr.write should return true 2011-03-30 15:53:07 -07:00
Ryan Dahl
6394ba28c8 Add test for circular refs in deepEquals
Closes GH-207.
2011-03-30 10:18:58 -07:00
Ryan Dahl
75db1995b6 Don't conflict with V8's Script class
Closes GH-203.
2011-03-30 10:06:25 -07:00
Jorge Chamorro Bieling
e35b2d9617 docs: fs.read/write() cb()s now receive buffer 2011-03-29 12:23:42 -07:00
Ryan Dahl
038306a6c3 Closes GH-843. Fix SlowBuffer.prototype.slice 2011-03-29 10:47:14 -07:00
Ryan Dahl
1768c72135 Add doc note about STARTTLS 2011-03-29 09:58:50 -07:00
Ryan Dahl
c0b461d9a1 Increase TLS pool size for perf increase 2011-03-28 17:37:14 -07:00
Ryan Dahl
98b56636c0 Revert "Alphabetize the table of contents for the API docs"
This reverts commit a66e45693c.
2011-03-28 17:36:50 -07:00
Ryan Dahl
e9a1dd7930 Typo in docs
Thanks to Anatoliy Chakkaev for pointing it out.

Closes GH-841.
2011-03-28 15:59:43 -07:00
Brian White
a66e45693c Alphabetize the table of contents for the API docs 2011-03-28 15:56:39 -07:00
Ryan Dahl
2f2c9d47fd Remove strange unicode output in docs 2011-03-28 15:55:45 -07:00
David Trejo
6788ad413f See the <doc> section are now links to <doc>
Closes GH-839.
2011-03-28 15:53:17 -07:00
Ryan Dahl
978a50c500 Remove exterraneous line 2011-03-28 15:46:36 -07:00
Jorge Chamorro Bieling
e7604b1ea7 Retain buffers in fs.read/write()
Closes GH-814.
Closes GH-827.
2011-03-28 15:28:55 -07:00
Mikeal Rogers
2a65d29625 Fix listener leak in stream.pipe() 2011-03-28 11:19:44 -07:00
Ryan Dahl
73ebea7a4d Now working on v0.4.5 2011-03-26 02:00:11 -07:00
Ryan Dahl
25122b986a Bump version to v0.4.4 2011-03-26 01:48:02 -07:00
Ryan Dahl
77044ed5fa Turn off strictaliasing on solaris 2011-03-26 01:42:08 -07:00
Ryan Dahl
cbcb7fb019 Merge branch 'v8-3.1' into v0.4 2011-03-25 12:02:51 -07:00
Ryan Dahl
c8ee19a618 Upgrade V8 to 3.1.8.5 2011-03-25 12:02:38 -07:00
Arnout Kazemier
53bec1c862 Added support for removing .once listeners
Closes GH-806.
2011-03-25 11:51:29 -07:00
Ryan Dahl
0fb44a2f93 Add jobs.nodejs.org link 2011-03-23 19:24:09 -07:00
Ryan Dahl
69c3e1961b Remove asciiSlice from docs 2011-03-23 15:02:11 -07:00
Zachary Scott
2b2736153d clean up whitespace in examples 2011-03-22 14:39:30 -07:00
Zachary Scott
67913a0232 writable stream api has destroySoon() for exiting after data queue has been drained 2011-03-22 14:38:59 -07:00
Trevor Burnham
5e78f57087 Doc fix for fs.write
Closes GH-808
Closes GH-811
2011-03-22 14:34:25 -07:00
Trevor Burnham
f0d0fcc4aa Clarifying that writeFile replaces existing file 2011-03-22 14:33:23 -07:00
Trevor Burnham
3ec391ba36 Correcting typo in docs: 'deprecated', not 'depreciated' 2011-03-22 14:33:23 -07:00
Ryan Dahl
4cc0a0878f Better ifdef for futimes 2011-03-22 20:19:42 +00:00
isaacs
7bff70268a signage warning, and add v8::namespace 2011-03-22 13:16:45 -07:00
Ryan Dahl
7a8c729830 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-22 13:12:07 -07:00
Ryan Dahl
8b33a1d8e4 Guard failed buffer constructions.
Thanks to Jeremy Barnes for pointing it out.
2011-03-22 13:10:53 -07:00
Ryan Dahl
f63120be78 Fix solaris build 2011-03-22 20:07:18 +00:00
Ryan Dahl
391f087981 Fix setsid in tty.open
Thanks to Leen Besselink for pointing this out.
Closes GH-815.
2011-03-22 12:02:35 -07:00
Ryan Dahl
24f9bf4180 expose https.Agent 2011-03-22 11:24:00 -07:00
Ryan Dahl
d7a86ff05e Fix GH-819. Drop out if connection destroyed before connect() 2011-03-21 14:48:26 -07:00
Ryan Dahl
7e28630f5e Fix GH-820. CryptoStream.end shouldn't throw if not writable
This matches the behavior of net.Socket
2011-03-21 14:36:49 -07:00
Ryan Dahl
4198de280f Add video to index.html 2011-03-20 18:07:29 -07:00
Ryan Dahl
99068639d9 add demo to home page 2011-03-19 20:28:31 -07:00
Ryan Dahl
c8f5bf88e1 Use feedburner instead of wordpress 2011-03-18 15:49:26 -07:00
Ryan Dahl
4ae5e085ff Now working on v0.4.4 2011-03-18 15:19:12 -07:00
Ryan Dahl
c095ce1a1b bump version to v0.4.3 2011-03-18 14:25:20 -07:00
Ryan Dahl
5b161b09a3 Merge branch 'v8-3.1' into v0.4 2011-03-18 14:24:37 -07:00
Ryan Dahl
53dc74e12f Upgrade V8 to 3.1.8.3 2011-03-18 14:22:52 -07:00
Ryan Dahl
aeed966fe0 Don't call GetMemoryUsage every 5 seconds 2011-03-18 11:39:44 -07:00
koichik
5ccdff48f3 Document 'ucs2' encoding for Buffer 2011-03-18 11:23:37 -07:00
Aaron Heckmann
a4dad95be3 EventEmitter#once only takes instanceof function 2011-03-18 11:18:40 -07:00
Brian White
52b9ede6db Add helpful error message for setuid/setgid when user/group id does not exist 2011-03-18 11:15:02 -07:00
Ryan Dahl
602a4637bf Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-18 11:11:43 -07:00
Dean McNamee
f67e8f243c Export more functions for initializing and starting node.
For greater flexibility in controlling node's initialization and startup, the
following new functions are exported.

  - node::Init()
  - node::SetupProcessObject()
  - node::Load()
  - node::EmitExit()

These are some of the major steps involved in node::Setup().  Exporting these
functions allows an embedding program to write a replacement for node::Start(),
and to have access to the node process object after it's created.
2011-03-18 11:11:25 -07:00
Dean McNamee
4a6f4511c8 Don't override explicit openssl paths with pkg-config results. 2011-03-18 11:11:10 -07:00
Ryan Dahl
66570c1964 Fix double free of parser on error in http.Agent.
Thanks to Stéphan Kochen for the fix and Maurice Fonk for reproducing the
bug.

Closes GH-784.
Closes GH-803.
2011-03-18 10:42:43 -07:00
Ryan Dahl
975d020286 Fix gcc version checking for aliasing features 2011-03-18 10:01:45 -07:00
Ryan Dahl
af923154e2 hello.txt should be stored in tmpdir 2011-03-18 09:14:15 -07:00
Ryan Dahl
f10150bc6a Don't use https for blog.nodejs.org 2011-03-17 13:49:32 -07:00
Ryan Dahl
c02db3229e Link to Node blog 2011-03-17 13:38:44 -07:00
Ryan Dahl
b368a3b438 Remove bad assert in GetInterfaceAddresses 2011-03-17 12:49:47 -07:00
Daniel Ennis
911cbd0cef Add support for file descriptor type detection.
setImplementationMethods checks the type of a socket and defines different
behavior based on the type, so auto detect it if type not implicitly
specified.
2011-03-17 10:35:47 -07:00
Ryan Dahl
19e53512b8 os.getNetworkInterfaces() 2011-03-16 16:34:12 -07:00
Ryan Dahl
6111c17a0e correct hexSlice end 2011-03-15 11:42:23 -07:00
isaacs
3c9fb3ec1a Fix invalid end handling for SlowBuffer#hexSlice 2011-03-15 11:39:11 -07:00
Ryan Dahl
4a9f2de956 Allow script to be read from stdin 2011-03-15 10:50:24 -07:00
Ryan Dahl
59f7232a30 Simplify startup function in src/node.js 2011-03-15 10:35:49 -07:00
Ryan Dahl
566c67b758 Working on v0.4.3-pre - oops 2011-03-15 02:53:59 +00:00
Ryan Dahl
61fdfcb137 Fix comment in node_provider.d 2011-03-15 02:50:52 +00:00
Ryan Dahl
ab190d38b7 Fix buffer.toString('hex') 2011-03-14 18:24:28 -07:00
Ryan Dahl
3c0dd8196a Fix test-process-uptime.js test 2011-03-14 17:50:24 -07:00
Ryan Dahl
247d880113 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-14 17:45:15 -07:00
Ryan Dahl
55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Ryan Dahl
36e75b7351 Fix HTTP agent disconnection problem
https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o

Closes GH-787.
2011-03-14 14:47:41 -07:00
Felix Geisendörfer
9d4c5a12f4 Crypto update should only accept strings / buffers
I have seen a lot of people trying to pass objects to crypto's update
functions, assuming that it would somehow serialize the object before
hashing.

In reality, the object was converted to '[object Object]' which was
then hashed, without any error message showing.

This patch modifies the DecodeBytes function (used exclusively by
crypto at this point) to complain when receiving anything but a
string or buffer.

Overall this should be a less-suprising, more robust behavior.
2011-03-14 13:16:31 -07:00
Ryan Dahl
2a05fe784d Do not use defineGetter in src/node.js for better crankshaft perf
See: https://groups.google.com/d/topic/nodejs/xJqpp1_s6is/discussion
2011-03-14 12:48:37 -07:00
Theo Schlossnagle
e3925b741c TLS: Finer locks on _cycle.
Data being sent out of order.
2011-03-14 12:05:25 -07:00
Ryan Dahl
2e40328c82 Extend OpenSSL expiration dates 2011-03-14 11:30:21 -07:00
koichik
414fa4abae Better type checks for fd in net.js 2011-03-11 16:34:12 -08:00
koichik
113b1e6e0c Fix GH-746 process.stdin.destroy() breaks http server 2011-03-11 16:33:07 -08:00
Theo Schlossnagle
2a61e1cd49 without this the server will not advertise support for client certs
Closes GH-774.
2011-03-11 16:14:39 -08:00
Ryan Dahl
12c02b378d Use pthread_kill for V8/Solaris sampling 2011-03-11 03:08:42 +00:00
Ryan Dahl
6802c90d1f Sample correct registers on Solaris
http://codereview.chromium.org/6676019/
2011-03-11 03:06:43 +00:00
Ryan Dahl
97853e07de Use default backend for __sun (event ports) 2011-03-11 03:04:25 +00:00
Ben Noordhuis
594642b31d Buffer::Length(Buffer*) should not invoke itself recursively.
Closes GH-759.
2011-03-10 14:06:01 -08:00
Ryan Dahl
9a8e843ca3 Document options for https.request
Closes GH-768.
2011-03-10 13:34:50 -08:00
Ryan Dahl
e14aa64591 Fix V8 runtime profiler for solaris 2011-03-10 12:48:49 -08:00
koichik
4e047d32b0 Document net.Socket() constructor 2011-03-10 10:57:47 -08:00
Ryan Dahl
62f06fb885 CryptoStream.prototype.destroySoon shouldn't die if not writable 2011-03-09 10:53:06 -08:00
Ryan Dahl
161f7aacf7 Add missing v8:: namespace prefix 2011-03-09 10:07:25 -08:00
Tom Hughes
2c185a9dfd Use higher resolution clock for uptime on Linux (if available). 2011-03-09 09:16:11 -08:00
Tom Hughes
74954ce7d8 Add string class that uses ExternalAsciiStringResource.
Change the natives to use this class instead of creating completely new
strings. Reduces memory usage by about 1 MB.
2011-03-08 13:56:41 -08:00
Tony Huang
502900c0bc add path.relative 2011-03-08 11:03:21 -08:00
Ryan Dahl
81d3de7e6d setMaxListeners should initialize _events 2011-03-07 13:16:00 -08:00
Tom Hughes
7a272d92e3 cmake: explicitly disable fdatasync when building for OSX.
This ensures that the check_function_exists() for fdatasync in the
libeio CMakeLists.txt is not run, since that fails on some versions of
OSX (http://public.kitware.com/Bug/view.php?id=10044).
2011-03-07 10:47:29 -08:00
Tom Hughes
cf78ce59b3 Add process.uptime(). 2011-03-07 10:45:25 -08:00
koichik
db6ea10948 Correct some links 2011-03-07 10:17:54 -08:00
koichik
07426ef29c Document allowHalfOpen for net.createServer() 2011-03-07 10:17:22 -08:00
Andreas Reich
5e91042fcb Don't decrease server connection counter again if destroy() is called more than once
Test: Anders Conbere <aconbere@gmail.com>
Fix: Andreas Reich <andreas@reich.name>

Closes GH-431.
Closes GH-502.
2011-03-04 15:45:12 -08:00
Ryan Dahl
39280e1b57 Bump version to v0.4.2 2011-03-02 22:10:26 -08:00
Ryan Dahl
fbe36a7ca9 Revert "Closes GH-85 Emit error rather than throwing."
This reverts commit f3d364122d.

Landed in master instead.
2011-03-02 22:10:16 -08:00
isaacs
11a06fe1e4 Closes GH-85 Emit error rather than throwing.
Since "error" events will throw when unhandled anyhow, it makes no sense
to throw from an EventEmitter's method, especially for such a minor
misdemeanor as attempting to write to a non-writable stream.
2011-03-02 22:09:39 -08:00
Ryan Dahl
ca8be39b9e Disable test-http-agent2.js for the moment
Still broken.
2011-03-02 21:21:29 -08:00
Bert Belder
b3884c574b Autodetect no-strict-aliasing, propagate toolchain option to SCons
BUG=v8:884
2011-03-02 21:06:17 -08:00
Ryan Dahl
14475c77a6 Upgrade V8 to 3.1.8 2011-03-02 21:04:37 -08:00
Tom Hughes
cf7b680db9 newline should also be treated as "enter" key. 2011-03-02 21:00:06 -08:00
Ben Noordhuis
1d5ff15a46 fs.utimes() and fs.futimes() support. 2011-03-02 20:35:45 -08:00
koichik
452df69964 Correct net.createServer() API docs 2011-03-02 12:10:36 -08:00
koichik
4e7c37b87c Fix fs.WriteStream.end(data, [encoding]) throws TypeError 2011-03-01 10:49:20 -08:00
Ryan Dahl
4ab5476e89 SIGUSR1 should break the VM without delay 2011-03-01 09:59:17 -08:00
Ryan Dahl
5f95d9a75d Remove -Werror from V8 2011-02-28 12:58:15 -08:00
isaacs
bc8e9b340d Closes GH-734 Do the setuid() after chdir() 2011-02-28 12:37:59 -08:00
Bert Belder
4a34692903 Autodetect no-strict-aliasing, propagate toolchain option to SCons
BUG=v8:884
2011-02-28 11:30:07 -08:00
Ryan Dahl
6442cbef20 Upgrade V8 to 3.1.7 2011-02-28 11:29:33 -08:00
Ryan Dahl
a14bb04c05 tty.setWindowSize should use the correct function
Thanks to Matthew Woolman
2011-02-28 11:19:10 -08:00
Felix Geisendörfer
0304f1fc22 Expose errno with a string for dns/cares
This is to mirror the behavior introduced in
aa95e5708f.

Closes GH-727.
2011-02-28 09:54:16 -08:00
isaacs
d664bf376d Closes GH-711 URL parse more safely
This does 3 things:

1. Delimiters and "unwise" characters are never included in the
   hostname or path.
2. url.format will sanitize string URLs that are passed to it.
3. The parsed url's 'href' member will be the sanitized url, which may
   not match the argument to url.parse.
2011-02-27 17:17:40 -08:00
isaacs
3599c71dae Closes GH-690 node_modules folders should be highest priority 2011-02-27 17:14:16 -08:00
isaacs
a48f73d0d3 Closes GH-232 Make the repl's global the right thing 2011-02-27 17:13:52 -08:00
isaacs
f3d364122d Closes GH-85 Emit error rather than throwing.
Since "error" events will throw when unhandled anyhow, it makes no sense
to throw from an EventEmitter's method, especially for such a minor
misdemeanor as attempting to write to a non-writable stream.
2011-02-27 17:08:14 -08:00
isaacs
2cfe7b847d Closes GH-184 Clear require cache on repl .clear 2011-02-27 17:07:08 -08:00
koichik
0a51a6d3ac Fix process.stdout.end() throws ENOTSOCK error. 2011-02-27 13:06:08 -08:00
Ryan Dahl
8838e14ac0 Merge branch 'v0.4' 2011-02-25 16:48:48 -08:00
Ryan Dahl
f918e57f8b Support dtrace for debug build 2011-02-25 16:48:19 -08:00
Russell Haering
7276ff9822 http: fix missing 'drain' events 2011-02-24 17:39:59 -08:00
Ryan Dahl
ea9f5b110a Add 'close' and 'aborted' events to Agent responses
Closes GH-722.
2011-02-24 17:16:13 -08:00
Ryan Dahl
360885a7e9 deprecate http.cat 2011-02-24 17:06:46 -08:00
Ryan Dahl
839fb8e19b typos 2011-02-24 16:36:43 -08:00
Nathan Rajlich
a9a252fda9 Read up the prototype of the 'env' object.
Closes GH-713.
2011-02-24 16:36:23 -08:00
Aria Stewart
8a50f23fd3 Add support for specifying the libdir
Some OSes use "lib64" rather than "lib", and this lets them override
in waf to accomplish this.

Closes GH-712.
2011-02-24 16:28:45 -08:00
Aria Stewart
fd713e1dc7 libeio and http_parser build with PIC code
Fix building as a shared library

Closes GH-708.
2011-02-24 16:19:43 -08:00
Felix Geisendörfer
66601f13d9 Do not cache modules that throw exceptions
If a module throws an exception on load, it should not be cached.
This patch shows the problem in a test case and also fixes it.

See: https://groups.google.com/forum/#!topic/nodejs-dev/1cIrvJcADbY

Closes GH-707
Closes GH-710
2011-02-24 16:14:04 -08:00
Ryan Dahl
a2f498a5ef Revert "Add extra debug print statement to tls.js"
This reverts commit 340291c085.

sometimes circular. would break node_g tests.
2011-02-24 15:59:40 -08:00
Ryan Dahl
1f50d711b2 Fix memleak in vm.runInNewContext
Closes GH-704.
2011-02-24 15:46:55 -08:00
Bert Belder
df15472d34 Autodetect no-strict-aliasing, propagate toolchain option to SCons
BUG=v8:884
2011-02-24 13:47:14 -08:00
Ryan Dahl
e33e7d1a37 Upgrade V8 to 3.1.6 2011-02-24 13:14:59 -08:00
Felix Geisendörfer
2680522d3a Fix ReadStream bufferSize docs
The default is 64kb buffer, not 4kb.

Closes GH-702.
2011-02-24 12:46:17 -08:00
Felix Geisendörfer
06ac129903 Document existence of fd property for ReadStream
Closes GH-194.
Closes GH-701.
2011-02-24 12:44:21 -08:00
Felix Geisendörfer
f423ec90fc In addition to 'aborted' emit 'close' from incoming requests
Closes GH-160.
2011-02-24 12:41:51 -08:00
Ryan Dahl
5287703cce Pragma HTTP header comma separation
Closes GH-715, GH-716.
2011-02-24 12:02:22 -08:00
Ryan Dahl
b309192ffd Use default backend for __sun (event ports) 2011-02-23 17:04:21 -08:00
Ryan Dahl
45adc907c9 ry/node -> joyent/node 2011-02-23 16:38:34 -08:00
Ryan Dahl
340291c085 Add extra debug print statement to tls.js 2011-02-23 16:38:30 -08:00
cloudhead
a91b140963 fix process.on edge case with signal event
When adding a listener for a signal event, removing it, and
adding it back again, it triggers a condition with an
undefined variable.
2011-02-23 12:57:05 -08:00
Ryan Dahl
0248c87ec7 improve hello-world example on website 2011-02-23 12:56:50 -08:00
Ryan Dahl
ab144f4843 Add TODO item 2011-02-23 04:43:13 -08:00
Ryan Dahl
47f5fd01e1 Add example to TTY documentation 2011-02-20 13:53:40 -08:00
Ryan Dahl
df215a67d4 Document path.existsSync()
Closes GH-677.
2011-02-20 13:11:55 -08:00
Ryan Dahl
4ed6688010 Add V8 options to man page 2011-02-19 20:56:20 -08:00
Ryan Dahl
7dad30afe9 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-02-19 19:26:56 -08:00
isaacs
0aa1a8a005 Closes GH-695 Add 'hex' encoding to Buffer 2011-02-19 19:24:23 -08:00
Ryan Dahl
e5a472229b Now working on v0.4.2 2011-02-19 19:06:10 -08:00
Ryan Dahl
e8aef84191 Bump version to v0.4.1 2011-02-19 18:45:34 -08:00
Ryan Dahl
c2a62951f6 TLS sockets should not be writable after 'end'
Closes GH-694.
2011-02-19 18:25:15 -08:00
Ryan Dahl
c72ae27be1 test-tls-securepair-server: don't shutdown stdout 2011-02-19 16:56:56 -08:00
isaacs
8b9dbdad27 Closes GH-687 Don't read fs read stream if not open 2011-02-19 16:38:21 -08:00
Brian White
1efac74958 Fix os.cpus() on cygwin 2011-02-19 15:14:07 -08:00
Ryan Dahl
98515742b7 Merge branch 'v0.4' 2011-02-18 14:01:34 -08:00
Ryan Dahl
1fce3f0ef8 Add startup memory script to benchmarks 2011-02-18 14:01:04 -08:00
Ryan Dahl
ebfc90b505 Remove test-http-eof-before-eom - wasn't testing anything important 2011-02-18 11:30:52 -08:00
Ryan Dahl
26e580bbc4 Use console.error in test-timers
In attempt to understand buildbot failures.
2011-02-18 11:20:45 -08:00
Tom Hughes
3313ff1d1b cmake: dtrace support. 2011-02-18 10:45:25 -08:00
Tom Hughes
9d49c93cb5 cmake: Add gdbjit and oprofile options. 2011-02-18 10:45:17 -08:00
Tom Hughes
de2686c3e1 cmake: cleanup. 2011-02-18 10:45:04 -08:00
Tom Hughes
8bedde464f cmake: Fix mac snow leopard build. 2011-02-18 10:44:58 -08:00
Tom Hughes
6a594fed96 cmake: set pre and post memcheck commands.
We need to clear out and re-create the tmp directory when running
valgrind just like for the normal test run.
2011-02-18 10:44:36 -08:00
isaacs
f8defa3e09 package.json main as indexed subdir
Closes GH-686.
2011-02-18 10:43:06 -08:00
Ryan Dahl
aac5cbe025 HTTP Agent sockets should not reconnect on error
Closes GH-684.
2011-02-18 10:40:09 -08:00
Ryan Dahl
9b0c7618c5 HTTP Agent should not die on evil server
Closes GH-680.
2011-02-18 00:42:07 -08:00
Matt Ranney
ab969bfaf8 Add failing test for broken HTTP responses with extra bytes.
For GH-680.
2011-02-18 00:08:05 -08:00
Ryan Dahl
15a6aa7500 Add more broken tests 2011-02-17 21:06:16 -08:00
Ryan Dahl
7e4f755073 Install node.d in the correct place 2011-02-17 11:07:19 -08:00
Bert Belder
25ce5016f4 Fix test runner bug on windows 2011-02-17 10:52:28 -08:00
Bert Belder
874321298b Make libev work on MinGW again 2011-02-17 10:47:04 -08:00
Bert Belder
a5e67ad9e7 Autodetect no-strict-aliasing, propagate toolchain option to SCons
BUG=v8:884
2011-02-17 10:46:38 -08:00
Ryan Dahl
7f78e5857f Move test-tls-throttle to pummel 2011-02-16 18:12:08 -08:00
Ryan Dahl
19b4c27ebf TLS: Make _cycle reentrant. 2011-02-16 18:10:53 -08:00
Ryan Dahl
89bfa419a5 Make test-http-curl-chunk-problem more portable
Use 'openssl sha1' instead of 'shasum'
2011-02-16 13:17:19 -08:00
Ryan Dahl
e0e52f930e Remove artificial timeout from test-https-large-response 2011-02-16 12:22:48 -08:00
Ryan Dahl
470ebe249f Upgrade libev to 4.4 2011-02-16 12:07:58 -08:00
Bert Belder
b1664daeb9 V8 Cygwin support 2011-02-16 12:04:44 -08:00
Ryan Dahl
550f73ae3e Upgrade V8 to 3.1.5 2011-02-16 10:38:49 -08:00
Bert Belder
3ef6433255 MinGW: OpenSSL support 2011-02-15 20:15:46 -08:00
Ryan Dahl
c365f56061 https was missing 'end' event sometimes
Closes GH-671.
2011-02-15 17:13:53 -08:00
Tj Holowaychuk
42a369620f Fixed null signal preservation
Closes GH-674.
2011-02-15 16:35:50 -08:00
Ryan Dahl
60ad3aa917 Disable test-tls-large-push, taking too long 2011-02-15 14:06:23 -08:00
Felix Geisendörfer
e56ee67e13 Refactor fs.open parameter handling
Improvements:
* Removes an unnecessary variable
* Avoids having two variables with the same name
* Avoids re-declaring an existing parameter
* Removes an unnecessary ternary operator
* Avoid an inline short-circuit expression for greater clarity.
2011-02-15 13:57:54 -08:00
Felix Geisendörfer
aabdd5d045 Correct fs.open API documentation
The fact that the mode parameter is optional for fs.open and
fs.openSync was not documented.
2011-02-15 13:57:41 -08:00
Felix Geisendörfer
29b0dc4ec8 Fix: fs.open callback did not fire
Problem: Omitting the mode parameter causes the provided callback
parameter to never fire. This was originally fixed in 6078c37b and
later broken in 5f2e9093.

Solution: Overwriting the value of a parameter also overwrites the
reference in the arguments object. This patch works arround this
fact by not touching the mode parameter until a reference to the
callback has been established.
2011-02-15 13:50:59 -08:00
Bert Belder
a293f90db4 Improve V8 support for Cygwin
Should re-enable crankshaft; can build w/ snapshot again.
2011-02-15 12:29:59 -08:00
Ryan Dahl
77ae87d367 default to port 80 for http.request 2011-02-15 12:08:26 -08:00
Ryan Dahl
0474ce6790 Revert "buffer.toString() shouldn't include null values"
This reverts commit 909a5b39d2.

Will fix inside V8's String::New instead.
2011-02-15 12:07:43 -08:00
Ryan Dahl
ad7c2a8938 escape chars on man page 2011-02-14 18:37:43 -08:00
Ryan Dahl
daeb5c9e8f fix doc
thanks Toshihiro
2011-02-14 18:35:36 -08:00
Ryan Dahl
bd094103d7 Add script for running V8 benchmarks 2011-02-14 17:26:54 -08:00
Richard Rodger
b11d78b386 Fix for DNS fail in HTTP request
Closes GH-653.
2011-02-14 16:36:23 -08:00
Ryan Dahl
909a5b39d2 buffer.toString() shouldn't include null values 2011-02-14 14:27:02 -08:00
Ryan Dahl
f11e730444 Working on v0.5.0 2011-02-14 14:27:00 -08:00
isaacs
f07041e6cd Make the repl respect node_modules folders.
This is important so that in the future, this will work:

    $ cd ~/dev/js/some-project
    $ npm install redis
    $ node
    > require.resolve('redis')
    '/Users/isaacs/dev/js/some-project/node_modules/redis/index.js'
2011-02-14 13:43:22 -08:00
Tj Holowaychuk
fe838611f6 Fixed field merging with progressive fields on writeHead() 2011-02-14 13:40:31 -08:00
Ryan Dahl
c6712ced20 Add newline to platform-cygwin.cc 2011-02-14 09:36:28 -08:00
Ryan Dahl
5ceefec820 Add http client to v0.4 announcement 2011-02-14 09:36:08 -08:00
Ryan Dahl
485ce139fd Now working on v0.4.1 2011-02-14 09:36:02 -08:00
Ryan Dahl
eb155ea6f6 Bump version to v0.4.0 2011-02-10 02:40:11 -08:00
Tim Caswell
b09c5889be Add support for mutable/implicit headers for http.
This works for both ServerResponse and ClientRequest.
Adds three new methods as a couple properties to to OutgoingMessage objects.
Tests by Charlie Robbins.

Change-Id: Ib6f3829798e8f11dd2b6136e61df254f1564807e
2011-02-10 02:31:41 -08:00
Theo Schlossnagle
01a864a29d TLS: CRL support
Needs more tests.
2011-02-10 00:49:15 -08:00
Mikeal Rogers
634e7236f7 Add 'pipe' event 2011-02-09 23:04:35 -08:00
Bert Belder
583f2e5999 Follow-up fix for v8 cygwin build 2011-02-09 21:55:59 -08:00
Bert Belder
fd013d17a2 V8 cygwin support 2011-02-09 19:13:31 -08:00
Ryan Dahl
67e352e4b1 fix verifier.verify() docs
Thanks Sitelier. Closes GH-651.
2011-02-09 19:07:19 -08:00
Ryan Dahl
e9257b859d New DTrace probes from CA team 2011-02-09 18:50:26 -08:00
Ryan Dahl
778fb859c6 New keys, agent1-cert.pem was expired 2011-02-09 18:30:47 -08:00
Ryan Dahl
8cd07bb273 TLS: handle cert chains 2011-02-09 17:51:05 -08:00
Ryan Dahl
43bc1d7ec8 Edit module docs 2011-02-09 17:48:22 -08:00
isaacs
ff39d413a3 Document module loading 2011-02-09 17:34:21 -08:00
Bert Belder
35e32225d1 Workaround for V8 bug 884
See http://code.google.com/p/v8/issues/detail?id=884
2011-02-09 14:53:15 -08:00
isaacs
81b4d45354 Better assert in the node_modules tests 2011-02-09 14:35:08 -08:00
isaacs
46513483cd node_modules module lookup, +docs and test. 2011-02-09 14:24:22 -08:00
Ryan Dahl
dafd6d9137 TLS: Don't give up if you can't write 0 bytes 2011-02-09 13:27:23 -08:00
Ryan Dahl
a0702b54d1 Upgrade V8 to 3.1.2 2011-02-09 10:24:26 -08:00
Ryan Dahl
a48a075535 better debug messages in net and tls 2011-02-09 10:23:26 -08:00
Ryan Dahl
56ab929c55 Remove unused parameter from crypto::Handle*Error 2011-02-09 01:30:31 -08:00
Bert Belder
8d70294c31 Fix fs.realpathSync on windows 2011-02-08 21:24:30 -08:00
Bert Belder
36846f9b6b Windows: child process fixes 2011-02-08 21:21:39 -08:00
Ryan Dahl
519dc2c114 tls: split bio errors from ssl errors 2011-02-08 21:15:55 -08:00
isaacs
9bed5dcb2c Support caching for realpath, use in module load
This adds support for a cache object to be passed to the
fs.realpath and fs.realpathSync functions.  The Module loader keeps an
object around which caches the resulting realpaths that it looks up in
the process of loading modules.

This means that (at least as a result of loading modules) the same files
and folders are never lstat()ed more than once.  To reset the cache, set
require("module")._realpathCache to an empty object.  To disable the
caching behavior, set it to null.
2011-02-08 18:02:59 -08:00
Ryan Dahl
9de5043b50 tls: only emit data after 'secure' event 2011-02-08 17:29:33 -08:00
Bert Belder
38d8cd60ea Don't make unnecessary getcwd calls from path.resolve 2011-02-08 14:30:24 -08:00
Ryan Dahl
6b50a9f5f4 (won't) fix test-next-tick-ordering 2011-02-07 21:15:58 -08:00
Ryan Dahl
448e0f4394 tls fixes 2011-02-07 21:11:43 -08:00
Bert Belder
61af4207da Fix dns on windows 2011-02-07 15:30:17 -08:00
Ryan Dahl
3ec030535c stderr should be EventEmitter even if it doesn't emit anything 2011-02-07 15:14:21 -08:00
isaacs
2e6a263e29 Closes GH-609 Support array-ish args to Buffer ctor
Any array-ish thing (whether a Buffer, an Array, or just an object with
a numeric "length") is interpreted as a list of bytes.
2011-02-07 14:13:18 -08:00
isaacs
5f2e90934e Support octal strings for modes
This allows the various fs utilities and process.umask to be used in
ECMAScript 5 Strict Mode, where the octal literal format is verboten,
without requiring users to litter their code with a bunch of parseInt
calls.
2011-02-07 14:05:06 -08:00
Ryan Dahl
57fa247f53 Closes GH-645. Document tty.getWindowSize 2011-02-07 13:46:15 -08:00
Konstantin Käfer
9e101f2b01 UCS-2 support
Closes GH-644.
2011-02-07 13:35:06 -08:00
Ryan Dahl
bf8f4aa966 Impove fs.WatchFile doc 2011-02-07 13:11:03 -08:00
Russell Haering
e6ede31554 http: fix buffer writes to outgoing messages 2011-02-07 12:59:25 -08:00
Daniel Gröber
71a8a3b78c cmake fixes
Closes GH-640.
2011-02-07 12:52:20 -08:00
Ryan Dahl
a98d0717e8 Remove incorrect doc about node_modules 2011-02-07 12:50:05 -08:00
isaacs
da2f4b2dc4 support for package.json
This adds basic support for situations where there is a package.json
with a "main" field.  That "main" module is used as the code that is
loaded when the package folder is required.
2011-02-07 11:00:22 -08:00
koichik
45c0faf399 corrected small typos 2011-02-07 10:52:19 -08:00
Mikeal Rogers
2b03ba5917 http: agent takes options instead of host, port pair 2011-02-05 02:35:44 -08:00
Ryan Dahl
0da96cca59 typo 2011-02-04 23:05:25 -08:00
Ryan Dahl
30f24bb2df Now working on v0.4.0 2011-02-04 19:54:18 -08:00
Ryan Dahl
9493b7563b Bump version to v0.3.8 2011-02-04 19:35:43 -08:00
Ryan Dahl
4733d0b1f0 http: handle aborts 2011-02-04 18:07:00 -08:00
Ryan Dahl
c783aefb0f http-parser: Error on EOF errors 2011-02-04 18:07:00 -08:00
Ryan Dahl
e42c74e141 Upgrade http-parser 2011-02-04 18:03:26 -08:00
Bert Belder
f99fc29e62 Fix mingw build 2011-02-04 14:49:50 -08:00
Bert Belder
6329633a3e Windows: open files in binary mode 2011-02-04 14:43:41 -08:00
Ryan Dahl
aa95e5708f Expose errno with a string. 2011-02-04 14:41:51 -08:00
Ryan Dahl
1a7830a92a Fix debug flag in timers.js 2011-02-04 09:00:21 -08:00
Ryan Dahl
c10caca34c Style 2011-02-03 16:58:05 -08:00
isaacs
2f1f22ab26 module: define functions only once. 2011-02-03 14:23:28 -08:00
Bert Belder
8ee9c53c77 Fix problem with libev/select on windows.
Patch by Marc Lehmann.
This fix should be included in the next libev release.
2011-02-03 14:05:51 -08:00
Bert Belder
d8d627e2d4 Revert "Workaround for libev handle caching bug on windows"
This reverts commit 25d0e38048.
2011-02-03 14:05:40 -08:00
Ryan Dahl
bc23ec8d05 Add process.stderr stream 2011-02-03 14:03:44 -08:00
Ryan Dahl
f6e5b8986f Clean up 2011-02-03 12:28:20 -08:00
Ryan Dahl
97f7c06451 TLS: fix throttling
Re-enable test-https-large-response.js

Closes GH-614.
2011-02-03 12:20:19 -08:00
Ryan Dahl
3e58696c07 TLS: Simplify error handling 2011-02-02 15:39:03 -08:00
Ryan Dahl
41b4ec7952 TLS: flush buffer before destroy
Also disable test-https-large-response.js. Covered by
test/simple/test-tls-throttle.js
2011-02-02 15:34:21 -08:00
Ryan Dahl
e6f14d6df5 (suck, blow) -> (pull, push) 2011-02-02 14:51:53 -08:00
Ryan Dahl
ee092f62ca Upgrade V8 to 3.1.1 2011-02-02 11:44:25 -08:00
isaacs
f86ec1366f Closes GH-619 Make require.main be the main module 2011-02-02 11:18:34 -08:00
Ryan Dahl
807fca6803 TLS: Set ssl.receivedShutdown after each read
Closes GH-613.
2011-02-01 14:40:17 -08:00
Ryan Dahl
2ff593ad23 TLS: better error reporting at binding layer
Closes GH-612.
2011-02-01 14:14:50 -08:00
Jorge Chamorro Bieling
ff7fc093a1 Longer nexttick ordering test
Closes GH-604.
2011-02-01 10:23:03 -08:00
Joe Walnes
df6e497793 dgram: setMulticastTTL, setMulticastLoopback and addMembership.
These are options needed for real-world multicasting.

Implementation notes:
- POSIX only.
- IPv4 only (IPv6 multicast is a tricky beast).
- Didn't update tests, because it can't effectively be demonstrated on
  localhost only.
2011-02-01 10:16:48 -08:00
Ryan Dahl
3e5b568504 TLS: Add _pendingBytes() 2011-01-31 17:29:11 -08:00
Ryan Dahl
33e8e3d799 Add simpler failing tls throttle test 2011-01-31 16:38:05 -08:00
Ryan Dahl
45b30a879b tls: superficial clean up 2011-01-31 16:37:29 -08:00
Bert Belder
9526fef626 Workaround for V8 bug 884
See http://code.google.com/p/v8/issues/detail?id=884
2011-01-31 13:26:46 -08:00
Ryan Dahl
0634e3a8bc Upgrade V8 to 3.1.0 2011-01-31 13:19:50 -08:00
Ryan Dahl
c501785112 Make availability of UDP bindings more apparent 2011-01-31 11:20:05 -08:00
Ryan Dahl
9f3a20c76d net: Add hook for when writeQueue changes 2011-01-31 11:01:59 -08:00
Ryan Dahl
ef123600ce Add artificial timeout to broken test-https-large-response 2011-01-31 10:44:08 -08:00
Ryan Dahl
6ede26cb9c Add socket.bufferSize 2011-01-31 10:41:52 -08:00
Tim Caswell
845df3cd2e Slightly throttle https large body test 2011-01-28 14:35:20 -08:00
Ryan Dahl
fda70b8b90 getaddrinfo exists on windows 2011-01-28 13:40:41 -08:00
Ryan Dahl
43d818a19c Fix version 2011-01-28 13:09:01 -08:00
Ryan Dahl
192d2e0803 REPL: disable colors in windows for now 2011-01-28 12:58:19 -08:00
Bert Belder
88947dc4f0 Workaround for V8 bug 884
See http://code.google.com/p/v8/issues/detail?id=884
2011-01-28 12:53:09 -08:00
Ryan Dahl
7eaa956bae Upgrade V8 to 3.0.12 2011-01-28 01:57:00 -08:00
Ryan Dahl
97375c475e Now working on v0.3.8 2011-01-27 21:11:56 -08:00
Ryan Dahl
d8579c6afd Bump version to v0.3.7 2011-01-27 20:07:54 -08:00
Ryan Dahl
286389202f Fix pummel/text-exec 2011-01-27 20:07:53 -08:00
Ryan Dahl
b6c66f735b Revert "Use html5 spec stylesheet for docs"
This reverts commit 6dbf49110b.
2011-01-27 19:55:52 -08:00
Ryan Dahl
eb565e1ce2 Simplify website 2011-01-27 19:52:56 -08:00
Ryan Dahl
895968d8f8 Add test-https-large-response.js 2011-01-27 19:27:25 -08:00
Ryan Dahl
df5d5d6342 Fix option parsing in tls.connect() 2011-01-27 19:25:08 -08:00
Ryan Dahl
cb06abe1e5 Helpful error when child_process.exec hit maxBuffer 2011-01-27 17:45:17 -08:00
Ryan Dahl
1f041fe73e debugger: prevent crash when backtrace doesn't come back 2011-01-27 17:44:42 -08:00
Ryan Dahl
fbb74784b5 Remove more process.assert 2011-01-27 17:02:25 -08:00
Ryan Dahl
bfb6a67d60 Another fix for process.assert 2011-01-27 16:59:28 -08:00
Ryan Dahl
f71e4d8b43 Fix process.assert problem
Introduced in f9f0e5c75c
2011-01-27 16:55:54 -08:00
Ryan Dahl
f9f0e5c75c Pre-process out assert() 2011-01-27 16:38:49 -08:00
Ryan Dahl
6e53cf8b3f Fix links 2011-01-27 16:24:02 -08:00
David Trejo
3a05a6eaca newcomer resources in README
Closes GH-579.
2011-01-27 16:20:31 -08:00
Greg Hughes
1a5e513084 Fix style issues with ext_key_usage patch
Closes GH-586.
2011-01-27 16:16:22 -08:00
Ryan Dahl
4ea6916974 Correct process.kill doc
Thanks Kevin. Closes GH-518.
2011-01-27 14:37:45 -08:00
Ryan Dahl
97e13748fa Typos
Closes GH-557.
Closes GH-539.
2011-01-27 14:28:47 -08:00
Ryan Dahl
8f23583d10 A few spelling fixes.
Thanks Bjarki. Closes GH-561.
2011-01-27 14:24:10 -08:00
Ryan Dahl
3d4a0211b6 Fix arg order of fs.linkSync in docs
Thanks Pierre. Closes GH-571.
2011-01-27 14:22:17 -08:00
Greg Hughes
6c32e155d3 Add ext_key_usage to getPeerCertificate 2011-01-27 14:06:40 -08:00
isaacs
6cdeb3b3fd A module ID with a trailing slash must be a dir.
require('./foo/') should not try to load './foo.js'.  It should only
look for ./foo/index.js

Closes GH-588
2011-01-27 14:02:43 -08:00
Ali Farhadi
36ef5643c3 Fixing bug in http request default encoding. 2011-01-26 12:18:25 -08:00
Ali Farhadi
c70dd70301 Adding callback parameter to Socket's setTimeout method. 2011-01-26 12:13:03 -08:00
Ryan Dahl
129217a4e9 Increase timeout on test-repl to 5 seconds
Hopefully wont get failures on buildbot slaves.
2011-01-25 17:35:08 -08:00
Ali Farhadi
910a859b9c Adding test for many keep-alive connections 2011-01-25 17:20:25 -08:00
Ryan Dahl
5ad00f82c6 debugger: Don't crash when evaling buffer 2011-01-25 15:50:12 -08:00
Ryan Dahl
72bef516dc Revert "Preprocess out assert()"
This reverts commit 8bd7e4fad8.
2011-01-25 15:26:19 -08:00
Carter Allen
5ad93ab573 Fix tests when spaces are in path 2011-01-25 12:56:35 -08:00
Ryan Dahl
8bd7e4fad8 Preprocess out assert() 2011-01-25 12:53:44 -08:00
Ryan Dahl
39ff40e5a2 Use old http.Client
This is meant as a path for upgrading to the new http.request() API.
http.Client will be disappearing in the future.
2011-01-25 12:13:20 -08:00
Ryan Dahl
72dd8778b9 Fix undefined_reference_in_new_context 2011-01-24 22:40:06 -08:00
Daniel Ennis
52f93185c7 Adding support for require-like initialization of node,
so `node foo`
will load one of:
./foo.js
./foo.node
./foo/index.js
./foo/index.node

Test cases added.
Ensured no conflict with native names.
2011-01-24 21:33:30 -08:00
Ryan Dahl
4c5e570706 Upgrade V8 to 3.0.10 2011-01-24 20:55:18 -08:00
Bert Belder
07f3274ac4 Readline: fixes, more key bindings
- Made backward/forward more convenient
- More key bindings that windows users are used to
- Fix delete-word-right
- Duplicate code cleanup
2011-01-24 20:43:50 -08:00
isaacs
430a7f1bed Support pastes and meta-backspace 2011-01-24 20:42:52 -08:00
Bert Belder
f9fea12555 Fix windows build 2011-01-24 20:37:15 -08:00
Ryan Dahl
068b733583 Land Cantrill's DTrace patch
only works on solaris
2011-01-24 18:59:06 -08:00
Felix Geisendörfer
91cc2d8c4b Restructure src/node.js startup code
This patch introduces a logical structure and sequence for the
bootstrap code found src/node.js.
2011-01-24 14:52:25 -08:00
Ryan Dahl
cc5e9130bb fs.open should set FD_CLOEXEC 2011-01-24 11:57:21 -08:00
Ryan Dahl
9e976abad9 lint 2011-01-24 10:55:30 -08:00
Bert Belder
f263b29141 Windows: better net support 2011-01-24 10:35:41 -08:00
Bert Belder
25d0e38048 Workaround for libev handle caching bug on windows
The windows socket api uses handles, not fds. Libev caches the handle
associated with an fd, and uses this handle when updating the (also cached)
handle set that goes into select(). When an fd is closed and subsequently
re-used before the event loop returns to libev, libev fails to detect
properly that the handle changed. And even if it does, the cached handle of
the closed socket is overwritten by the new handle, so by the time libev
tries to update the select fdset it has forgotten which handle to remove
from it. This is solved by a simple hook ev_fd_closed that makes it clear
its caches before the fd is re-used.
2011-01-24 10:34:18 -08:00
Ryan Dahl
555184663a windows compat: undefined_reference_in_new_context test 2011-01-23 15:32:07 -08:00
Ali Farhadi
d81afcb3a6 Fixing bug in http request's end method. 2011-01-23 15:22:42 -08:00
Felix Geisendörfer
5a49f96505 Move commonjs module system into lib/module.js
This de-couples NativeModule from the module system and completes the
main objective of this refactoring.
2011-01-23 14:53:17 -08:00
Mikeal Rogers
8d37f80f4b Expose agent in http and https client. 2011-01-23 12:02:43 -08:00
Ryan Dahl
7892918353 Now working on v0.3.7 2011-01-21 18:26:05 -08:00
Ryan Dahl
bb3e71466e Bump version to v0.3.6 2011-01-21 18:18:37 -08:00
Ryan Dahl
6703a7f1e0 Add https docs to toc 2011-01-21 18:18:32 -08:00
Ryan Dahl
76afea90cf Fix test-http-exceptions
Agent: Each time an http req is sent to a socket, _cycle to try to dispatch
another. Problem became apparent in 4612b0 when we wait for connecting
sockets.
2011-01-21 17:49:01 -08:00
Ryan Dahl
4612b07604 Fix test-http-allow-req-after-204-res
Agent queue waits for connecting sockets.
2011-01-21 17:39:48 -08:00
Ryan Dahl
7dfbccf9bd Add test-https-agent 2011-01-21 15:56:27 -08:00
Ryan Dahl
68f2aa2715 http: agent should cycle on close 2011-01-21 14:55:29 -08:00
isaacs
49275524a5 Fix for meta keys in a weird iTerm state. 2011-01-21 13:51:59 -08:00
isaacs
d40af91b30 Windows line endings. s/\r//g 2011-01-21 13:51:49 -08:00
Bert Belder
8da7202d0b Fix meta+character keys on mac 2011-01-21 13:51:19 -08:00
Ryan Dahl
b9574b995f Expose http.getAgent 2011-01-21 13:47:27 -08:00
Ryan Dahl
db8736ad93 Add https.get() 2011-01-21 13:21:01 -08:00
Ryan Dahl
e65f6b4ce1 Initial pass at https client 2011-01-21 13:13:02 -08:00
Ryan Dahl
86e687086b waf: display oprofile and gdbjit options for all platforms
was breaking mac
2011-01-20 19:07:19 -08:00
Ryan Dahl
6eca6b1ec0 Merge branch 'http_agent' 2011-01-20 18:38:13 -08:00
Ryan Dahl
a86747603c Fix test-http-upload-timeout
Cannot just close the connection or client will error.
2011-01-20 18:24:00 -08:00
Ryan Dahl
7a16e2a2a0 test-http-client-reconnect-bug: hang up should be error. 2011-01-20 18:19:30 -08:00
Ryan Dahl
0866ecaf3f ... 2011-01-20 18:10:15 -08:00
Ryan Dahl
032f80efea Docs for new http API 2011-01-20 18:10:15 -08:00
Ryan Dahl
f465949516 hacky work around socket hangups on http requests 2011-01-20 18:10:15 -08:00
Ryan Dahl
d89454e5d4 Backport client 'upgrade' events 2011-01-20 18:10:15 -08:00
Ryan Dahl
4125822bed all errors go to req object 2011-01-20 18:10:15 -08:00
Ryan Dahl
105c35b9fd http.Client shims 2011-01-20 18:10:15 -08:00
Ryan Dahl
e576d4ec79 Add parser to agent 2011-01-20 18:10:15 -08:00
Ryan Dahl
60aea96f84 first pass at http refactor for TLS 2011-01-20 18:10:15 -08:00
Ryan Dahl
ae30af44cf Disable gdbjit by default 2011-01-20 18:04:09 -08:00
Bert Belder
a763a4f4d9 Fix memory corruption bug on Windows 2011-01-20 01:41:16 +01:00
Bert Belder
8ca0b9a3c5 Fix ev_async misuse in node_child_process_win32.cc 2011-01-20 01:40:55 +01:00
kmillikin@chromium.org
7c2869046e Fix an assertion failure in the full code generator.
We hit an assertion failure when we tried to record the AST ID of
the (shared) .arguments variable proxy more than once.  This was hit
when we had multiple calls to the same parameter in a function that
used the arguments object.  The fix is to not visit the subexpressions
of the (shared) property access expression.

BUG=1060

Review URL: http://codereview.chromium.org/6368007

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@6404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 01:39:32 +01:00
Ryan Dahl
ba80d4d8a9 Transfer data gathering responsibility to readline
Fixes non-raw REPL/Debugger on Posix.
2011-01-19 11:46:16 -08:00
Ryan Dahl
d4127717ac Fix tab on posix tty 2011-01-19 11:33:42 -08:00
Ryan Dahl
6e9f746a46 wscript: style 2011-01-19 11:18:12 -08:00
Ryan Dahl
5895df4d0e Compile gdbjit in by default on linux 2011-01-19 11:17:25 -08:00
Bert Belder
a61066ea1b Workaround for V8 bug 884
See http://code.google.com/p/v8/issues/detail?id=884
2011-01-19 11:06:49 -08:00
Ryan Dahl
b8f006ef72 Upgrade V8 to 3.0.9 2011-01-19 11:06:13 -08:00
Bert Belder
e6e6e87463 Windows: fix window size getter bug 2011-01-18 23:22:38 -08:00
Bert Belder
f0bf325495 Update TODO.win32 2011-01-18 23:22:38 -08:00
Bert Belder
4475b76535 Readline: use symbolic key names instead of ascii control codes 2011-01-18 23:22:38 -08:00
Bert Belder
8c9b2d1066 Readline: use tty methods instead of control sequences 2011-01-18 23:22:38 -08:00
Bert Belder
0b5bf70bff Use tty.ReadStream and tty.WriteStream for stdio when appropriate 2011-01-18 23:22:38 -08:00
Bert Belder
87d898929f Implement tty.ReadStream and tty.WriteStream 2011-01-18 23:22:38 -08:00
Bert Belder
4fddca09f1 New stdio functions to aid new readline interface 2011-01-18 23:22:38 -08:00
Bert Belder
b0eed65584 Windows: watcher for tty events 2011-01-18 23:22:38 -08:00
Ryan Dahl
4f8dd28f7e wscript chooses win32 source files, not cpp 2011-01-18 23:22:38 -08:00
Ryan Dahl
cb14236bb4 Use common.PORT not 8000 2011-01-18 22:27:12 -08:00
Ryan Dahl
39535d74df move test-exec to pummel - too slow 2011-01-18 22:25:38 -08:00
Alexis Sellier
66b418d6f3 make 'readyState' available to CryptoStream 2011-01-18 22:22:50 -08:00
Ryan Dahl
2f6cb66009 Add setEncoding to CryptoStream 2011-01-18 18:30:12 -08:00
Ryan Dahl
4d0416caf6 Add setNoDelay to cryptostream 2011-01-18 17:56:52 -08:00
Ryan Dahl
b22b5e341b listen/bind errors should close net.Server 2011-01-18 16:22:43 -08:00
Ryan Dahl
2ec4cd5525 factor linklist code into own file 2011-01-18 14:26:32 -08:00
Bert Belder
b8879d64dd Remove completed TODO.win32 items 2011-01-18 04:58:33 +01:00
Bert Belder
6ad629895d Make child_process.kill always work on windows 2011-01-18 04:58:32 +01:00
Bert Belder
bb3bf091d4 Fix several child process bugs on windows 2011-01-18 04:58:32 +01:00
Bert Belder
5087c62f18 Fix detection of socket errors 2011-01-18 04:58:31 +01:00
Bert Belder
2ce0961de1 Improve error reporting on windows 2011-01-18 04:58:30 +01:00
Bert Belder
0eb4c2157d Define winsock error numbers 2011-01-18 04:58:30 +01:00
Bert Belder
c99962e4cd Misc. cleanups
casts, unused vars, function ordering, /* within comment, etc.
2011-01-18 04:58:29 +01:00
Bert Belder
e0f47be9d0 Clean up the way windows headers are included
Plus make inclusion order a little more consistent in general
2011-01-18 04:58:11 +01:00
Bert Belder
43d75952ff Windows: get rid of most NO_IMPL related macros 2011-01-18 04:49:54 +01:00
Bert Belder
dc99aa0c8c Windows: implement missing stdio methods 2011-01-18 04:49:54 +01:00
Bert Belder
b70f8aec84 Workaround for V8 bug 884
See http://code.google.com/p/v8/issues/detail?id=884
2011-01-18 04:49:42 +01:00
Ryan Dahl
86bf3309bf docs: style 2011-01-17 13:35:30 -08:00
Ryan Dahl
a51063c13c docs: Add note about global scope 2011-01-17 13:35:11 -08:00
Bert Belder
595509bb4c Fix v8 build on windows
reported to v8 in http://codereview.chromium.org/6056006/
2011-01-17 12:28:48 -08:00
Ryan Dahl
cf2e4f44af Upgrade V8 to 3.0.8 2011-01-17 11:32:56 -08:00
Ryan Dahl
082a4b6033 Now working on v0.3.6 2011-01-16 15:28:01 -08:00
Ryan Dahl
b622bc6305 Bump version to v0.3.5 2011-01-16 15:12:28 -08:00
Felix Geisendörfer
0263f01475 Fix test-require-cache-without-stat.js
This path adds an additional cache to the module system for caching the
location of previously required modules. Since it is embedded in the
loop that iterates over all require.paths, this patch also handles the
case where require.paths is being modified.

The patch also cleans up some code around it.

See: https://groups.google.com/forum/#!topic/nodejs-dev/QGGlrvLDHVs
2011-01-16 14:52:55 -08:00
Felix Geisendörfer
f39fdf2610 Isolate native module system again
See: 2e5dfafcb0 (commitcomment-239719)
2011-01-16 14:51:21 -08:00
Ryan Dahl
c3b0d133aa Add built-in module loading to test-require-cache-without-stat 2011-01-16 14:34:39 -08:00
Ryan Dahl
f35773ad07 Add broken test for require cache working
require is caching the compiled code but still stating the filenames.
https://groups.google.com/d/topic/nodejs-dev/QGGlrvLDHVs/discussion
2011-01-16 01:21:40 -08:00
Ryan Dahl
d9087c10ad style 2011-01-16 00:33:16 -08:00
Ryan Dahl
9bcfc0745c Revert "Implement os.isWindows"
This reverts commit 9e31e0837e.

Use process.platform == 'win32'
2011-01-13 20:32:36 -08:00
Ryan Dahl
496be457b6 Allow third party hooks before main module load
Just put a file lib/_third_party_main.js into the build directory and take
it from there.
2011-01-13 16:30:29 -08:00
Ryan Dahl
860e7a7a5f debugger: don't hang on ^d and ^c 2011-01-13 16:04:33 -08:00
Ryan Dahl
4fa712c48f debugger: error out without script
TODO:

debug> run script.js
2011-01-13 15:29:53 -08:00
Ryan Dahl
53f29d86c0 debugger: add uncaughtException handler to kill child 2011-01-13 15:18:20 -08:00
Ryan Dahl
0fa3f2febd debugger: Correctly eval arrays and numbers 2011-01-13 13:59:35 -08:00
Ryan Dahl
533797a607 debugger: full scope evals 2011-01-13 13:32:16 -08:00
Ryan Dahl
d87ab5450b debugger: Better backtraces 2011-01-13 13:32:16 -08:00
Ryan Dahl
7df8a05129 debugger: primative object inspection 2011-01-13 13:32:16 -08:00
Ryan Dahl
cb71a7dab3 debugger: take help message from commands 2011-01-13 13:32:16 -08:00
Ryan Dahl
29f48d48e5 A few more list clean ups 2011-01-13 02:22:09 -08:00
Ryan Dahl
09994438e5 Expose link-list from timers.js; add tests 2011-01-13 02:10:09 -08:00
Ryan Dahl
4e1e6a2d15 debugger: Don't break on handle === 0 2011-01-12 16:43:05 -08:00
Felix Geisendörfer
f5fbb707b2 Fix NODE_PATH, was broken after cleanup 2011-01-12 16:07:36 -08:00
Felix Geisendörfer
f61277ecb0 Always init module paths
The previous cleanup patch broke module loading in the the REPL by
not initializing require.paths.
2011-01-12 16:07:07 -08:00
Felix Geisendörfer
2e5dfafcb0 Cleanup node module system code 2011-01-12 13:32:06 -08:00
Ryan Dahl
5f5201db2f Fix test-net-connect-buffer
Change to end() behavior in 33c339 was breaking it. end() should wait for
connection before dumping. Changed test-net-connect-timeout to use destroy()
instead.
2011-01-12 13:29:45 -08:00
Ryan Dahl
5f795efd4e net: Timeouts should work before DNS resolution 2011-01-12 12:59:58 -08:00
Ryan Dahl
33c33949b2 Add test for connection timeouts
Also make socket.end() destroy connection if still trying to connect.
Previously was ignoring.
2011-01-12 10:57:03 -08:00
Ryan Dahl
72589b60ad debugger: Only display basename of scripts 2011-01-12 10:33:10 -08:00
Ryan Dahl
1b63bd16ed tab completion for commands in debugger 2011-01-12 10:32:48 -08:00
Ryan Dahl
fc634cd92c Upgrade c-ares to 1.7.4 2011-01-11 18:19:22 -08:00
Ryan Dahl
86160a8807 NODE_DEBUG=timer instead of bitflags 2011-01-11 16:53:05 -08:00
Ryan Dahl
82e9da9fb7 Allow one extra ms in timer diff
Fixes sporadic test-next-tick-ordering.js failures
2011-01-11 16:51:09 -08:00
Ryan Dahl
7c0f453b7c Add delay into test-debugger-client 2011-01-11 16:30:01 -08:00
Ryan Dahl
8e461673c4 Put a little delay into test-tls-securepair-client.js
Avoids race. openssl s_server is a terrible program.
2011-01-11 15:37:58 -08:00
Bert Belder
b9540c28e9 Libev windows fixes 2011-01-11 14:48:07 -08:00
Ryan Dahl
6dbf49110b Use html5 spec stylesheet for docs 2011-01-11 14:32:42 -08:00
Ryan Dahl
464f5d4e13 Merge branch 'vanilla-libeio'
Conflicts:
	deps/libeio/config.h.in
2011-01-11 14:13:06 -08:00
Ryan Dahl
b8d63c10cd Upgrade libeio 2011-01-11 14:09:17 -08:00
isaacs
435ece5058 child_process: Support setting uid/gid by name 2011-01-11 13:54:51 -08:00
Ryan Dahl
b92329667f Fix spelling mistakes 2011-01-11 10:18:46 -08:00
isaacs
6f5d95de6d child_process: Add gid/uid flags to spawn config
This is mostly working, but not completely ideal for two reasons.

1. Rather than emitting an error on the ChildProcess object when the
setgid/setuid fails, it is simply printing the error to stderr and
exiting.  The same happens with the cwd, so that's not completely
terrible.

2. I don't have a good test for this.  It fails with an EPERM if you try
to change the uid or gid as a non-root user.
2011-01-11 10:02:58 -08:00
Ryan Dahl
b7419dfaad Upgrade libev to 4.3 2011-01-11 08:47:18 -08:00
Bert Belder
01148265cb Improve path.resolve documentation 2011-01-10 18:05:15 -08:00
Ryan Dahl
320a56b89d Bump size of bench histogram to 100ms 2011-01-10 18:00:21 -08:00
Ryan Dahl
b9cfd9527a getWindowSize/setWindowSize 2011-01-10 17:25:48 -08:00
Ryan Dahl
63bd237892 typo setuid -> setsid 2011-01-10 17:15:17 -08:00
Ryan Dahl
907e569980 Fix expired keys 2011-01-10 16:30:26 -08:00
Ryan Dahl
1f38046b51 tty.open() returns stream instead of slaveFD
Also is run in its own session.
2011-01-10 16:25:15 -08:00
Ryan Dahl
202dd8387f Add setsid option to child_process 2011-01-10 16:24:49 -08:00
Ryan Dahl
9da75f39d9 Print error when EventEmitters get too many listeners 2011-01-10 13:48:35 -08:00
Ryan Dahl
e1f4b3f009 debugger: implement 'list' 2011-01-08 19:10:17 -08:00
Ryan Dahl
5342e3e925 expose module wrapper to native modules 2011-01-08 19:09:33 -08:00
Ryan Dahl
5580907c58 debugger: fix 'scripts' command
path.split() no longer available
2011-01-08 18:20:39 -08:00
Ryan Dahl
318b1a0a03 Now working on v0.3.5-pre 2011-01-08 16:19:07 -08:00
Ryan Dahl
73f53e12e4 Bump version to v0.3.4 2011-01-08 15:46:07 -08:00
Mihai Călin Bazon
0853730c35 realpath files during module load 2011-01-07 13:00:19 -08:00
Ryan Dahl
2e76cd382f TLS: Forward errors to cleartext
But only after control has been inverted.
2011-01-07 10:58:13 -08:00
Ryan Dahl
08bec7ab0a Remove debugger statement from http_simple.js
results in slow bench
2011-01-06 18:07:50 -08:00
Ryan Dahl
5a05992155 Lint 2011-01-06 16:06:27 -08:00
Bert Belder
1ac133ea6f Replace string magic + path.join by path.resolve
Because path.resolve is more elegant and windows-safe.
2011-01-06 15:39:51 -08:00
Bert Belder
dea2331377 Rework fs.realpath, primordal windows compatibility 2011-01-06 15:38:50 -08:00
Bert Belder
7c731ec9dd Path.resolve, path module windows compatibility
Removes path.normalizeArray() and path.split()
2011-01-06 15:36:25 -08:00
isaacs
48334dc0b1 Fix regression introduced in fe804d9b
It breaks argv[0] on posix systems, and makes it so that npm can't
determine whether node was run from an explicit location, or via "node",
so the configs default improperly.

If on windows, don't do this behavior.  On posix, go back to the old
behavior.
2011-01-06 14:39:06 -08:00
Ryan Dahl
b6dafc1a47 Allow for two streams in REPL
Towards windows compatibility.
2011-01-06 13:42:32 -08:00
Ryan Dahl
22561dfbcf Joyent link goes to no.de 2011-01-06 11:05:19 -08:00
Ryan Dahl
3770462ee3 Fix process.platform 2011-01-05 19:05:59 -08:00
Ryan Dahl
bb7bf58cc7 Update TODO items 2011-01-05 11:59:04 -08:00
Ryan Dahl
4e108ef9b6 Remove legacy TLS api from docs 2011-01-05 11:55:24 -08:00
Ryan Dahl
b62152bc84 Rename net.Stream to net.Socket 2011-01-05 11:53:56 -08:00
Bert Belder
af15b4e45a Remove path module dependency from url module
Now the path module can be adapted to support windows paths without breaking
the url module.  It also allows the undocumented keepBlanks flag to be
removed from path.join and path.normalizeArray.
2011-01-05 11:27:22 -08:00
Bert Belder
9ddfcfecca Remove keepBlanks flag from path functions 2011-01-05 11:17:38 -08:00
Bert Belder
9e31e0837e Implement os.isWindows 2011-01-04 18:38:58 -08:00
Ryan Dahl
468042fc84 Add C++ Buffer migration tips 2011-01-04 17:23:48 -08:00
Bert Belder
fe6f363837 Revert "realpath files during module load"
This reverts commit 131546e733.

Doesn't work on windows, coming back soon.
2011-01-04 17:04:00 -08:00
Bert Belder
b7b0c92ac1 Don't attempt to capture SIGUSR1 2011-01-05 00:45:01 +01:00
Bert Belder
3c330b05b1 Merge branch 'master' of git://github.com/ry/node
Conflicts:
	src/node.cc
	src/node.js
2011-01-05 00:41:59 +01:00
Mihai Călin Bazon
131546e733 realpath files during module load 2011-01-04 12:24:17 -08:00
Ryan Dahl
cda4d56bcf Implement WriteStream.destroySoon 2011-01-04 11:39:12 -08:00
Ryan Dahl
bc1d758408 net.js: Check that readWatcher exists before pause, resume 2011-01-04 11:25:36 -08:00
Ryan Dahl
2957382991 Implement new stream method, destroySoon
Still missing on fs.WriteStream
2011-01-04 11:22:19 -08:00
Ryan Dahl
73f4ec51fd hack for ending https connections 2011-01-04 10:36:05 -08:00
Ryan Dahl
94f8368cf9 First pass at new https server 2011-01-03 15:51:05 -08:00
Ryan Dahl
e4dd5cd6fd NODE_DEBUG uses strings instead of bitflags 2011-01-03 15:41:58 -08:00
Ryan Dahl
d040f1d19d debugger: use correct handle handle 2011-01-03 13:21:28 -08:00
Ryan Dahl
282cce1ea5 debugger: don't display whole path of scripts 2011-01-03 12:58:19 -08:00
Ryan Dahl
6593a96373 Merge branch 'debugger' 2011-01-03 10:27:16 -08:00
Ryan Dahl
2b5b128cba Now working on v0.3.4-pre 2011-01-02 18:57:22 -08:00
Ryan Dahl
57544ba1c5 Bump version to v0.3.3 2011-01-02 18:33:49 -08:00
Ryan Dahl
feb77eab65 Fix REPL for named functions
add some tests.
2011-01-02 18:27:14 -08:00
Bert Belder
c3ffbf219c Fix the OS module for win32 2011-01-02 23:44:43 +01:00
Bert Belder
33118df8f9 Merge remote branch 'origin/master'
Conflicts:
	src/node_net.cc
	src/node_os.cc
2011-01-02 22:57:32 +01:00
Ryan Dahl
b5637170b1 Fix openssl version check 2011-01-02 12:37:27 -08:00
Ryan Dahl
7e831bfba1 Disable TLS tests when node doesn't have OpenSSL. 2011-01-02 01:54:19 -08:00
Ryan Dahl
cd1ec27268 Add openssl version to process.versions 2011-01-02 01:44:42 -08:00
Ryan Dahl
1345103c3a Fix typos 2011-01-02 01:13:27 -08:00
Ryan Dahl
2e3e95ee89 add process.stdin 2011-01-01 21:54:46 -08:00
Ryan Dahl
c82fe30ca1 repl.js style 2011-01-01 21:41:07 -08:00
Ryan Dahl
29626d8731 Syntax error hack for modules. 2011-01-01 21:14:24 -08:00
Ryan Dahl
8b352bdc5d Add '{a:1}' to REPL tests 2011-01-01 21:14:06 -08:00
Ryan Dahl
00974df3e5 Allow for evaling statements in REPL too 2011-01-01 21:05:23 -08:00
Ryan Dahl
b45698e676 Improve how REPL commands are evaled
Before:
> {a: 1}
1
> (function() {
...   // foo
...   return 1;
... })();
...

Now:
> {a: 1}
{ a : 1 }
> (function() {
...   // foo
...   return 1;
... })();
1
>
2011-01-01 17:54:48 -08:00
Ryan Dahl
ce5ddacaf4 Fix solaris build
Stub out new platform functions.
2011-01-01 17:43:59 -08:00
Ryan Dahl
8f5f213a6f Revert "Add optional filters to stream.pipe()"
This reverts commit 24aded078f.
2011-01-01 16:41:39 -08:00
Ryan Dahl
1c7cd4aac3 Make syntax error display optional
Fixes GH-543
2011-01-01 16:38:31 -08:00
Ryan Dahl
40f29dd48a Lint node_script.cc 2011-01-01 13:41:04 -08:00
Ryan Dahl
5b81897cf6 Update links for v0.2.6 on website 2010-12-30 21:07:42 -08:00
Sami Samhuri
e5a47c8ce1 use util.inspect to format objects and arrays printed to the console 2010-12-30 19:14:30 -08:00
Daniel C
ca8cc71bd0 EventEmitter.prototype.once should "return this;" 2010-12-30 18:58:43 -08:00
Ryan Dahl
916f567d23 debugger: a little bit of doc 2010-12-30 18:50:10 -08:00
Ryan Dahl
af6662d5e5 debugger: Prompt before quitting 2010-12-30 18:50:07 -08:00
Ryan Dahl
7b9a2f29b4 debugger: Don't prompt until child is killed 2010-12-30 18:07:19 -08:00
Ryan Dahl
aea568b04a Fix some errors in debugger tests 2010-12-30 17:53:53 -08:00
Ryan Dahl
294bcb33e6 debugger: Fix some parser issues
Wouldn't handle events if it got backed up.
2010-12-30 17:33:07 -08:00
Ryan Dahl
62e0ca05a6 debugger: Disable/Enable raw mode for child 2010-12-30 15:46:47 -08:00
Ryan Dahl
0946474b5c debugger: Clean ups, bug fixes 2010-12-30 13:25:49 -08:00
Ryan Dahl
866201bd74 debugger: add 'kill' command 2010-12-30 12:35:13 -08:00
Ryan Dahl
a3c4e17c2a debugger: repeat command functionality 2010-12-30 11:54:49 -08:00
Ryan Dahl
074af67dd3 debugger: don't display node's internal scripts 2010-12-30 11:53:55 -08:00
Ryan Dahl
d4859a55bc Wrap up debugger in one class
just for better readablity
2010-12-30 11:17:12 -08:00
Ryan Dahl
109f845e49 debugger: style 2010-12-30 10:34:33 -08:00
Ryan Dahl
9244a64b59 debugger: Print error if executing command that requires being connected 2010-12-30 10:31:36 -08:00
Ryan Dahl
2a7e7b1c46 start debug agent on SIGUSR1 2010-12-30 10:20:21 -08:00
Ryan Dahl
481329ee7c debugger: clean up 2010-12-30 10:18:25 -08:00
Ryan Dahl
f484cbf4c7 Debugger: better maintance of script list 2010-12-30 10:02:42 -08:00
Ryan Dahl
bb400d5697 debugger: Work towards interactive restart 2010-12-30 01:35:20 -08:00
Ryan Dahl
e33d0de129 debugger: Clean up child 2010-12-30 01:35:13 -08:00
Ryan Dahl
90e55c3357 Rather have the debugger be parent process 2010-12-30 01:35:13 -08:00
Ryan Dahl
50c1c1e12d add 'info breakpoints' 2010-12-30 01:35:12 -08:00
Ryan Dahl
74cc021ec2 highlight current script 2010-12-30 01:35:12 -08:00
Ryan Dahl
080daf9ddd debugger: 'scripts' command was conflicting with 's' 2010-12-30 01:35:12 -08:00
Ryan Dahl
0adc6b29bd Start on frame zero - don't do extra break 2010-12-30 01:35:12 -08:00
Ryan Dahl
0c928b124c debugger: Clean up a few commands 2010-12-30 01:35:12 -08:00
Ryan Dahl
8874c51d04 Disable OPOST
Helps when sharing a tty with non-raw mode processes
2010-12-30 01:35:12 -08:00
Ryan Dahl
3be4f097a3 Debugger: Fix some output 2010-12-30 01:35:12 -08:00
Ryan Dahl
b5aed43f04 Add better breakpoint text 2010-12-30 01:35:12 -08:00
Ryan Dahl
0dcbe3f74a Fork out to debugger on debugger statements
Also implement continue in Client.
2010-12-30 01:35:12 -08:00
Ryan Dahl
4e81cf7def Debugger client emits ready after recving initial res 2010-12-30 01:35:11 -08:00
Ryan Dahl
a8417c128e Add more debugger tests 2010-12-30 01:35:11 -08:00
Ryan Dahl
8e96b8ab9b keep track of current frame. eval works for global scope 2010-12-30 01:35:11 -08:00
Ryan Dahl
797aa97e19 Fix test-debugger-client 2010-12-30 01:35:11 -08:00
Ryan Dahl
8d82ec2130 Add beginning of build-in debugger
+ test-debugger-client (which is currently broken)
2010-12-30 01:35:11 -08:00
Ryan Dahl
0df804b9e7 start debug agent on SIGUSR1 2010-12-30 01:35:10 -08:00
Ryan Dahl
e3ce73a214 Add ability to ask question from readline 2010-12-30 01:35:01 -08:00
Tom Hughes
54b1f8028a Free (ref-counted) private key. 2010-12-24 23:50:33 -08:00
Brian White
8275d7cd34 Fix Cygwin compatibility in the os module 2010-12-23 09:52:04 -08:00
Kai Chen
b2fd88ef7a correct some inline links in api document 2010-12-22 19:49:04 -08:00
Tom Hughes
ae8262a176 cmake: Add toolchain file for cross-compiling. 2010-12-22 16:12:49 -08:00
Tom Hughes
e03fae1447 cmake: Fix OpenSSL detection and node crypto compilation. 2010-12-22 16:12:39 -08:00
Daniel Gröber
1f7026e2a0 cmake: add -lutil 2010-12-22 16:12:18 -08:00
Brian White
d75c338dd6 Add more functionality to the os module 2010-12-22 11:01:25 -08:00
Tom Hughes
0d58353d66 Don't access buffer data before initializing it.
Prevents valgrind from complaining and still tests that buffer data is
treated as unsigned.
2010-12-22 10:33:46 -08:00
Tom Hughes
b38f4712c4 Fix memory leak in node_crypto.cc.
Both HexDecode and unbase64 allocate buffers, which weren't being freed.
2010-12-22 10:32:20 -08:00
Tom Hughes
4b555091e4 Fix memory corruption with unnamed AF_UNIX sockets.
AF_UNIX sockets can have a pathname, be unnamed, or abstract (Linux
only). If an unnamed socket is returned by getsockname, getpeername, or
accept, sun_path should not be inspected.
2010-12-22 10:29:28 -08:00
Ryan Dahl
d02131d206 Add 'make test-valgrind' 2010-12-22 10:24:47 -08:00
Ryan Dahl
4227e9d79d process.kill coerces args to integers 2010-12-21 15:41:22 -08:00
Oleg Slobodskoi
23cf938e4f fix assert.throws 2010-12-21 12:41:57 -08:00
Ryan Dahl
d793fcaabd Add toolchain=gcc to V8 build for Sun 2010-12-21 12:02:51 -08:00
Theo Schlossnagle
b202483e47 The following error can be thrown from accept on ECONNABORT. Instead, it should be ignored.
net:1100
        if (e.errno != EMFILE) throw e;
                               ^
Error: ECONNABORTED, Software caused connection abort
    at IOWatcher.callback (net:1098:24)
    at node.js:773:9
2010-12-21 10:46:58 -08:00
Ryan Dahl
1a894b39b3 Upgrade V8 to 3.0.4 2010-12-21 10:24:08 -08:00
Bert Belder
86518c3b11 Port GetHostName 2010-12-21 00:17:12 +01:00
Bert Belder
2d8ab90613 Revert "Performance-killing bug workaround for V8 on mingw"
This reverts commit 9a9edb0e8e.
2010-12-20 23:52:38 +01:00
Bert Belder
0b76321308 Update TODO.win32 2010-12-20 23:51:33 +01:00
Bert Belder
a6f2082b33 Fixes to child process 2010-12-20 23:51:32 +01:00
Bert Belder
d1bf9cf1f8 After building overwrite existing ./node(_g)?.exe 2010-12-20 23:51:32 +01:00
Bert Belder
0a2f1cb334 Child processes 2010-12-20 23:51:31 +01:00
Bert Belder
0b96c5bc3b Make using winsock extension functions possible 2010-12-20 23:51:30 +01:00
Bert Belder
2655269911 Make select work on >64 FDs on windows 2010-12-20 23:51:30 +01:00
Bert Belder
bd62203d13 Support for non-overlapped sockets
By default windows creates sockets with the WSA_FLAG_OVERLAPPED flag set.
Because child processes don't expect to have overlapped stdio (it never happens)
it won't work with them.
2010-12-20 23:51:29 +01:00
Bert Belder
d66cf5f32c Work around intermittent mkdir failures in testcfg.py 2010-12-20 23:51:28 +01:00
Bert Belder
fe804d9bc7 _Partial_ backslash support in node.js argv directory munging
Doesn't do it when node is started from another drive using a drive-relative path.
E.g:
  d:
  cd nodejs
  c:
  d:node.exe d:test.js
2010-12-20 23:51:27 +01:00
Bert Belder
9be07f7fe1 _Partial_ fix for backslash path separator support in path.js
Needs review & tests
2010-12-20 23:51:27 +01:00
Bert Belder
ad41e778b4 Port socketerror 2010-12-20 23:51:26 +01:00
Bert Belder
dd3308851d Fix connect bug 2010-12-20 23:51:25 +01:00
Bert Belder
4a2cb07808 Fix whitespace errors introduced by porting efforts 2010-12-20 23:51:25 +01:00
Bert Belder
a6aca21ced Updating todo.WIN32 2010-12-20 23:51:24 +01:00
Bert Belder
6d266219cc Add more stuff to TODO.win32 2010-12-20 23:51:23 +01:00
Bert Belder
e047ec340d Update TODO.win32 2010-12-20 23:51:22 +01:00
Bert Belder
4eea3e45bd make test somewhat works 2010-12-20 23:51:21 +01:00
Bert Belder
3c3d1d31c5 Better way of getting rid of symlinks
Windows, especially msysgit, doesn't like 'em
2010-12-20 23:51:21 +01:00
Bert Belder
e85733a80b Update TODO.w32 2010-12-20 23:51:20 +01:00
Bert Belder
46dc393ff1 node_net: IsIP and CreateErrnoException just work 2010-12-20 23:51:19 +01:00
Bert Belder
a807ac6660 Bugfixes, more consistency in node_net error handling 2010-12-20 23:51:18 +01:00
Bert Belder
2d39e1341c Make node_net Connect work 2010-12-20 23:51:18 +01:00
Bert Belder
cecc351303 Make node_net Shutdown work on windows 2010-12-20 23:51:17 +01:00
Bert Belder
0580f9a9bf Add todo file for windows port 2010-12-20 23:51:16 +01:00
Bert Belder
bea5e6eff6 Re-enable stat watchers on windows
This reverts commit b8a99f94167a25f63ae096d9d5e2cc9cf70cecef.
2010-12-20 23:51:16 +01:00
Bert Belder
967b7b0d8c Libeio should use correct stat/fstat as well 2010-12-20 23:51:15 +01:00
Bert Belder
f48c36f74f Use unicode and bigfile aware stat/fstat 2010-12-20 23:51:14 +01:00
Bert Belder
1361e87e80 Fix error reporting and EAGAIN handling bug in net Write
Clarify some comments as well
2010-12-20 23:51:14 +01:00
Bert Belder
b0f048e970 Remove stray file 2010-12-20 23:51:13 +01:00
Bert Belder
03a74efb16 Don't break the linux build 2010-12-20 23:51:12 +01:00
Bert Belder
8b9f7c6eb2 Make Read and Write in node_net.cc actually work on sockets 2010-12-20 23:51:12 +01:00
Bert Belder
13fb6f7fa1 Make Socket, Bind, Listen, Accept work for windows 2010-12-20 23:51:11 +01:00
Bert Belder
51300f36d6 Make SetNonBlock and SetSockFlags work on FDs instead of sockets
However, don't use _get_osfhandle in Close()
2010-12-20 23:51:10 +01:00
Bert Belder
6e522fb27b Use the c-ares pton/ntop hack in node_net.cc as well 2010-12-20 23:51:10 +01:00
Bert Belder
9f9332963a wscript: use "node.exe" and avoid symlinks on windows 2010-12-20 23:51:09 +01:00
Bert Belder
9a9edb0e8e Performance-killing bug workaround for V8 on mingw
When V8 on mingw generates a _compiled_ call stub for an external api callback, it fucks up the stack.
It doesn't set the stack pointers properly. Could be due to subtly different calling conventions?
This patch disables the simple_api_call optimization. It hurts performance.
2010-12-20 23:51:08 +01:00
Bert Belder
3216f08b6d Ignore eclipse project files 2010-12-20 23:51:07 +01:00
Bert Belder
1d0193a733 Wafadmin: don't even think about using msvc 2010-12-20 23:51:07 +01:00
Bert Belder
f37cc8720b On windows, link with Winsock and WinMM 2010-12-20 23:51:06 +01:00
Bert Belder
6f08fdbcca Backslashes in paths wreak havoc 2010-12-20 23:51:05 +01:00
Bert Belder
d56e1a3fcd No -rdynamic and -pthread flags when building with mingw 2010-12-20 23:50:47 +01:00
Bert Belder
276b0b174e Always use statically linked c-ares on windows; fix build
On win32 CARES is always static, so we can call internal functions like ares_inet_pton et al.
CARES_STATICLIB must be defined or gcc will try to make DLL stub calls
2010-12-20 23:50:46 +01:00
Bert Belder
3947269f97 Mingw32 has no inet_pton/inet_ntop; import them from c-ares (hack) 2010-12-20 23:50:45 +01:00
Bert Belder
d7de459b80 Use ares_socket_t instead of int for sockets 2010-12-20 23:50:45 +01:00
Bert Belder
6e54f416ad Fix header files for node_cares.cc 2010-12-20 23:50:44 +01:00
Bert Belder
1937c5e3c1 On windows, there's no support (yet) for chown and symlink functions 2010-12-20 23:50:43 +01:00
Bert Belder
51c6867280 On windows, stat() doesn't give you block (size) info 2010-12-20 23:50:43 +01:00
Bert Belder
f9a74a2327 On windows, mkdir() doesn't take a mode parameter 2010-12-20 23:50:42 +01:00
Bert Belder
8fc3bac868 Fix fsync/fdatasync for windows 2010-12-20 23:50:41 +01:00
Bert Belder
fae7b81589 On windows use eio__pread and eio__pwrite (hack) 2010-12-20 23:50:41 +01:00
Bert Belder
c7f0341d88 Include windows.h in node_file.cc 2010-12-20 23:50:40 +01:00
Bert Belder
a85a776268 Most of node_net is not yet available on windows 2010-12-20 23:50:39 +01:00
Bert Belder
7a1917d86f Make SetNonBlock and SetSockFlags work on mingw 2010-12-20 23:50:39 +01:00
Bert Belder
cbf73fcccd Fix headers for node_net.cc 2010-12-20 23:50:38 +01:00
Bert Belder
cd921c2c62 S_IFLNK, S_IFSOCK and SIGCHLD are not available on windows 2010-12-20 23:50:37 +01:00
Bert Belder
81b26dc555 Stat watchers don't work on windows yet 2010-12-20 23:50:37 +01:00
Bert Belder
b4510d57dc There is no child process support for windows yet 2010-12-20 23:50:36 +01:00
Bert Belder
6d1af51de6 Fix header files for node_buffer.cc 2010-12-20 23:50:35 +01:00
Bert Belder
30bab52741 Disable node.cc functions that are not supported on windows 2010-12-20 23:50:35 +01:00
Bert Belder
dcc3508890 There's no SIGCHLD on windows 2010-12-20 23:50:34 +01:00
Bert Belder
4a42e408d2 Properly intialize winsock 2010-12-20 23:50:33 +01:00
Bert Belder
a177d60e2b Fix headers for node.cc 2010-12-20 23:50:33 +01:00
Bert Belder
ae8906e7d1 Add errno.h to platform_win32.cc 2010-12-20 23:50:32 +01:00
Bert Belder
518fa2e29a node_stdio stub for windows 2010-12-20 23:50:31 +01:00
Bert Belder
b85c4c445b Macros for warning about unimplemented APIs 2010-12-20 23:50:30 +01:00
Bert Belder
8a3132a406 Avoid WCHAR string conversion warning 2010-12-20 23:50:30 +01:00
Bert Belder
0b54514a86 errno is reserved; use errorno 2010-12-20 23:50:29 +01:00
Bert Belder
63bff5434d No implementation for OS::GetExecutablePath and OS::GetMemory yet 2010-12-20 23:50:28 +01:00
Bert Belder
e98a06d90f Make winapi_perror public 2010-12-20 23:50:28 +01:00
Bert Belder
dae9752973 Stub out platform_win32.h 2010-12-20 23:50:27 +01:00
Bert Belder
62af617f84 Dynamically link with pthreads-w32
Adds some explanation what would need to be done to link pthreads statically
2010-12-20 23:50:26 +01:00
Bert Belder
13699c1b33 V8: Don't attempt to build w/ snapshot, doesn't seem to work on mingw32 2010-12-20 23:50:26 +01:00
Bert Belder
2463dbb3fd Fix v8 build on mingw32 2010-12-20 23:49:56 +01:00
Jeremy Martin
6f726cf8c7 url.parse(url, true) defaults query field to {} 2010-12-20 13:48:44 -08:00
Ryan Dahl
8db0bbe0dc Add callback to CryptoStream.write 2010-12-20 11:08:51 -08:00
Ryan Dahl
fca713eba4 Add doc for Buffer.isBuffer 2010-12-18 18:44:04 -08:00
Ryan Dahl
41d73e02a2 cleartext.socket always exists 2010-12-18 16:38:32 -08:00
Ryan Dahl
bb27885251 TLS: check we're not disconnected before Cleartext blow 2010-12-18 15:34:10 -08:00
Ryan Dahl
3cf2cbf904 Parse issuer and subject from CryptoStream.getPeerCertificate 2010-12-18 11:26:54 -08:00
Ryan Dahl
24aded078f Add optional filters to stream.pipe() 2010-12-17 13:56:47 -08:00
Ryan Dahl
a8f666ebb8 Now working on v0.3.3-pre 2010-12-17 10:10:23 -08:00
Ryan Dahl
4bb914bde9 Bump version to v0.3.2 2010-12-17 09:51:48 -08:00
Ryan Dahl
d1f36accbf Remove toJSON usage - it was removed from V8 2010-12-17 09:50:41 -08:00
Ryan Dahl
7d425a0a16 Upgrade V8 to 3.0.3 2010-12-17 09:47:55 -08:00
Brian White
9eaf2329e7 Fix compilation on OpenBSD and FreeBSD
While it compiles fine on FreeBSD, at least on amd64 node dies with:
"CALL_AND_RETRY_0 allocation failed - process out of memory"
2010-12-17 09:06:31 -08:00
Ryan Dahl
d0beac70f4 Revert "Simplify next tick logic by looping around ev_loop"
This reverts commit 241ea7e595.

Fixes GH-511: https://github.com/ry/node/issues/issue/511
2010-12-16 18:41:13 -08:00
Jorge Chamorro Bieling
e530507cb1 Add failing test for GH-511 2010-12-16 18:41:13 -08:00
Brian White
6d75c06e64 Add os module to repl's built-in lib list 2010-12-16 17:37:00 -08:00
Ryan Dahl
2dc17e93ee Add oprofile patch to repo 2010-12-16 14:25:02 -08:00
Ryan Dahl
02aae22397 Add solaris patch file 2010-12-16 14:22:50 -08:00
Ryan Dahl
c9d3a81db0 Patch V8 to compile on solaris 2010-12-16 14:05:13 -08:00
Ryan Dahl
033ab7ebb6 Add 5 sec timeout to test-tls-securepair-client
This test is broken for people who don't have OpenSSL 1.0.0 - but it's just
a bug in OpenSSL. Add this timeout so that it doesn't take super long to run
the tests.
2010-12-16 12:23:38 -08:00
Ryan Dahl
c6406f9e57 Apply V8 r5951 to fix Mac build
From f3973972b727df480697443871d780596aba0201 Mon Sep 17 00:00:00 2001
From: erik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Date: Wed, 8 Dec 2010 16:23:25 +0000
Subject: [PATCH] Speed up quoting of JSON strings by allocating a string that is big enough
 and then trimming it when the length is known.  This way we only have to
 traverse the input once.
 Review URL: http://codereview.chromium.org/5556012
2010-12-16 12:10:54 -08:00
Ryan Dahl
ea700a8851 Upgrade V8 to 3.0.2 2010-12-16 11:52:08 -08:00
Ryan Dahl
632da2a393 Add callback paramenter to socket.connect() 2010-12-15 15:57:41 -08:00
Ryan Dahl
c4161f32f5 Add callback to socket.write() 2010-12-15 15:47:02 -08:00
Ryan Dahl
c970968ee6 better option parsing for socket.write() 2010-12-15 15:15:27 -08:00
Ryan Dahl
1dad95a3a9 Print 'make clean' commands 2010-12-13 22:13:51 -08:00
Ryan Dahl
7d73779446 Make oprofile work 2010-12-13 22:12:46 -08:00
Ryan Dahl
1d78159e8f Upgrade V8 to 3.0.1 2010-12-13 22:12:14 -08:00
isaacs
3d0627dc6a link windows/cygwin build to the wiki docs
Suggested by temp01 in IRC.
http://irc.npmjs.org/node.js/2010-12-12#NODE-JS-2010-12-12T18-59-36-270Z
18:59:36 temp01: I feel like the build section on nodejs.org should link
there
19:11:18 isaacs: temp01: yeah, that'd be helpful
2010-12-13 21:01:36 -08:00
Felix Geisendörfer
e27418ca3f Prefer require.cache over native module cache
This patch changes node's module loading behavior so that the
require.cache is always the first place to consider when loading a
module.

The motivation for this change is to help people who are writing
focused tests for their node.js applications, and need a mechanism
to inject test doubles to replace native node.js modules.
2010-12-13 17:58:24 -08:00
Ryan Dahl
a59483bd1d TLS: server should die on junk 2010-12-11 02:45:38 -08:00
Ryan Dahl
c9e5cfcc34 Random doc fixes 2010-12-11 02:32:48 -08:00
Ryan Dahl
5bdcec67f0 Add docs for tls.connect() 2010-12-11 02:26:48 -08:00
Ryan Dahl
e3d1808ef0 Rename node::SecureStream to node::crypto::Connection
node::SecureStream is definitely not a "stream" in the Node sense. Renaming
it to avoid ambiguity. (Adding namespace to not confuse with some other
Connection object.)
2010-12-11 02:13:29 -08:00
Ryan Dahl
6636bfaa0a TLS: Simplify code from suck and blow 2010-12-11 01:42:55 -08:00
Ryan Dahl
66767edf12 Add CryptoStream.destroy() 2010-12-11 01:21:25 -08:00
Ryan Dahl
953561ab06 Factor out CryptoStream.end; support data on end() 2010-12-11 01:18:45 -08:00
Ryan Dahl
4f2ab03e97 Fix typo 2010-12-11 00:56:58 -08:00
Brian White
f1762ff815 Add os module and getHostname 2010-12-11 00:51:20 -08:00
Ryan Dahl
dc65cbd2e9 Factor out some _cycle functionality into Cleartext and EncrypteStreams 2010-12-10 22:29:46 -08:00
Ryan Dahl
70baeba8a9 Add receivedShutdown() binding 2010-12-10 22:09:46 -08:00
Ryan Dahl
d4f1ab00d2 Add EncryptedStream and CleartextStream classes
Towards half-closed secure sockets.
2010-12-10 18:25:23 -08:00
Ryan Dahl
8ef683dead Rename the securepair test to be prefixed with tls 2010-12-10 18:03:39 -08:00
Ryan Dahl
c444293be9 Start a simple TLS client verification test 2010-12-10 18:02:58 -08:00
Ryan Dahl
32e8692b06 Apply V8 r5951 to fix Mac build
From f3973972b727df480697443871d780596aba0201 Mon Sep 17 00:00:00 2001
From: erik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Date: Wed, 8 Dec 2010 16:23:25 +0000
Subject: [PATCH] Speed up quoting of JSON strings by allocating a string that is big enough
 and then trimming it when the length is known.  This way we only have to
 traverse the input once.
 Review URL: http://codereview.chromium.org/5556012
2010-12-10 11:22:12 -08:00
Ryan Dahl
5138992f3c Add some verification code to tls.connect() 2010-12-09 02:46:57 -08:00
Ryan Dahl
a473b8dafb Move getPeerCertificate and getCipher to CryptoStream 2010-12-09 02:31:22 -08:00
Ryan Dahl
2ca63c8f79 Initial implementation of tls.connect()
Seems to work checkout test/disabled/tls-client.js
Type "GET /" after connected.
2010-12-09 00:38:12 -08:00
Ryan Dahl
137c361517 pair.cleartext, pair.encrypted now instances of tls.CryptoStream 2010-12-09 00:10:27 -08:00
Ryan Dahl
5a87bd168d Remove doc references to readyState 2010-12-08 16:04:21 -08:00
Ryan Dahl
a3c91c216f Simplify the net.Server example in docs 2010-12-08 13:46:02 -08:00
Ryan Dahl
9a7fb3c988 Add tls.Server docs 2010-12-08 13:22:12 -08:00
Ryan Dahl
dac4d486ec Accept Buffers as well as strings for addCert, addKey 2010-12-08 13:21:50 -08:00
Ryan Dahl
0ea0b921b7 TLS: emit 'secureConnection' instead of two events 2010-12-08 12:05:19 -08:00
Ryan Dahl
a952231640 remove old todo 2010-12-08 11:55:13 -08:00
Ryan Dahl
bb46b63e33 test-tls-server-verify: add ca2 test case 2010-12-08 11:55:04 -08:00
Ryan Dahl
13b14300b9 TLS: emit 'end' on both streams 2010-12-08 11:51:41 -08:00
Ryan Dahl
a0c55dfe09 TLS: don't use events when control hasn't been inverted 2010-12-08 11:46:19 -08:00
Ryan Dahl
0ec57ea34c Some TLS clean ups 2010-12-08 11:27:17 -08:00
Ryan Dahl
5d60b06b76 Add 'make test' to test/fixtures/keys/Makefile 2010-12-07 17:13:51 -08:00
Ryan Dahl
6bc9b2ef92 clients without certs are unauthed. 2010-12-07 16:51:23 -08:00
Ryan Dahl
ee5366a410 Fix CNs for agent keys; can't be the same as CA's CN
Also add makefile for easy tweaking.
2010-12-07 16:36:10 -08:00
Ryan Dahl
c30f113712 Upgrade V8 to 3.0.0 2010-12-07 13:56:11 -08:00
Ryan Dahl
5b8c62f7d1 Add broken, but detailed TLS verify test
Plus a bunch of keys.
2010-12-07 11:53:41 -08:00
Ryan Dahl
180dfca03f Pretty error message messes up if readFileSync in main module fails.
TODO test/message test for this.
2010-12-07 11:29:20 -08:00
Ryan Dahl
0b0faceb19 Move securepair stuff into tls.js 2010-12-05 18:19:18 -08:00
Ryan Dahl
5bca100afe Server must not request cert. 2010-12-05 18:13:20 -08:00
Oleg Efimov
093dfaf801 GJSLint all tests, only 3 long lines left in test-url.js
test/simple/test-url.js:31:(0110) Line too long (82 characters).
test/simple/test-url.js:39:(0110) Line too long (85 characters).
test/simple/test-url.js:40:(0110) Line too long (92 characters).
2010-12-05 15:42:41 -08:00
Oleg Efimov
0665f0271e GJSLint all simple tests exclude http-*, url, path 2010-12-05 15:41:58 -08:00
isaacs
47c40bf18d test-fs-realpath: Put junk in tmp, not fixtures.
Prevents test/fixtures/cycles/folder/cycles from being created every time
the tests are run.
2010-12-05 15:28:15 -08:00
isaacs
dc2b4b2a81 test-fs-realpath: move absDir fetching to separate function 2010-12-05 15:27:01 -08:00
isaacs
6525c04522 test-fs-realpath: lint 2010-12-05 15:26:48 -08:00
Oleg Efimov
0ce9cbab29 GJSLint continue 2010-12-05 09:28:18 -08:00
Oleg Efimov
e76cd53431 Small site fix for image borders and nodejs-dev maillist URL 2010-12-04 18:47:32 -08:00
Ryan Dahl
02cc39f221 Check for global leaks in all tests 2010-12-04 16:36:21 -08:00
Ryan Dahl
92789b16e5 Fix global leaks 2010-12-04 16:36:21 -08:00
Ryan Dahl
a0159b4b29 Fix global leaks 2010-12-04 15:58:50 -08:00
Ryan Dahl
fbdff52b44 Fix global leaks in test-buffer.js 2010-12-04 13:40:21 -08:00
Ryan Dahl
5a21138e37 fix global leak 2010-12-04 13:39:28 -08:00
Anders Conbere
e9c7195471 Reworks the two functions traverser and findModulePath into a more readable form.
This is not the supposed end of these changes, but a first change that
should make future changes easier to reason about.
2010-12-04 13:20:01 -08:00
Devin Torres
8c6a7b5de4 Use more color in the repl, loosely inspired by TextMate's SunBurst theme 2010-12-03 16:07:20 -08:00
Anders Conbere
c4f8f871c9 adding module tests for .js and bare files
Currently the module tests don't cover the cases for when a user
requires a file with a request that includes the extension, and for a
request to a file with no extensions.

ex.

require("./a.js") // not tested
require("./foo") // (not tested with trying to load a file named ./foo)
2010-12-03 16:00:10 -08:00
Sean Braithwaite
fcc38129a3 Check buffer length using string length
+ Utf8Length is really slow but has the same semantics in this case
2010-12-03 15:55:03 -08:00
Ryan Dahl
c70acbb1a3 implement openpty for sun 2010-12-03 20:49:25 +00:00
Brian White
e41e078159 Make sure REPL doesn't get borked when invalid REPL keywords are entered 2010-12-03 09:57:36 -08:00
Brian White
e4bca19843 Fix tty changes for OSX 2010-12-03 09:29:48 -08:00
Ryan Dahl
a0e9a510b0 Introduce require('tty')
You may need to reconfigure after this commit due to the new library.
2010-12-02 18:06:43 -08:00
Oleg Efimov
c0d69a4883 GJSLint part of tests 2010-12-02 17:49:23 -08:00
Ryan Dahl
d3532a4bf2 Fix indention in 'make test-message' 2010-12-02 17:01:18 -08:00
Ryan Dahl
33685fee48 Add configure flag for oprofile 2010-12-02 16:57:16 -08:00
Ryan Dahl
da96e07bbe fix global leak 2010-12-02 16:45:34 -08:00
Ryan Dahl
712c74fc7a test-securepair-client: handle broken stdout packets 2010-12-02 16:38:23 -08:00
Ryan Dahl
ea9006a5bc print warning on process.ENV 2010-12-02 15:59:35 -08:00
Ryan Dahl
558e5ba2b0 lint util.js and src/node.js 2010-12-02 12:27:26 -08:00
isaacs
7c57eb2aec lint url.js 2010-12-02 11:46:32 -08:00
Oleg Slobodskoi
c5c1dc5dda docs for assert.throws 2010-12-02 11:07:47 -08:00
Tom Hughes
e681abe5cb cmake: solaris fixes. 2010-12-02 10:36:10 -08:00
Tom Hughes
cf1811a6d3 cmake: Add valgrind support. 2010-12-02 10:36:02 -08:00
Tom Hughes
b46f10a11f cmake: Add coverage support. 2010-12-02 10:35:39 -08:00
Micheil Smith
a1138c6f2a Cleanup Makefile for JSLint, CPPLint 2010-12-02 09:21:02 -08:00
Ryan Dahl
dd53ceebe4 lint 2010-12-01 20:59:06 -08:00
Ryan Dahl
e232f6e735 more lint 2010-12-01 20:28:28 -08:00
Brian White
ddbaeef1b3 Fix executable path on FreeBSD. 2010-12-01 20:28:17 -08:00
Ryan Dahl
09329cbb04 more lint 2010-12-01 17:43:30 -08:00
Ryan Dahl
f22c248e4c more lint 2010-12-01 17:29:11 -08:00
Ryan Dahl
ac58d3a665 Import cpplint.py
make cpplint
make jslint
make lint
2010-12-01 17:01:25 -08:00
Ryan Dahl
11ea8da9c3 lint child_process.js 2010-12-01 16:56:03 -08:00
Ryan Dahl
db78043d52 lint 2010-12-01 16:42:31 -08:00
Ryan Dahl
a128451004 Import Google's closure_linter
Run with 'make lint'
2010-12-01 16:42:26 -08:00
Ryan Dahl
08d8116f6b style 2010-12-01 13:43:05 -08:00
Ryan Dahl
cd48649c61 Require without .js in test-repl 2010-12-01 13:40:28 -08:00
Ryan Dahl
d8f2880ca4 New TLS server API 2010-12-01 13:00:17 -08:00
Ryan Dahl
ec1589875c Stop watcher before calling .set() in Stream.prototype.resume 2010-12-01 12:52:34 -08:00
Ryan Dahl
127f17a0ea Remove should_verify from C++ - to handle in JS land 2010-12-01 12:47:49 -08:00
Ryan Dahl
c5d32b3c64 add todo 2010-12-01 12:32:37 -08:00
Ryan Dahl
5dab4be53c Remove useless shouldVerify assignments 2010-12-01 11:31:22 -08:00
Ryan Dahl
89e398f075 Better array check in Cert Authority list 2010-12-01 11:23:25 -08:00
Ryan Dahl
855210ce0b add shouldVerifyPeer param to SecurePairs 2010-12-01 09:27:13 -08:00
Ryan Dahl
28a86c3e56 Remove unnecessary call to X509_STORE_free 2010-12-01 09:27:13 -08:00
Ryan Dahl
504a80dc6d Rename VerifyPeerError to VerifyError 2010-12-01 09:26:59 -08:00
Ryan Dahl
1fe450c62c fix typo 2010-11-30 23:06:57 -08:00
Ryan Dahl
09229820e7 Add promotejs
Over 2 months late -- this is how much I procrastinate. -_-
2010-11-30 23:00:37 -08:00
Michael W
5f3464cf4e fixed timers, whoops.
Fixes issue https://github.com/ry/node/issues/issue/481
2010-11-30 22:33:29 -08:00
Ryan Dahl
355936dcde Implement SecureContext destructor 2010-11-30 18:19:54 -08:00
Ryan Dahl
ea540c94f8 Better verify info 2010-11-30 18:19:54 -08:00
Ryan Dahl
4b947310b2 Move root certs out of JavaScript 2010-11-30 18:19:54 -08:00
Ryan Dahl
09157369b3 style 2010-11-30 18:19:54 -08:00
Ryan Dahl
e15e214747 Fix test-child-process-cwd.js on Joyent servers
It's symlinked to /usr/bin so this test fails.
2010-11-30 19:53:51 +00:00
Ryan Dahl
7286b79521 Upgrade V8 to 2.5.9.1 2010-11-30 11:37:43 -08:00
Ryan Dahl
486c74e72b Revert "Default to TLSv1"
This reverts commit 97970b05fe.
2010-11-30 11:33:05 -08:00
Ryan Dahl
70188499b0 Lazy load console object 2010-11-30 11:18:02 -08:00
Ryan Dahl
81afb54c0a Fix comment 2010-11-30 11:04:31 -08:00
Ryan Dahl
db98d6e4e0 Remove assert in verify_peer; add comments 2010-11-30 10:55:04 -08:00
Bert Belder
5ea2a61596 win: Duplicate platform_cygwin.cc into platform_win32.cc 2010-11-29 23:49:29 -08:00
Bert Belder
fa94d55f87 win: C-ares build config for win32 2010-11-29 23:48:58 -08:00
Bert Belder
4a329af418 win: Waf doesn't detect sys/select.h on mingw, but its there for sure 2010-11-29 23:48:34 -08:00
Bert Belder
4c16dd7c5c win: Make libev use send instead of write for sockets
It looks like MINGW doesn't like to write() to sockets.
If wrong, revert this patch
2010-11-29 23:47:48 -08:00
Bert Belder
4476ce04dc win: Export eio__pread and eio__pwrite so node_file can use it 2010-11-29 23:46:46 -08:00
Bert Belder
d1d4695474 win: Fix wscript for libeio on windows 2010-11-29 23:46:40 -08:00
Bert Belder
5a36d1b86f win: Make libeio build on windows 2010-11-29 23:46:35 -08:00
Bert Belder
99ba903d46 win: Define __POSIX__ constant when the platform is POSIX-y 2010-11-29 23:46:30 -08:00
Bert Belder
9032bfce59 win: Symlink to jsmin.py doesn't work on windows 2010-11-29 23:46:17 -08:00
Ryan Dahl
aed0ba3211 buffer.copy targetStart defaults to 0 2010-11-29 19:59:01 -08:00
Ryan Dahl
6d7242b485 Document defaults for buffer.copy() 2010-11-29 19:52:47 -08:00
Ryan Dahl
a326eebac8 Put tools/ into PYTHON_PATH 2010-11-29 19:46:00 -08:00
Michael W
645c3b3713 Fixed: clearTimeouts calling multiple times
When clearTimeouts was called on a timer multiple times, it would break the
doubly-linked list along with future timeouts. This patch fixes that.
2010-11-29 18:17:13 -08:00
Travis Swicegood
22cf5a24db Simplify execution from "big if statement"
This code is functionally equivalent, but in a simpler form.  Now new
parameters to `execFile` do not require `exec` to be refactored.
2010-11-29 17:46:46 -08:00
Travis Swicegood
e514f575f3 Remove cruft that dealt with env parameter
Originally added in commit 078a48a9, this code dealt with an optional
env parameter that was passed to `exec`.  The parameter was removed, but
this code was left.  As it serves no purpose, removing it.
2010-11-29 17:43:27 -08:00
Ryan Dahl
1dbbaa7fa0 Add test to show ECONNREFUSED works 2010-11-29 17:36:59 -08:00
Jeremy Martin
144b2a5338 Fix number of args emitted by EventEmitter during "fast case" (lte 3 args) 2010-11-29 17:25:50 -08:00
Oleg Slobodskoi
02083412eb assert.throws can now accept as RegExp
makes validation of errors more flexible
2010-11-29 17:22:36 -08:00
Travis Swicegood
86727b15f3 fix a typo in comment
fixes issue 464
2010-11-29 17:07:30 -08:00
Evan Larkin
bc02d47b21 Fix variable leak.
Fixes issue 461
2010-11-29 17:07:25 -08:00
Ryan Dahl
711196cafa Don't call exit() from the signal handler
Fixes issue #457
2010-11-29 16:19:28 -08:00
Ryan Dahl
3fceb491d4 Style 2010-11-29 16:19:28 -08:00
Ryan Dahl
b6face1dce Remove unnecessary variable def 2010-11-29 15:04:39 -08:00
Ryan Dahl
735b9d50a3 Simplify state transitions in http.Client
Fixes new bug shown in test-http-allow-req-after-204-res.js pointed out by
Tom Carden <tom.carden@gmail.com>.
2010-11-29 14:21:51 -08:00
Ryan Dahl
85827bde34 Avoid cascading EADDRINUSE test failure
See note in test-securepair-client.js
2010-11-29 14:21:51 -08:00
Ryan Dahl
6057747e9e Improve HTTP debug messages 2010-11-29 13:53:35 -08:00
Ryan Dahl
1db59afb75 style 2010-11-29 08:57:40 -08:00
Ryan Dahl
7a7feb8cd3 Add note about EADDRINUSE to docs 2010-11-29 00:20:21 -08:00
Ryan Dahl
105501c195 test-fs-realpath: Don't ceate things in /tmp; use tmpDir 2010-11-29 00:10:37 -08:00
Ryan Dahl
97970b05fe Default to TLSv1 2010-11-28 23:24:32 -08:00
Ryan Dahl
bf89872306 style 2010-11-28 23:20:59 -08:00
Ryan Dahl
be2457aaca Use SSL_MODE_RELEASE_BUFFERS by default. 2010-11-28 21:03:41 -08:00
Ryan Dahl
8012f2cb7a Add some TODO items 2010-11-28 18:41:53 -08:00
Ryan Dahl
102b1d999d Add simple securepair client test 2010-11-28 18:40:50 -08:00
isaacs
a52f59b437 Use a proper tty test. 2010-11-27 11:36:34 -08:00
Tom Hughes
6285fac232 Allocations with new[] must be freed with delete[].
See http://valgrind.org/docs/manual/mc-manual.html#mc-manual.rudefn
2010-11-24 12:53:28 -08:00
Tom Hughes
7fcfb7b981 Fix memleak in ChildProcess:Spawn(). 2010-11-24 12:51:46 -08:00
Ryan Dahl
73318fa09d Upgrade V8 to 2.5.8 2010-11-24 01:03:06 -08:00
Nikhil Marathe
fa8ffaf9b2 cmake: Install v8 headers include/node 2010-11-23 23:33:20 -06:00
Nikhil Marathe
1b6b090cdc Use CMake's standard way to find Python.
Rather than have the python literal string, use CMake's find_package
to find actual python executable. This is more useful if you have
both Python 2 and 3 installed. CMake currently only supports python 2
and so will automatically find that version
2010-11-23 23:33:20 -06:00
Tom Hughes
14e6b07f63 cmake: Add cdash support. 2010-11-23 23:33:20 -06:00
Tom Hughes
342b8b2ed2 cmake: fix debian package description. 2010-11-23 23:33:20 -06:00
Daniel Gröber
ea29cb4e46 cmake cleanup
* Removed useless include_directories
 * Print ssl library path in build summary
 * ExternalProject also exists on 2.8.0
 * include pummel tests when testing with ctest
 * Moved tests.cmake to test/CMakeList.txt
 * Removed inconsistent, unnecessary condition in else
2010-11-23 23:33:19 -06:00
Tom Hughes
a530c23d96 cmake: Add wrapper Makefile and README. 2010-11-23 23:33:19 -06:00
Ryan Dahl
b57c1f51b9 Saner, yet still ugly, fix to displaying syntax errors 2010-11-23 18:46:13 -08:00
Ryan Dahl
a6f6532dfb Fix test-securepair-server 2010-11-23 18:30:52 -08:00
isaacs
a2b3c865c9 Correct reference to "process.Module" 2010-11-23 14:09:59 -08:00
Wade Simmons
03e5da8429 Fix ErrnoExceptions that have the wrong syscall name 2010-11-23 14:09:16 -08:00
Ryan Dahl
4f32a59307 Fix buffer.slice(0, 0) 2010-11-23 12:20:22 -08:00
Ryan Dahl
f123a1ab40 hack to display syntax errors. FIXME 2010-11-22 17:55:04 -08:00
Tom Hughes
446beebd79 Add cmake build support.
Squashed commit of ca128f7dcd with
contributions from Mark Constable (markc@renta.net) and Daniel Gröber
(darklord@darkboxed.org).
2010-11-22 13:32:49 -08:00
isaacs
b52b4196ab Fix problem with requireNative not exporting 'module' object
Broke require('constants'). Add unrelated test which breaks it.
2010-11-22 11:55:31 -08:00
Ryan Dahl
12554380d5 Add support for SSDP methods -_- 2010-11-21 21:44:23 -08:00
Ryan Dahl
d695486185 Upgrade http-parser 2010-11-21 21:39:14 -08:00
Ben Noordhuis
b64791c7e4 Fix c-ares bug: reply to a CNAME query
doesn't contain addresses, causing ares_parse_a_reply() to bail out with
ARES_ENODATA.
2010-11-21 20:54:53 -08:00
Ben Noordhuis
611dffabb6 Support CNAME lookups in DNS module. 2010-11-21 20:53:57 -08:00
Jorge Chamorro Bieling
6aa92d5289 Apple's threaded write()s bug
fixes test/simple/test-fs-sir-writes-alot.js on mac
2010-11-21 20:44:48 -08:00
Ryan Dahl
7b2f5ab7f8 Fix mac build 2010-11-21 20:33:04 -08:00
Ben Noordhuis
f0b8cc6a94 require() should work with node --eval.
with tests

Fix module path resolve bug.  Normally the module path is taken from
realpath(__filename) but with eval there is (of course) no filename
2010-11-21 20:24:26 -08:00
Nikhil Marathe
7a3971e433 Use sys.executable to call python 2010-11-21 19:27:23 -08:00
Ben Noordhuis
80b5a52217 Fix compiler warnings. 2010-11-21 19:11:05 -08:00
Ben Noordhuis
a87172f9b2 Compile with -Wno-unused-parameter -D_FORTIFY_SOURCE=2 2010-11-21 19:07:27 -08:00
Marco Rogers
5749f91814 Docs for util.inherits 2010-11-21 19:03:23 -08:00
Herbert Vojčík
3422263414 requireNative made independent on module system 2010-11-21 18:17:44 -08:00
Ryan Dahl
f6479f2fb6 Print deprecation warning on process.compile 2010-11-21 15:22:08 -08:00
Ryan Dahl
a16b3c3148 Use runInNewContext instead of process.compile 2010-11-21 15:16:02 -08:00
Ryan Dahl
b1088d6bd2 Load 'path' module with requireNative
(now that requireNative does not depend on path module)
2010-11-21 15:07:38 -08:00
Ryan Dahl
bb6d468dd8 requireNative doesn't depend on rest of module system 2010-11-21 15:06:20 -08:00
Silas Sewell
11b2ee7632 Various doc tweaks (2-spaces vs tabs, EOL-whitespace, repl prompt, "world" vs "World", etc...) 2010-11-21 14:33:09 -08:00
Ryan Dahl
c11f3f8b0f simplify lazy constant loading 2010-11-21 14:20:22 -08:00
Ryan Dahl
6063ea62df fix style in path.js 2010-11-21 14:15:46 -08:00
Ryan Dahl
5890272538 Print friendly error message when main module is ENOENT 2010-11-21 13:58:47 -08:00
Ryan Dahl
c321e9893d stream.pipe should remove listeners on dest close 2010-11-20 23:08:45 -08:00
Ryan Dahl
2320497992 Revert "Merge branch 'writev'"
This reverts commit cd9515efd9, reversing
changes made to df46c8e698.

Too slow. Needs more work.
2010-11-20 20:55:15 -08:00
Ryan Dahl
794e7be4f8 Revert "Actually don't need to limit sendmsg size on unix - seems okay."
This reverts commit 464ced4a86.
2010-11-20 20:45:30 -08:00
Ryan Dahl
d42098651b Revert "fd_to_send needs to be cleared if *any* data was sent"
This reverts commit a93634007a.
2010-11-20 20:45:22 -08:00
Marco Rogers
118b88e44f update repl to distinguish JSON.parse SyntaxErrors from the rest 2010-11-20 20:36:14 -08:00
Ryan Dahl
56074d1056 Inline Buffer::Length and Buffer::Data 2010-11-20 00:04:22 -08:00
Ryan Dahl
a93634007a fd_to_send needs to be cleared if *any* data was sent 2010-11-19 23:05:13 -08:00
Ryan Dahl
464ced4a86 Actually don't need to limit sendmsg size on unix - seems okay. 2010-11-19 22:52:20 -08:00
Ryan Dahl
15d5378684 Add failing test for TLS server 2010-11-19 13:28:13 -08:00
Ryan Dahl
d722c8df73 Add some comments to securepair 2010-11-19 13:02:14 -08:00
Ryan Dahl
7515360951 fix style for SecureStream::IsInitFinished 2010-11-19 12:58:00 -08:00
Ryan Dahl
cbdcc1d5f3 Upgrade V8 to 2.5.7 2010-11-19 10:49:09 -08:00
Nikhil Marathe
f11291a220 Added documentation for Stream.pipe 2010-11-19 10:09:01 -08:00
Ryan Dahl
9c29ac6feb Fix style 2010-11-19 10:05:41 -08:00
Brian White
952bbb86b5 Fix OpenSSL SSL_library_init function check on OpenBSD. 2010-11-18 21:47:15 -08:00
Ryan Dahl
296802c641 Update TODO 2010-11-18 16:57:46 -08:00
Ryan Dahl
cd9515efd9 Merge branch 'writev' 2010-11-18 16:49:39 -08:00
Ryan Dahl
1f18648394 Fix typo 2010-11-18 16:47:38 -08:00
Ryan Dahl
2ba3c10d62 Only try to flush big buffers once 2010-11-18 16:47:38 -08:00
Ryan Dahl
849792e46b Add todo about test-pipe.js and throwing on resume() 2010-11-18 16:47:38 -08:00
Ryan Dahl
544877d12e Fix socket.end() problem on non-empty queue 2010-11-18 16:47:38 -08:00
Ryan Dahl
0b1214c16b Fix a bug regarding queueSize, add asserts 2010-11-18 16:47:38 -08:00
Ryan Dahl
3884b4185a Small clean ups 2010-11-18 16:47:38 -08:00
Ryan Dahl
02039c9b53 'connect' event may disconnect socket 2010-11-18 16:47:38 -08:00
Ryan Dahl
42357645cb Dump after ev_loop 2010-11-18 16:47:38 -08:00
Ryan Dahl
d3fbe3e3d1 Emit drain and stop IOWatcher even on empty buffer 2010-11-18 16:47:38 -08:00
Ryan Dahl
fa556a1425 Add callback to socket.write(), fix test-sendfds 2010-11-18 16:47:38 -08:00
Ryan Dahl
a6d8425382 make sure unix sockets are tagged correctly 2010-11-18 16:47:38 -08:00
Ryan Dahl
5d6a03c9fe Don't append buckets of zero length 2010-11-18 16:47:38 -08:00
Ryan Dahl
10ff559ec3 Add IOWatcher.flush()
To be called if sockets get too much data. This is to force a flush before
the tick ends.
2010-11-18 16:47:37 -08:00
Ryan Dahl
7c3c5c6861 Maintain queueSize for each socket 2010-11-18 16:47:37 -08:00
Ryan Dahl
5a84461e46 Also do ondrain callback for socket (needed by http) 2010-11-18 16:47:37 -08:00
Ryan Dahl
e1250a3333 Reset _eof on socket reuse 2010-11-18 16:47:37 -08:00
Ryan Dahl
5ba0be6166 Don't send null data segments 2010-11-18 16:47:37 -08:00
Ryan Dahl
d74c506044 Support encoding 2010-11-18 16:47:37 -08:00
Ryan Dahl
dcc547d798 Dumper net.js integration 2010-11-18 16:47:37 -08:00
Ryan Dahl
913789da3e IOWatcher::Dump(), writev 2010-11-18 16:47:31 -08:00
Ryan Dahl
df46c8e698 Rip out the old TLS implementation 2010-11-18 16:46:37 -08:00
Ryan Dahl
2a750bffcc Add tests for querystring.unescapeBuffer 2010-11-18 16:22:14 -08:00
Oleg Efimov
8b980d729c Fix line wrapping in docs. Add tics for constants in docs text. 2010-11-18 15:41:15 -08:00
Stéphan Kochen
57eb5cb9a0 Make SlowBuffer pass Buffer.isBuffer test. 2010-11-18 15:36:09 -08:00
Ryan Dahl
6ff12c425e Add querystring.unescapeBuffer 2010-11-18 15:18:06 -08:00
Ryan Dahl
57d8172906 query-string unescape moved to js land 2010-11-18 15:12:31 -08:00
Ryan Dahl
2219c64a04 fix race in test-http-big-proxy-responses.js 2010-11-18 13:50:54 -08:00
Brian White
5908bdab9a Make sure raw mode is disabled when exiting a terminal-based REPL. 2010-11-17 18:45:34 -08:00
Ryan Dahl
bce092aeb8 Remove leading comma examples 2010-11-17 18:25:14 -08:00
Micheil Smith
57de0b11db Remove jQuery from project 2010-11-17 17:57:58 -08:00
Ryan Dahl
9f1b27bf76 Add doc TODOs 2010-11-17 17:50:00 -08:00
Micheil Smith
8d27393aa2 Generate Table of Contents at compile time. 2010-11-17 17:38:54 -08:00
Dan Søndergaard
8591057fa3 Better description of lstat(). Wrapped all lines. 2010-11-17 16:11:51 -08:00
Tim Cooijmans
d4b726a1a6 fix utils.inspect's detection of circular structures 2010-11-17 16:06:17 -08:00
Ryan Dahl
9da29a6109 Fix links 2010-11-17 14:51:06 -08:00
Ryan Dahl
241ea7e595 Simplify next tick logic by looping around ev_loop
This is also in preparation for the writev patch, which needs to dump
remaining data after ev_loop ends.
2010-11-17 13:22:11 -08:00
Ryan Dahl
17307e386e Fix doc links 2010-11-17 09:39:26 -08:00
Ryan Dahl
c87b7b7c69 Now working on v0.3.2-pre 2010-11-17 09:31:51 -08:00
Ryan Dahl
ce9a54aa1f Bump version to v0.3.1 2010-11-16 19:17:44 -08:00
Ryan Dahl
03fa258df7 Revert "Upgrade V8 to 2.5.6"
This reverts commit 564a48643b.

Breaks cygwin
2010-11-16 19:14:14 -08:00
Ryan Dahl
cea3a95f9f Add ref to buffer during fs.write and fs.read
There was the possibility the buffer could be GCed while the eio_req was
pending.  Still needs test coverage for the fs.read() problem.

See:
http://groups.google.com/group/nodejs/browse_thread/thread/c11f8b683f37cef
2010-11-16 16:26:55 -08:00
Ryan Dahl
cf05257fb7 Test for server.listen() more carefully, fix bug 2010-11-16 15:33:21 -08:00
Ryan Dahl
a01e09502e scp should copy the right dir 2010-11-15 22:25:09 -08:00
Ryan Dahl
9bf93de532 Update TODO 2010-11-15 22:18:52 -08:00
Ryan Dahl
84a5a69d9f Fix doc links on index.html 2010-11-15 20:34:15 -08:00
Ryan Dahl
e5cc6388cb Docs for server.address() 2010-11-15 20:26:46 -08:00
Ryan Dahl
90d1e47323 make doc improvements 2010-11-15 20:23:14 -08:00
Ryan Dahl
4144024e6b Test and fix for self-assigned port from net.Server 2010-11-15 20:22:54 -08:00
Micheil Smith
939fba40fd Better doc indexes, fix some links 2010-11-15 19:59:21 -08:00
Micheil Smith
ade8cf96e0 Build API page into build/doc; simplify doctool. 2010-11-15 19:49:52 -08:00
Ryan Dahl
879a9e0548 solaris -> sunos 2010-11-16 03:23:47 +00:00
Ryan Dahl
702a923da7 Fix docs for vm module 2010-11-15 19:21:56 -08:00
Ryan Dahl
473721979d Print warning when using platform_none.cc 2010-11-16 03:19:01 +00:00
Ryan Dahl
00a1d61cc8 Fix OS::GetExecutablePath for platform_none 2010-11-16 03:06:18 +00:00
Ryan Dahl
8b1082825c Rename require('javascript') to require('vm') 2010-11-15 18:37:27 -08:00
Ryan Dahl
183f6c2077 Add .node_moudles to lookup path again 2010-11-15 11:21:48 -08:00
Ryan Dahl
a375c6ae9a Revert node_module lookup commits
Revert "Add ~/.node_modules as well as ~/.node_libraries"

This reverts commits
5e14c8bec0.
b0adaff67e.
492fc0d752.
2010-11-15 11:20:49 -08:00
Ryan Dahl
19ed02b286 Fix docs for 'javascript' module 2010-11-15 00:51:01 -08:00
isaacs
d39d3cec65 Make the javascript module API nodey.
Add a createScript function, and put stuff on exports instead of hiding
it in exports.Script.
2010-11-15 00:44:08 -08:00
Ryan Dahl
6b71e0b038 Remove RonnJS not used anymore 2010-11-15 00:43:53 -08:00
Ryan Dahl
0b7fb01e67 Remove old TODO 2010-11-14 23:44:34 -08:00
Ryan Dahl
d7e7161b27 Add small crappy manpage (please improve) 2010-11-14 23:12:43 -08:00
isaacs
9996b459e1 Implement new path.join behavior
1. Express desired path.join behavior in tests.
2. Update fs.realpath to reflect new path.join behavior
3. Update url.resolve() to use new path.join behavior.
2010-11-14 22:49:26 -08:00
Ryan Dahl
25eecd179b Fix configure on x86 2010-11-14 22:46:26 -08:00
Micheil Smith
a6c3d7121b Reworked and cleaned up documentation for Events 2010-11-14 13:52:34 -08:00
Micheil Smith
f9ad171085 Added documentation for which module to require to use the methods defined in that documentation 2010-11-14 13:52:34 -08:00
Micheil Smith
09e60aa435 A few changes to the style, specifically for h3 + h3 2010-11-14 13:52:34 -08:00
Micheil Smith
17595b5343 Various changes to Net Documentation, ammended style for API. 2010-11-14 13:52:31 -08:00
isaacs
589e27948b writeFile fixes
writeFileSync could exhibit pathological behavior when a buffer could
not be written to the file in a single write() call.

Also, writeFile was not quite as optimized as it could be.
2010-11-14 01:43:30 -08:00
Ryan Dahl
d787a444c5 Use require('javascript') instead of process.binding('evals') 2010-11-13 15:19:15 -08:00
Ryan Dahl
bc0118e519 Remove process.compile from docs 2010-11-13 15:08:09 -08:00
Ryan Dahl
b842fbd602 Update gitignore for new docs 2010-11-13 15:02:18 -08:00
Ryan Dahl
320e0020a2 fix 'make doc' 2010-11-13 14:59:15 -08:00
Bert Belder
e129630e9e Fix V8 build on Cygwin 2010-11-13 14:38:25 -08:00
Ben Noordhuis
5d80bdb6ae Add --profile flag to configure script, enables gprof profiling. 2010-11-13 14:34:45 -08:00
Rasmus Andersson
e5a0fbe500 Added support for cross compilation and also fixed DEST_CPU to represent the canonical symbols dictated by v8 2010-11-13 14:29:59 -08:00
Ryan Dahl
de6e88c428 Fix segfault on test-crypto
Plus random cleanups. This code needs help.
2010-11-13 14:26:42 -08:00
Ryan Dahl
8e09b1e2e1 Simplify REPL displayPrompt
Now that we insert \r into the stream and aren't switching back and forth
between termios modes, not need to worry about when to display the prompt.
2010-11-12 14:39:42 -08:00
Ryan Dahl
564a48643b Upgrade V8 to 2.5.6 2010-11-11 22:42:06 -08:00
Ryan Dahl
d4af8a6b6a Add writeFilter when in the readline
Switch \n with \r\n for all strings printed out.
Necessary for writev patch.
2010-11-11 22:37:17 -08:00
Ryan Dahl
c7b24efd21 Move ev_loop out of javascript 2010-11-11 16:34:26 -08:00
Ryan Dahl
4b4d4afa0a joyent-ize website 2010-11-11 16:34:11 -08:00
Ryan Dahl
06267f4d8d Remove -e from echo in test. Non-portable 2010-11-10 22:32:26 -08:00
Ryan Dahl
d23643051e Upgrade http-parser again 2010-11-10 22:12:47 -08:00
Ryan Dahl
8285f12864 Upgrade http-parser 2010-11-09 15:02:18 -08:00
Ryan Dahl
c6029c75a4 Remove util.print from docs
Use process.stdout.write()
2010-11-07 17:22:56 -08:00
Guillaume Tuton
07da49b095 Set FD_CLOEXEC flag on stdio FDs before spawning.
With regression test.
2010-11-07 13:07:14 -08:00
Ryan Dahl
a3750a9833 Remove unnecessary ref/unref in iowatcher cb 2010-11-05 17:38:02 -07:00
Ben Noordhuis
b4def4806c Make writes to process.env update the real environment. Tests included. 2010-11-03 12:15:07 -07:00
Ryan Dahl
029180a93c Install node-waf 2010-11-03 09:02:54 -07:00
Ryan Dahl
6ce007e89a Remove warning in 'sys' - too aggressive 2010-11-02 21:20:28 -07:00
Ryan Dahl
515f006b6e Add legacy methods to Buffer 2010-11-02 10:09:59 -07:00
Ryan Dahl
07812c47a4 Add test for http-buffer problem
Already fixed in 7e24a05cba
2010-11-01 18:23:13 -07:00
Ryan Dahl
97c9745063 Back to WAF
Too much instability right now. Hopefully we can revisit autoconf soon.
2010-11-01 16:51:20 -07:00
Ryan Dahl
41c1563584 Remove old buffer api 2010-11-01 14:59:30 -07:00
Ryan Dahl
f1391f33cd Add missing require('fs') 2010-11-01 14:56:21 -07:00
Ryan Dahl
ea78d995e0 Upgrade V8 to 2.5.3 2010-11-01 14:10:35 -07:00
Ryan Dahl
fd725efa8f Add execinfo to freebsd LINKFLAGS 2010-11-01 13:36:03 -07:00
Ben Noordhuis
7a7e88d44b Fix 'undefined symbol' errors when loading native modules. 2010-11-01 12:57:28 -07:00
Oleg Efimov
6bf97808ee Add node headers installation 2010-11-01 09:58:21 -07:00
Oleg Efimov
fac6db1b56 Add DESTDIR support to Makefile 2010-11-01 09:57:27 -07:00
Chandra Sekar S
2b08bacd56 Removed range read optimization as it doesn't work with libeio. 2010-11-01 08:28:57 -07:00
Ryan Dahl
2fa260cef6 Clean up 'make clean' 2010-10-31 19:31:31 -07:00
Ryan Dahl
ae802e3867 Improper use of CFLAGS 2010-10-30 17:03:26 -07:00
Ryan Dahl
7c90ff5d41 Add configure --enable-debug to make it build both 2010-10-30 16:11:30 -07:00
Ryan Dahl
5e11b8a937 De-indent dns.lookup 2010-10-30 13:31:51 -07:00
Ryan Dahl
9c2969253b Make sure watcher.set() isn't being called when active 2010-10-30 12:52:53 -07:00
Ryan Dahl
016fdab43e Fix argv[6] comment in node_file 2010-10-30 12:04:30 -07:00
Micheil Smith
98e7d3506f Rewrite libeio After callback to use req->result instead of req->errorno for error checking 2010-10-30 11:45:43 -07:00
Ryan Dahl
ef9e716fd1 Delete libv8 in 'make clean' 2010-10-30 11:14:18 -07:00
Ryan Dahl
268bcbde7c Upgrade V8 to 2.5.2 2010-10-30 11:13:37 -07:00
Ryan Dahl
ccdd979a69 Changes to compile on solaris 2010-10-30 11:03:42 -07:00
Ryan Dahl
7a48fd8455 Handle null values in clearTimeout 2010-10-29 00:00:43 -07:00
Ryan Dahl
fa7dcbec8b Install node-waf 2010-10-28 19:43:36 -07:00
Ryan Dahl
9bea4c8d58 X the node-repl script 2010-10-28 19:41:44 -07:00
Micheil Smith
818e56d44b Disable make manpage, this is broken and can prevent node from installing correctly. 2010-10-28 17:17:04 -07:00
Ryan Dahl
23927751eb Fix make doc 2010-10-28 15:14:19 -07:00
Micheil Smith
a6f246b9f5 Removing the old doc templates, and doc javascript 2010-10-28 15:02:41 -07:00
Micheil Smith
c9f656baa9 More simplification of the templating & rendering. 2010-10-28 14:59:15 -07:00
Micheil Smith
d4f1e6a023 Added a single page version, moved index to be standard page. 2010-10-28 14:59:15 -07:00
Micheil Smith
c032350f64 Adding build tools & templates/assets 2010-10-28 14:59:15 -07:00
Micheil Smith
e190c9616e Splitting documentation 2010-10-28 14:59:15 -07:00
Ryan Dahl
1eb547fec1 Lazy load modules in net.js 2010-10-28 13:15:53 -07:00
Ryan Dahl
5171da5a6c Remove a little redundancy 2010-10-28 13:11:42 -07:00
Ryan Dahl
65dced730f Handle one more onReadable call from crypto
MUST get rid of this calledByIOWatcher stuff. Hopefully will be able to when
securepair stuff lands.
2010-10-28 12:34:48 -07:00
Ryan Dahl
73cfda12bb Abstract out a Server.prototype.pause method 2010-10-28 11:42:22 -07:00
Ryan Dahl
ad61d77fa3 Abstract out net.Server.prototype._rejectPending
Does the same timeout action for maxConnections as it does for EMFILE.
2010-10-28 11:33:35 -07:00
Jonas Pfenniger
74d0a077ec Module-level EMFILE handling
All net servers now share the same dummy socket. The ulimit warning is
throttled for all servers.
2010-10-28 11:12:59 -07:00
Rasmus Andersson
899fffa395 Build system improvements: (cross compilation, libnode, etc)
- utilizing autoconf configure.guess to output canonical $target_{cpu,vendor,os}
- normalizing $target_cpu --> $arch according to v8 naming scheme
- normalizing $target_os --> $platform according to v8 naming scheme
- renamed c-ares platform-arch directories to represent v8 canonical names
- new targets in Makefile: libnode-{static,dynamic}[-debug]
- scons is symbolized as SCONS in Makefile for portability/flexibility.
- LINKFLAGS inherith from LDFLAGS ("magic" variable exported by autoconf and configure).
- When building on OS X, CFLAGS and LDFLAGS will contain appropriate -arch flag, set up by configure (instead of the Makefile).
- libv8.a make targets cleaned up with unison libv8_flags set of flags.
- the clean make target now cleans up libraries (libv8, libnode, etc).
- added config.guess, config.sub and install-sh (utilized by autoconf/configure)
2010-10-27 17:15:32 -07:00
isaacs
987cbbc191 Handle cyclic links smarter in fs.realpath
Rather than aborting in the face of *any* repeated link in a given path,
instead only abort if such a cycle actually makes a given path unresolvable.

Test for this by doing a normal stat.  Still use the seenLinks object to
cache link contents so as to cut own a little bit on readlink calls.

Also add a pathological test that fails without the change to fs.js.
2010-10-27 17:02:42 -07:00
isaacs
4c514a723c Let exit listeners know the exit code 2010-10-27 16:54:10 -07:00
Jorge Chamorro Bieling
fd70d30a9c make "node --eval" eval in the global scope. 2010-10-27 16:52:53 -07:00
Ryan Dahl
67652ddf27 Refactor callbacks in net.Stream for fewer closures 2010-10-27 16:43:16 -07:00
Ryan Dahl
38dde9684f Add extra anti-DoS tech to net.Server 2010-10-27 12:09:16 -07:00
Ryan Dahl
aeb9bed63e Improve idle benchmarks 2010-10-27 02:52:49 -07:00
Ryan Dahl
ac54272218 Gracefully handle EMFILE
Implementing a tip from Marc Lehmann:
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#The_special_problem_of_accept_ing_wh

Keep an extra FD around for every server. When you hit EMFILE, destroy that
FD, accept a connection, close it; in this way you can clear the connection
queue and let people know that you're overload.

No more timeout needed.
2010-10-27 02:12:25 -07:00
Tim-Smart
79ecc8e9b7 Style changes. 2010-10-26 18:47:46 -07:00
Ryan Dahl
bc47353bbe Use the timer list for setTimeout 2010-10-26 14:53:18 -07:00
Ryan Dahl
79944006e2 Move setTimeout and friends into timers module 2010-10-26 14:53:17 -07:00
Ryan Dahl
5cc29b80f2 Move idle timers into its own module 2010-10-26 14:53:17 -07:00
Ryan Dahl
dcc4fffe4d Add C++ API for constructing fast buffer from string 2010-10-26 13:43:58 -07:00
Ryan Dahl
d1e5fbdde4 Remove old TODOs 2010-10-26 11:33:18 -07:00
Ryan Dahl
72aee8216c Fix permissions on http.js 2010-10-26 11:31:01 -07:00
Ryan Dahl
9bbc7e0bc7 Remove old todo 2010-10-26 01:10:32 -07:00
Ryan Dahl
2470d2ee92 allowHalfOpen disabled by default
Users too often would forget to add

  socket.on('end', function () {
    socket.end();
  });

Which is a mistake. Therefore we default to this behavior and
only optionally let people handle the 'end' case themselves.
2010-10-26 01:10:18 -07:00
Ryan Dahl
a7b4af0ae5 create directories during configure 2010-10-25 19:52:58 -07:00
Ryan Dahl
5175864c0e exec instead of sh a the configure.real script 2010-10-25 19:52:35 -07:00
Ryan Dahl
43022eabf7 more configure hackery 2010-10-25 18:33:15 -07:00
Ryan Dahl
eaba4fc2bf Ignore configure.real 2010-10-25 18:24:48 -07:00
Ryan Dahl
5cf4ceff59 add configure 2010-10-25 18:21:45 -07:00
Ryan Dahl
583c07bf8b fix style 2010-10-25 17:30:08 -07:00
Paul Querna
97977640bd Set the readable variables on the read/write streams
and add more debug() calls to make it easier to see the flow
2010-10-25 17:28:21 -07:00
Paul Querna
1128c0bf67 Add SecurePair for handling of a ssl/tls stream. 2010-10-25 17:26:58 -07:00
Paul Querna
6ea61acf29 remove old todo. 2010-10-25 17:26:44 -07:00
Paul Querna
1ce4684a27 Centralize error handling in SecureStream
and add a start method, to kick off SSL handshaking, without writing a zero
byte buffer
2010-10-25 17:26:03 -07:00
isaacs
446d2ec19c Add make install 2010-10-25 13:43:09 -07:00
Micheil Smith
8da020d39e Update node_net.cc to make us of node_constants.cc
also affects dgram which uses a constant from node_net.cc
2010-10-25 12:14:47 -07:00
Paul Querna
9977831078 Add HAVE_OPENSSL flag to makefile 2010-10-25 10:28:14 -07:00
Ryan Dahl
7eed71f8bb add todo about half-open connections 2010-10-24 20:11:47 -07:00
Ryan Dahl
fcd0c3ebc0 Remove test-base64-bigfile
Already tested in test/simple/test-buffer.js. Takes too long, uses too much
memory.
2010-10-24 19:21:12 -07:00
Ryan Dahl
15594eaf87 Replace WAF with make/autoconf 2010-10-24 18:39:36 -07:00
Ryan Dahl
bb85e7751f Now working on v0.3.1 2010-10-23 16:01:37 -07:00
Ryan Dahl
1582cfebd6 bump version to 0.3.0 2010-10-23 16:00:15 -07:00
Ryan Dahl
477df1aaec Revert "Add some failing tests for path.join"
This reverts commit 8c0e87f9c3.

(Revert until fix comes)
2010-10-23 15:35:58 -07:00
Ryan Dahl
38f117cb6d one more 'listening' race condition 2010-10-23 14:26:31 -07:00
Ryan Dahl
44234e9cc7 Fix a few 'listening' race conditions
in
test-net-timeout
test-http-client-parse-error
2010-10-23 14:13:04 -07:00
Ryan Dahl
0ac2ef924f Do not spin on aceept() with EMFILE
When a server hit EMFILE it would continue to try to accept new connections
from the queue. This patch introduces a timeout of one second where it will
stop trying to accept new files. After the second is over it tries again.

This is a rather serious bug that has been effecting many highly concurrent
programs. It was introduced in 4593c0, version v0.2.0.

TODO: A test for this situation. Currently I test it like this

  termA% cd projects/node
  termA% ulimit -n 256
  termA% ./node benchmark/idle_server.js

  termB% cd projects/node
  termB% ./node benchmark/idle_clients.js

And watch how the server process behaves.
2010-10-23 12:28:20 -07:00
Ryan Dahl
9bf2975f78 Make sure Error object on exec() gets killed member
Also default to SIGTERM for destruction when exceeding timeout or buffer on
exec()
2010-10-23 11:37:40 -07:00
Ryan Dahl
d9a5edb2b0 Fix test-net-eaddrinuse 2010-10-23 11:22:24 -07:00
Stéphan Kochen
dd52737476 Provide a C++ Buffer constructor for external storage.
In order to do this, buffer data management was moved out of the
JS entry-point New, and into Replace.

Secondly, the constructor makes an immediate call to Replace, and
in order for ArrayData calls to work, wrapping must already be set
up. Now, the constructor takes the wrappee as a parameter.
2010-10-22 16:52:14 -07:00
Stéphan Kochen
b3e60c7b25 Generalize Buffer::Copy to work with all unsigned byte external data. 2010-10-22 13:47:10 -07:00
Stéphan Kochen
d5e966154c Simplify things by using *ArrayData everywhere. 2010-10-22 13:32:48 -07:00
Stéphan Kochen
d9b08d66d6 Remove old interface remains from Buffer.
These were all lacking implementation, so deprecating wouldn't help.
2010-10-22 13:32:31 -07:00
Ryan Dahl
b2969a9155 Don't call AtExit twice 2010-10-22 10:17:38 -07:00
Vitali Lovich
fb8830a64f Fix parsing of linux memory
If process name contains a space, this parsing fails for no good reason.
2010-10-22 10:14:19 -07:00
Ryan Dahl
604f4fdf8c Write write.txt into the tmpdir 2010-10-22 10:02:30 -07:00
Ryan Dahl
92c5634cbd Remove a confusing sentence in the docs 2010-10-21 17:32:13 -07:00
Jorge Chamorro Bieling
99e19aa398 Remove unneeded function wrappers 2010-10-21 17:11:59 -07:00
Ryan Dahl
174a3a9a08 Upgrade libev to 4.00 2010-10-21 15:38:32 -07:00
Ryan Dahl
3b861db31d Upgrade V8 to 2.5.1 2010-10-21 15:22:38 -07:00
Ryan Dahl
2629296c25 Add isatty for isaacs 2010-10-21 12:34:37 -07:00
Ryan Dahl
ceb5331a64 Force exit on SIGINT but still reset flags on stdio fds
Add test that one can ctrl+c out of a script spinning infinitely.
2010-10-21 12:28:04 -07:00
Ryan Dahl
33e45bbe46 Add incomplete R plot file 2010-10-20 21:28:49 -07:00
Ryan Dahl
6570cd99e5 Fix execFile timeouts, improve tests
It seems that a parent will not get a SIGCHLD if the child is killed by the
parent? It's unclear, so make 'exit' callback manually.
2010-10-20 19:20:52 -07:00
Ryan Dahl
5a98fa4809 ChildProcesses cannot be killed if pid is missing 2010-10-20 17:55:25 -07:00
Tom Hughes
78da9cb052 Add --max-stack-size flag.
v8 doesn't expose a command-line flag to set the stack size, so this
adds a new flag that node understands how to handle and uses v8's
ResourceConstraints API.
2010-10-20 15:57:13 -07:00
isaacs
5e14c8bec0 Add ~/.node_modules as well as ~/.node_libraries 2010-10-20 15:46:13 -07:00
isaacs
b0adaff67e require looks in node_modules folders
for modules starting with the __dirname and moving up.

This makes it much easier to localize dependencies to a particular program.
2010-10-20 15:45:47 -07:00
isaacs
bfc6b51d95 The cwdRequire hack is no longer necessary with the require.resolve refactor. 2010-10-20 15:22:02 -07:00
isaacs
492fc0d752 Split out modulePaths and defaultPaths
This way, the "default" paths of ~/.node_libraries and {prefix}/lib/node are only checked *after* anything that the user has placed into the NODE_PATHS environ, or pushed onto require.paths.

This makes require.paths a much more effective write-target, albeit slightly less useful as a read-target.  However, given the existence of require.resolve(), this is less of an issue -- if you want to know what a module ID will map to, just ask that question and get an authoritative answer from the loading machinery.
2010-10-20 15:21:33 -07:00
isaacs
b0aadbea6b Docs for require.resolve 2010-10-20 15:20:04 -07:00
Ryan Dahl
8c0e87f9c3 Add some failing tests for path.join 2010-10-20 13:03:49 -07:00
Aaron Heckmann
bd8e4f656e Prevents child_process.exec timeouts from throwing when the child was previously killed. 2010-10-20 12:46:51 -07:00
isaacs
226eff5104 Add require.resolve.
Also, hack the repl so that it works as expected there, too.
2010-10-20 12:12:07 -07:00
Ryan Dahl
3407dab07f Remove old references to old 'stream' event 2010-10-20 11:10:43 -07:00
Nikhil Marathe
179a7f6ffa Added documentation of EventEmitter.once 2010-10-20 11:09:40 -07:00
Ryan Dahl
a313f38c34 use bash instead of sh in http_simple_bench.sh 2010-10-18 17:48:49 -07:00
Ryan Dahl
1b2f6f9e29 Upgrade V8 to 2.5.0 2010-10-18 17:13:30 -07:00
Johan Euphrosine
5d400cfd3a net listen should emit eaddrinuse error 2010-10-18 17:00:13 -07:00
Mark Nottingham
b14eeb3c1e Fix expect/continue keepalive 2010-10-18 15:38:46 -07:00
Jorge Chamorro Bieling
c735b4663a unbase64 skips over *any* illegal chars 2010-10-18 15:22:10 -07:00
Ryan Dahl
40f675b64b Fix race conditions in test-http-upgrade-client2 2010-10-18 15:05:18 -07:00
Ryan Dahl
4adadc38f4 fix test-base64-bigfile for linux 2010-10-18 15:00:49 -07:00
Ryan Dahl
97255c2651 Fix test harness for Linux
Mostly just upgraded tools/test.py to the latest one that's in V8.  But also
fixing the before and after hooks to preserve the test/tmp directory so that
running tests manually usually works.
2010-10-18 14:54:39 -07:00
Sami Samhuri
56df0cbf93 new api for defining repl commands 2010-10-18 13:46:54 -07:00
AJ ONeal
74c8b5fd08 ./wscript: allow for cross-compiling of all three supported architectures 2010-10-18 11:39:56 -07:00
isaacs
25b5bc01a6 A big base64 file encoding/decoding test
Originally written to try to track down this bug report:
http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/13924

As it turns out, it's showing a completely different kind of failure.  When
the file is base64 encoded with the native program, then decoded with node,
it doesn't match the original.  Something's fishy.
2010-10-18 11:36:23 -07:00
Ryan Dahl
cf1db4f304 base64 decode should handle whitespace 2010-10-18 11:34:35 -07:00
Ryan Dahl
ccf2a04ea2 Install ev.h and eio.h 2010-10-17 22:57:40 -07:00
Peteris Krumins
a6ee3bac85 Add EventEmitter.prototype.once 2010-10-16 20:43:09 -07:00
Ryan Dahl
3cf4827ae0 Add idle connection test 2010-10-15 12:11:50 -05:00
Ryan Dahl
ff456b3886 Add 'make bench' script 2010-10-13 16:20:24 -07:00
Ryan Dahl
cdde22a27d Improve benchmark/http_simple.js 2010-10-13 14:30:50 -07:00
Nathan Rajlich
9b1ff070e6 Upgrade http-parser with a fix for spaces in headers 2010-10-13 02:47:10 -07:00
Joshua Peek
73b29d79b9 Don't flush net writeQueue on end() if its still connecting 2010-10-13 02:37:53 -07:00
Ben Noordhuis
045bd4c7a4 Preliminary pkg-config support. 2010-10-13 01:49:33 -07:00
Ryan Dahl
6691aca229 Allow people to set backlog. Need a better API. 2010-10-13 01:47:29 -07:00
Tom Hughes
f61b110cf6 Add signal handlers so we clean up before exiting.
Add SIGTERM and SIGINT signal handlers so that we run the exit handlers
before exiting when getting these signals. Fixes an issue where we
couldn't run vi after CTRL+C'ing node because the stdin fd was left
non-blocking.
2010-10-12 14:01:58 -07:00
Ryan Dahl
0fcb3bd3a9 Add .js to native script's filename 2010-10-12 11:54:45 -07:00
Ryan Dahl
c4636a578c Dynamically load native scripts 2010-10-12 11:49:41 -07:00
Ryan Dahl
901d5fd0d2 Don't require events in fs.js 2010-10-11 16:40:28 -07:00
Ryan Dahl
32aadd9400 fs.ReadStream and fs.WriteStream derive from stream.Stream 2010-10-11 16:39:40 -07:00
Ryan Dahl
8139bb24c1 Add destroy methods to HTTP messages
needs tests (particularly for pipeline situations)
2010-10-11 16:36:14 -07:00
Micheil Smith
372a7c9a3e Migrated from sys.p to console.dir 2010-10-11 16:21:45 -07:00
Micheil Smith
d2c47b4f87 Removed deprecated methods from lib/path.js 2010-10-11 16:21:21 -07:00
Micheil Smith
a3604cf233 Removed deprecated methods from lib/net.js 2010-10-11 16:20:08 -07:00
Micheil Smith
0e1a581916 Removed deprecated methods from lib/http.js 2010-10-11 16:20:08 -07:00
Micheil Smith
7bfefb5250 Removed deprecated methods from lib/fs.js 2010-10-11 16:20:08 -07:00
Micheil Smith
83db91be41 Removed deprecated alias to lib/fs.js 2010-10-11 16:20:04 -07:00
Micheil Smith
c1aa8ea944 Removed deprecated events.Promise 2010-10-11 16:16:18 -07:00
Ryan Dahl
ee8522996a Enable pipe test 2010-10-11 16:08:53 -07:00
Ryan Dahl
1879d8211d Remove sys in new tests 2010-10-11 16:07:18 -07:00
Ryan Dahl
7e24a05cba Fix test-http-buffer-sanity 2010-10-11 16:00:36 -07:00
Micheil Smith
e38eb0c5a4 Soft migration of sys -> util, Removal of deprecated utils module. 2010-10-11 15:21:36 -07:00
Ryan Dahl
0a0e90dcca Add broken test passing a buffer through http 2010-10-11 14:54:32 -07:00
Rasmus Andersson
50443f08e0 environ symbol fix for Mac OS X 2010-10-11 11:19:55 -07:00
Ryan Dahl
2944e03a03 Closer to a working pipe 2010-10-11 01:22:38 -07:00
Ryan Dahl
007881b648 No long have tcp module 2010-10-11 01:22:24 -07:00
Felix Geisendörfer
3cd09e7ba5 Stress test for http upload timeouts
This was meant to find a bug in setTimeout, but there doesn't seem to be
one. So this test can no help to prevent future regressions.
2010-10-11 00:25:48 -07:00
Ryan Dahl
1d3142a882 TCP clients should buffer writes before connection 2010-10-10 23:09:14 -07:00
Ryan Dahl
81ac0d5088 pipe-test fixes 2010-10-10 22:10:47 -07:00
Ryan Dahl
cdd1d675a7 Remove old tcp module 2010-10-10 20:57:33 -07:00
Ryan Dahl
393f0071e4 Improve pipe-test. Still not working 2010-10-10 20:18:47 -07:00
Ryan Dahl
8ab691726d clean up options.end code - wasn't working 2010-10-10 20:16:21 -07:00
Micheil Smith
1af52d28ca Changing http.js to use the same stream.Stream creation as net.js 2010-10-10 19:43:21 -07:00
Ryan Dahl
9d248f690a Fix return in Buffer::New 2010-10-10 19:24:33 -07:00
Ryan Dahl
0cf03ab800 Add char* constructor for Buffer 2010-10-10 19:08:51 -07:00
Ryan Dahl
bc695475b9 Add Stream base class with stream.pipe 2010-10-10 17:27:03 -07:00
Ryan Dahl
fe74283e1d Fix a few compiler warnings... 2010-10-09 16:04:38 -07:00
Ryan Dahl
a6017660d8 More clang fixes 2010-10-09 15:10:45 -07:00
Ryan Dahl
5dd08c6c71 Ugly fix for clang 2010-10-09 14:21:33 -07:00
Ryan Dahl
f23eb282c0 Fix style 2010-10-09 12:48:22 -07:00
Ryan Dahl
783f5019b0 Add flag to disable colors in REPL 2010-10-09 12:46:06 -07:00
Ryan Dahl
39b9043bef Use readline.columns in sys.inspect when possible
Though, this should probably be an option to sys.inspect and be set by REPL.
2010-10-09 12:40:17 -07:00
Ryan Dahl
d164989e3f Commas last in sys.inspect
Ugly? Yes. More readable by first time users? Yes.
2010-10-09 12:18:17 -07:00
Ryan Dahl
b5359e40be Warnings for new C++ buffer API 2010-10-09 12:15:16 -07:00
Sean Coates
ae87007478 add $ to variable name character matching patterns in repl completer 2010-10-09 10:04:13 -07:00
Ryan Dahl
634c4bf0b0 Add missing v8 file... 2010-10-09 00:56:37 -07:00
Ryan Dahl
f7a9eea0d4 Add config.h for cygwin for libev and libeio 2010-10-09 00:56:16 -07:00
Ryan Dahl
0003c701bc expose parsers freelist 2010-10-07 16:17:06 -07:00
Ryan Dahl
54e844cf08 add require.cache 2010-10-07 09:58:08 -07:00
Joshaven Potter
3d4e4d8909 syntax fixes to pass jslint 2010-10-06 20:40:57 -07:00
TJ Holowaychuk
9481bc1009 Added -e, --eval 2010-10-06 19:09:22 -07:00
Ryan Dahl
5986a582d9 #define HAVE_FDATASYNC 0 for darwin; 10.5 is missing it 2010-10-05 15:25:33 -07:00
Ryan Dahl
7fca101338 Upgrade V8 to 2.4.8 2010-10-05 15:25:07 -07:00
Ryan Dahl
dbf0d6bb70 ClearWeak on ObjectWraps. I /think/ this is the correct semantics 2010-10-04 12:52:46 -07:00
isaacs
8ff7954165 Fix #325. Add test and check for zero-length file contents in fs.readFileSync 2010-10-04 12:50:58 -07:00
Ryan Dahl
38f8665f3a lib/http.js - nested loop stepping on variables of outer loop
Fixes #318.
2010-10-04 10:50:37 -07:00
Ryan Dahl
48d7a1edc1 libev, libeio config.h files don't depend on arch 2010-10-02 15:07:54 -07:00
David Siegel
3faa3b56f3 libev libeio: added freebsd-x86 config headers 2010-10-02 06:44:55 -07:00
Ryan Dahl
29cc78f824 Simpler libev and libeio config 2010-10-02 06:44:55 -07:00
isaacs
e9b6b0b327 Report "weird" errors a little better.
There are a few kinds of errors that are very confusing.
1. Errors raised in nextTick
2. Errors emitted on the "error" event
3. RangeErrors that crash the program (or anything without a stack trace)

Long traces will make make these better, of course.  In the meantime, this
adds a few handy signposts (in the form of better error reporting and
comments on the otherwise inscrutable code printed to the terminal) that can
help new users find the cause, or at least, ask for help more effectively.
2010-10-02 06:44:28 -07:00
Mark Nottingham
d59512f6f4 Add support for handling Expect: 100-continue
HTTP/1.1 requests, either with an event (check_continue) or automatically, if no event handler is present.

Add client-side expect/continue support, tests.

Expound upon client requirements for expect/continue.
2010-10-01 15:30:53 -07:00
Marco Rogers
4a7562d28f fix encoding option on ReadStream, updated test 2010-10-01 15:16:25 -07:00
Ryan Dahl
c9627e0a0d Upgrade V8 to 2.4.7 2010-10-01 14:19:11 -07:00
Ryan Dahl
5829716649 Fix REPL crash on tabbing 'this.'
Thanks to Tim Becker for pointing this out.
2010-10-01 11:31:22 -07:00
Ryan Dahl
5a4c40beea Drop reference to timer callback on clearTimeout
Reported here:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/9e063d0938f99879

Would be good to test this somehow...
2010-10-01 11:16:51 -07:00
Evan Larkin
914ff78df6 fs.ReadStream: Passing null for file position on all reads except the first read of a range read. 2010-09-30 18:23:30 -07:00
Ryan Dahl
265cda97d7 Fix zero length buffer bug for http res.end()
Reported by Kadir Pekel <kadirpekel@gmail.com>
2010-09-30 17:13:01 -07:00
Mark Nottingham
1b24fc6678 Consume HTTP trailing headers 2010-09-30 16:30:40 -07:00
Evan Larkin
43ddc04bb0 No longer using the global variable "stat" in unwatchFile 2010-09-30 16:19:59 -07:00
Ryan Dahl
5cc1428d5f Remove unused function 2010-09-30 12:20:33 -07:00
Ryan Dahl
1a2c1c8a96 Simplify: per-module cache thing 2010-09-30 12:18:58 -07:00
Ryan Dahl
ee9af66990 Add test for getting parse error from HTTP client
Made this test in response to this thread:
http://groups.google.com/group/nodejs/browse_thread/thread/f82835007a277de2/
But Node appears to be working correctly.
2010-09-30 11:48:19 -07:00
Ryan Dahl
c3bc48d451 Move the http client's initParser() into prototype 2010-09-30 11:41:50 -07:00
Ryan Dahl
f323f34353 writeable -> writable 2010-09-29 16:12:30 -07:00
Ben Noordhuis
55c65cc2d5 Safe constructor for ObjectWrapped classes
New() methods should be invoked as constructors, not regular functions.
Corner cases like Script::New() may cause a SIGSEGV when the GC is run.

More details: http://groups.google.com/group/nodejs/browse_thread/thread/a7e5db68d4cd6356
2010-09-29 16:02:45 -07:00
Ryan Dahl
9911629de0 Fix style in node_crypto.cc 2010-09-28 19:17:09 -07:00
Ryan Dahl
163485c8aa Rename some SecureStream methods 2010-09-28 11:38:27 -07:00
Ryan Dahl
7bd94712a8 lazy load crypto binding 2010-09-28 11:27:13 -07:00
Ryan Dahl
d89f8dce28 fix style in net.js 2010-09-28 11:27:09 -07:00
Ryan Dahl
fe060916ec Put preprocessor defines into CPPFLAGS not compile flags... 2010-09-28 03:17:44 -07:00
Ryan Dahl
3a64c22cc1 Disable a few more libev features 2010-09-28 03:11:33 -07:00
Ryan Dahl
069d973d74 Remove require('buffer') in built-in libraries. 2010-09-28 02:31:31 -07:00
Aaron Heckmann
7c5cc57ece quicker loops 2010-09-28 01:14:58 -07:00
Ryan Dahl
f9d6b074cf output time of function calls 2010-09-28 01:14:38 -07:00
Ryan Dahl
353e2565d5 Fix timing on I/O benchmark 2010-09-25 18:19:50 +02:00
Ryan Dahl
3fc9192d0d Add function_call benchmark 2010-09-23 22:27:44 -07:00
Fedor Indutny
5535aa3d51 Fixed 'upgrade' event for httpclient
onend and ondata was cleaning on parser end
2010-09-23 10:29:20 -07:00
isaacs
4d0456f827 Don't use stat in fs.readFile[Sync]
Original patch c/o Evan Larkin <evan.larkin.iit@gmail.com>
2010-09-22 22:06:32 -07:00
Ryan Dahl
4df999f85f Revert "Upgrade V8 to 2.4.5"
This reverts commit e227441248.

Build fails on mac
2010-09-22 19:20:06 -07:00
Tj Holowaychuk
893ebe7230 Fixed fs.ReadStream() start: 0 bug 2010-09-22 10:22:43 -07:00
Ryan Dahl
e227441248 Upgrade V8 to 2.4.5 2010-09-22 10:21:15 -07:00
Mikeal Rogers
cc1d61cbb3 HTTP: close connection on connection:close header.
rnewson found a good bug in keep-alive. we were only using the request
headers we send to enable/disable keep-alive but when the server sends
Connection: close we need to close down the connection regardless.

I wrote up a patch the Robert verified makes all his test client code work
now and I also added a new unittest for it.
2010-09-22 10:17:07 -07:00
isaacs
dff1b5ad10 Don't try to run extension loaders unless they're actually functions 2010-09-22 10:13:25 -07:00
Ryan Dahl
9922e4e433 Don't choose jobs based on processor
Leads to lots of builds with out-of-memory.
2010-09-20 16:51:52 -07:00
Ryan Dahl
754fde7325 More explicit openssl configure warning 2010-09-20 12:52:07 -07:00
Ryan Dahl
1b1bee8099 Fix test/message/undefined_reference_in_new_context 2010-09-20 10:03:50 -07:00
Tim-Smart
0f16af7ee4 Remove registerExtension, add .extensions. Tests.
Updated extensions tests
2010-09-20 09:56:43 -07:00
Jorge Chamorro Bieling
fc334b3a97 sys.js: --needless Object.keys() --needless .map() in a single patch 2010-09-19 18:02:27 -07:00
Ryan Dahl
354150f4e1 Tag release versions in 'process.version' 2010-09-19 17:22:18 -07:00
isaacs
bb08f0c219 Remove require.async
This patch removes require.async from nodejs.

1. It complicated the code unnecessarily.
2. Everyone uses sync require anyway.
3. It's got a lot of weird edge cases when mixed with sync require.
4. It is many months behind the commonjs spec anyhow.
2010-09-19 16:52:39 -07:00
Paul Querna
2d348bb985 Fatal error out if OpenSSL was not explicitly disabled, we just couldn't autodetect it. 2010-09-19 15:32:10 -07:00
Ryan Dahl
27af64ef46 Forgot to include node_main.cc 2010-09-19 14:25:13 -07:00
Jorge Chamorro Bieling
8e246acd0e sys.js: sys.inspect: show function names 2010-09-19 13:37:09 -07:00
Ryan Dahl
1e63cd69f8 Update TODO 2010-09-19 13:32:46 -07:00
Ryan Dahl
124fbedc2f Add node::Start()
first step towards building a libnode.a
2010-09-19 13:13:59 -07:00
Ryan Dahl
db73c71280 Pass correct message in HTTP client upgrade
Simplify and correct test.

Fix by Fedor Indutny.
2010-09-19 11:55:18 -07:00
Ryan Dahl
4962702e4a Revert requireNative changes: 4e6b9b0, d429033, 6abbfa0, bcad540
The REPL needs the full require(); add test for that behavior.
2010-09-19 11:22:15 -07:00
Ryan Dahl
776754c33f Remove process._byteLength 2010-09-17 01:06:44 -07:00
Ryan Dahl
9628e28aec Remove process.evalcx 2010-09-17 00:23:27 -07:00
Ryan Dahl
01b3418e2e Move IOWatcher and Timer to process.binding 2010-09-17 00:15:54 -07:00
Ryan Dahl
5a801d63d1 Finally remove process.unloop 2010-09-17 00:03:17 -07:00
Ryan Dahl
f8ce848d9b Remove process.global 2010-09-17 00:01:27 -07:00
Ryan Dahl
31f8fa222e Add require('constants') 2010-09-16 23:22:58 -07:00
Ryan Dahl
6680c7fbf7 Add TODO item 2010-09-16 23:16:36 -07:00
Ryan Dahl
6eca948ca2 Move constants out of process object 2010-09-16 23:16:07 -07:00
Ryan Dahl
3def66ac3b Add items to TODO 2010-09-16 22:22:38 -07:00
Ryan Dahl
431e43009c Upgrade V8 to 2.4.4 2010-09-16 21:33:32 -07:00
Ryan Dahl
d2de8ba400 ^c to get out of '...' in REPL 2010-09-16 21:07:22 -07:00
Ryan Dahl
42eb5a6898 Simplify REPL 2010-09-16 20:50:56 -07:00
Ryan Dahl
bbbcd1fee0 Safe constructors for fs.ReadStream and fs.WriteStream 2010-09-16 19:04:09 -07:00
Ryan Dahl
6da0593162 Remove old versions of fs.read and fs.write from docs 2010-09-16 18:51:50 -07:00
Paul Querna
5a00d9d50f Use the Apple recommended way of detecting OSX Versions
to enable KQueue, rather than deciding based on the compiler version.
2010-09-16 17:32:30 -07:00
Paul Querna
c8f9728de7 Move dns.isIP to net.isIP
Add tests and docs.
2010-09-16 17:27:10 -07:00
Ryan Dahl
251d03197f Remove deprecation warnings in net module 2010-09-16 15:02:12 -07:00
Ryan Dahl
a63fd0fe56 Remove deprecation warnings in http module 2010-09-16 14:49:12 -07:00
Ryan Dahl
f08985c193 Handle writeStream errors in sys.pump 2010-09-16 14:40:41 -07:00
Herbert Vojčík
3e0a8f3ad8 Common subexpression in emit. 2010-09-16 13:47:43 -07:00
Herbert Vojčík
4e6b9b0992 No need to do if (internalModuleCache...), it's in requireNative. 2010-09-16 13:46:27 -07:00
Herbert Vojčík
d429033fd7 Module system moved to the bottom, where only is it needed.
(this also splits the file into upper "setup" and lower "startup" sections)
2010-09-16 13:45:43 -07:00
Herbert Vojčík
6abbfa09ff m.id unneccessary, id is enough. 2010-09-16 13:44:16 -07:00
Herbert Vojčík
bcad5403d6 Natives having their own self-contained minimalistic module system.
The main system is built upon this, and is optional, if only natives
are used in application (eg. node-core).

Natives not loaded into own context if NODE_MODULE_CONTEXTS=1.
This have its inner logic, if natives are seen just as lazy-loaded
parts of the core.
2010-09-15 17:30:34 -07:00
Ryan Dahl
f47ad10db7 Remove a few old deprecation warnings 2010-09-15 16:18:54 -07:00
Sam Stephenson
6560ab9073 Send multiple header lines in ServerResponse#writeHead when header values are arrays 2010-09-15 15:55:30 -07:00
Ryan Dahl
6bdc42cee7 shorten some lines in events.js 2010-09-15 15:47:28 -07:00
Ryan Dahl
ae8f8e7258 Optimize emit for two arguments 2010-09-15 15:20:04 -07:00
Ryan Dahl
feea1330cc Make a list of known globals
And fix missing var!

It would be good to get this script running at the end of every test, so we
know that modules aren't leaking either - but it will require a lot
modification of the tests so that they themselves aren't leaking globals.
2010-09-14 23:03:29 -07:00
Ryan Dahl
77fc61d539 Default value for second arg of Buffer#slice 2010-09-14 15:39:27 -07:00
Mark Nottingham
4fe3007a1a Support for outgoing HTTP trailing headers 2010-09-14 15:20:45 -07:00
Ryan Dahl
83ff473d30 Use child_process.exec rather than sys.exec 2010-09-14 10:29:56 -07:00
isaacs
686d9f9cc6 Bug in realpath with symlinks to absolute folder paths which have children.
Found by Cliffano Subagio
http://groups.google.com/group/nodejs/browse_thread/thread/f46f093938265ac0/387e14da08c7dd7b?
2010-09-14 10:27:57 -07:00
Ryan Dahl
61448bfc4e Upgrade libeio 2010-09-13 15:40:20 -07:00
Peter Griess
422d3c93bc Get rid of PHP/Rails style parameter munging.
- Handle only the most basic of query string parsing and construction.
  Leave the rest (e.g. Rails/PHP behaviors) to modules higher up the
  stack, like Express.
2010-09-13 12:39:30 -07:00
Tony Metzidis
debf389490 Catch Exceptions thrown when openssl is disabled 2010-09-13 12:04:31 -07:00
Tony Metzidis
5c9b9c2e70 - fix AttributeError on "use_openssl" when doing ./configure --without-ssl - error was: AttributeError: Values instance has no attribute 'use_openssl' 2010-09-13 11:50:06 -07:00
Ryan Dahl
efdd73c8e4 Fix style in node_object_wrap.h 2010-09-13 11:40:04 -07:00
Ryan Dahl
aef0d8086b Add lfs flags to node addon script 2010-09-12 21:58:18 -07:00
Ryan Dahl
2d09ef8541 Fix style in readline 2010-09-12 21:47:56 -07:00
Ryan Dahl
0ef8a86af2 Add SIGWINCH handler for readline 2010-09-12 21:23:53 -07:00
Ryan Dahl
678fa31136 add to todo 2010-09-11 20:40:46 -07:00
Paul Querna
9a701b0a70 Expose fingerproint from getPeerCertificate
Expose the SHA1 digest of the certificate as the fingerprint attribute in
the object returned by getPeerCertificate()
2010-09-09 23:35:17 -07:00
Ryan Dahl
3a9570386a Fix fs.realpathSync('/') 2010-09-09 18:49:28 -07:00
isaacs
85fb47c11c Better temporary directory handling for tests.
Add a setUp and tearDown function to the test case class, and use it to
create and remove the test/tmp directory for each test.

TODO: amend other tests.
2010-09-09 16:43:18 -07:00
Ryan Dahl
7628905a9b Don't use empty.js - breaks module test 2010-09-09 16:22:57 -07:00
Felix Geisendörfer
f870240dcf Simple benchmark for node's startup time 2010-09-09 15:51:17 -07:00
Ryan Dahl
5d42cc3a44 Use SetPointerInInternalField 2010-09-09 15:47:37 -07:00
Ryan Dahl
98683d285c Merge branch 'fast-buffer' 2010-09-09 11:08:16 -07:00
Ryan Dahl
b8bfbdab48 Rename SlowBuffer in binding 2010-09-09 11:03:51 -07:00
Ryan Dahl
5bc4efe820 Remove blobs, simplify SlowBuffer
Implement SlowBuffer.prototype.slice in js
2010-09-09 11:03:51 -07:00
Ryan Dahl
380d12832c Remove dead code 2010-09-09 11:03:50 -07:00
Ryan Dahl
efc723787a Fix big string bug 2010-09-09 11:03:50 -07:00
Ryan Dahl
71d67dbf48 Remove fancy SlowBuffer constructor 2010-09-09 11:03:50 -07:00
Ryan Dahl
ba2e4a2306 Simplify fast buffer constructor 2010-09-09 11:03:50 -07:00
Ryan Dahl
3e9f636b64 Improve long buffer test 2010-09-09 11:03:50 -07:00
Ryan Dahl
8078ed1f86 Expose fast-buffer bug in tests 2010-09-09 11:03:50 -07:00
Ryan Dahl
ff027d571b Update fast buffer benchmarks 2010-09-09 11:03:50 -07:00
Ryan Dahl
17ba821e60 defineProperty is slow, don't use it for fastbuffer 2010-09-09 11:03:50 -07:00
Ryan Dahl
d3fcd1c75a Expose SlowBuffer 2010-09-09 11:03:50 -07:00
Ryan Dahl
6135941eea Fix ByteLength hangup 2010-09-09 11:03:50 -07:00
Ryan Dahl
8b4f1e05f9 Expose Buffer.poolSize 2010-09-09 11:03:50 -07:00
Ryan Dahl
5da4faf8c7 fast buffers for crypto 2010-09-09 11:03:49 -07:00
Ryan Dahl
5f935f6c14 Fast buffers for http-parser 2010-09-09 11:03:49 -07:00
Ryan Dahl
5506f99dfa map charsWritten to fast buffer 2010-09-09 11:03:49 -07:00
Ryan Dahl
ececd92f62 Fix base64 write for buffers 2010-09-09 11:03:49 -07:00
Ryan Dahl
1f947f7b41 remove unnecessary casts 2010-09-09 11:03:49 -07:00
Ryan Dahl
7b772f3f68 More fast buffer work 2010-09-09 11:03:48 -07:00
Ryan Dahl
d5bdda74c1 fast buffer bounds checking in copy() 2010-09-09 11:03:48 -07:00
Tim-Smart
6ea99721f1 string.length !== Buffer.byteLength(string) 2010-09-09 11:03:48 -07:00
Ryan Dahl
1cf538a60a Work to get C++ fast buffers. incomplete 2010-09-09 11:03:48 -07:00
Ryan Dahl
2dda6be799 Fast Buffer safe constructor 2010-09-09 11:03:48 -07:00
Ryan Dahl
565d862f3c Fix buffer binding 2010-09-09 11:03:48 -07:00
Ryan Dahl
b87669cbf4 Fix fastbuffer style
Fix style
2010-09-09 11:03:48 -07:00
Tim-Smart
2b07c9fcae Some silly fixes to buffer.js 2010-09-09 11:03:47 -07:00
Tim-Smart
746d487da8 FastBuffer implementation. API needs migration 2010-09-09 11:03:47 -07:00
Felix Geisendörfer
ef54777fa5 Fix: uncaughtException was broken for main module
See: 635986e433
2010-09-09 10:47:30 -07:00
Ryan Dahl
17f3ffa633 Call Tick() after coming out of select()
Previously we would only call it before going into select(). This is needed
to fix test/simple/test-next-tick-ordering2.js.
2010-09-09 10:30:43 -07:00
isaacs
ba0c32e2e1 Fix issue #262. Allow fs.realpath to traverse above the current working directory. 2010-09-08 17:35:58 -07:00
Ryan Dahl
9a6d2c35a1 V8 Cygwin patch 2010-09-08 17:16:18 -07:00
Ryan Dahl
8796ed2278 Upgrade V8 to 2.4.2 2010-09-08 17:14:42 -07:00
Tobie Langel
512016fd74 Test for ReadStream typo 2010-09-08 12:09:13 -07:00
Ryan Dahl
0e501f4ec5 Fix style; undefined reference bug 2010-09-08 12:03:33 -07:00
Tobie Langel
ccf4afa256 Do not emit WriteStream's drain event before ws.write has been called. 2010-09-08 11:58:54 -07:00
Tobie Langel
f5e4047064 Avoid closing a WriteStream before it has been opened. 2010-09-08 11:51:29 -07:00
Tobie Langel
75f922c863 Avoid missing ref error in WriteStream.prototype.destroy(). 2010-09-08 11:50:56 -07:00
Herbert Vojčík
71651bf8b2 Make test-global work with NODE_MODULE_CONTEXTS. 2010-09-08 10:40:55 -07:00
Herbert Vojčík
6789ab16d8 Modifying test-global to accomodate v8 inter-context 'global' protection. 2010-09-08 10:37:26 -07:00
Herbert Vojčík
2a03d5802b Removing test-global-between-modules.
Using "global" to push data to require()d modules
not supported under NODE_MODULE_CONTEXTS=1.
2010-09-08 10:36:45 -07:00
Herbert Vojčík
8718fa54f6 Removed comment-out code. 2010-09-08 10:34:47 -07:00
Ryan Dahl
24ac87f543 Increase ReadStream bufferSize to 64k 2010-09-08 10:14:04 -07:00
Trent Mick
1d961a6630 add ANSI coloring option to sys.inspect and, by default, to the repl 2010-09-08 09:47:13 -07:00
Trent Mick
5330fea954 Ctrl+W support for the REPL
FWIW, command-line style (delete back to whitespace) would be:
    leading = leading.replace(/\S+\s*$/, '');
2010-09-08 09:45:57 -07:00
Felix Geisendörfer
cf4b5fc52a Test case showing a bug in nextTick ordering
nextTick should fire before setTimeout in this test, but it doesn't.
2010-09-07 22:37:14 -07:00
Ryan Dahl
1d0fb850d9 test-http-parser should not use private API 2010-09-07 17:17:12 -07:00
Ryan Dahl
4fe5e86a7e Don't refer to private API in test-repl 2010-09-07 17:16:24 -07:00
Ryan Dahl
1be722a271 Special deepEquals for buffer 2010-09-07 17:14:04 -07:00
Ryan Dahl
3c00ec4e48 typo: forceClose -> destroy for WriteStreams 2010-09-05 02:27:02 -07:00
Benjamin Thomas
cda1a38426 Fix bug in process._tickCallback where callbacks can get abandoned.
Change process._tickCallback so that if a callback throws an error but
there are other callbacks after it, we indicate that
process._tickCallback needs to be ran again.

Currently, if a callback in process._tickCallback throws an error, and
that error is caught by an uncaughtException handler and
process.nextTick is never called again, then any other callbacks already
added to the nextTickQueue won't be called again.

Updated the next-tick-errors test to catch this scenario.
2010-09-02 09:24:39 -07:00
isaacs
0e311717b5 Treat "//some_path" as pathname rather than hostname by default.
Note that "//" is still a special indicator for the hostname, and this does
not change the parsing of mailto: and other "slashless" url schemes.  It
does however remove some oddness in url.parse(req.url) which is the most
common use-case for the url.parse function.
2010-09-02 09:24:21 -07:00
Ryan Dahl
7347fb3e2c Make sure setInterval(cb, 0) loops infinitely 2010-08-31 16:45:17 -07:00
Ryan Dahl
5be6ab6cdb Fix style 2010-08-30 16:35:58 -07:00
Ryan Dahl
a055153cda Fix style in test/simple/test-dgram-unix.js 2010-08-30 14:17:27 -07:00
Ryan Dahl
f188b9d6d7 Remove timer from test/simple/test-dgram-unix.js
Test running already has a timeout mechanism.
2010-08-30 14:15:30 -07:00
Marco Rogers
af9aa93e0c fix for fs.readFile to return string when encoding specified on zero length read 2010-08-30 14:08:18 -07:00
Marco Rogers
9c7c6e93e1 Fixed async fs writes with length 0, it should fire the callback 2010-08-30 13:58:50 -07:00
Bradley Meck
d5214b3627 Allow Strings for ports on net.Server.listen 2010-08-30 13:27:38 -07:00
Fedor Indutny
db23af05b0 Constants should be readOnly and DontDelete 2010-08-30 12:13:41 -07:00
Ryan Dahl
635986e433 Add failing uncaughtException test
FIXME
2010-08-30 12:02:22 -07:00
Johan Euphrosine
e49be4768b add readline support for meta-d 2010-08-30 10:26:51 -07:00
Russell Haering
37b6e10684 Pass an error to the sys.pump callback if one occurs
- Add test case for pumping from unreadable stream.
- Document the sys.pump error handling behavior
2010-08-30 10:23:48 -07:00
Benjamin Thomas
57642e2349 Fix process.nextTick so thrown errors don't confuse it.
If the function for a process.nextTick throws an error, then the
splice() never removes that function from the nextTickQueue array.  This
makes sure the functions that have been run in _tickCallback get removed
regardless of errors.

Also add a test for this.
2010-08-27 22:13:50 -07:00
Ryan Dahl
4fdebab005 Safe constructor: net.Server, net.Stream 2010-08-27 15:38:46 -07:00
Ryan Dahl
f86ad1693f Safe Constructor: Buffer 2010-08-27 15:23:51 -07:00
Ryan Dahl
44a287987e Safe constructors: http.Server and http.Client 2010-08-27 13:58:52 -07:00
Ryan Dahl
e8b3751743 Only check for execinfo lib in freebsd
OpenEmbedded doesn't like it when you look in /usr/lib
2010-08-27 06:20:20 -07:00
Johan Euphrosine
51224f12ca add test for readline putty support 2010-08-23 10:25:55 -07:00
Brian
d9eb64928e Fix home/end keys in repl for putty/xterm. 2010-08-23 09:18:36 -07:00
Russell Haering
6078c37be5 Modify fs.open to use accept a callback without a mode 2010-08-23 02:42:25 -07:00
Johan Euphrosine
748469c71c add readline support for meta-f and meta-b 2010-08-23 01:47:41 -07:00
Johan Euphrosine
fd3e84499e add home/end support in rxvt and readline tests 2010-08-23 01:46:14 -07:00
Felix Geisendörfer
c209e57e50 Document WriteStream 'open' event 2010-08-23 01:44:44 -07:00
isaacs
072750e662 Add testing items, and make npm lowercase 2010-08-22 20:25:06 -07:00
isaacs
e55c486801 Missing 'var' in sys.inspect (Found by Oleg Slobodskoi) 2010-08-22 13:45:39 -07:00
Aria Stewart
8ec21059dd Fix doc.js so that it doesn't misnest menu items in the TOC 2010-08-22 13:10:18 -07:00
Johan Euphrosine
0e1e00e68b fix home/end on GNU/Linux 2010-08-22 12:34:58 -07:00
Johan Euphrosine
bedca2e7a9 add tests for console.log arguments handling 2010-08-22 12:34:00 -07:00
Aria Stewart
a834d93d2c s/HTTPS/SSL/ where appropriate 2010-08-22 12:31:58 -07:00
Ryan Dahl
2982e75a0b set-cookies header is an array of values. always 2010-08-21 16:34:38 -07:00
Ryan Dahl
488aff085b Improve appendix markdown 2010-08-21 01:24:14 -07:00
Ryan Dahl
33e919ae6f Add appendix to docs 2010-08-21 00:30:18 -07:00
Ryan Dahl
7fc794a8ec Fix default encoding in docs 2010-08-20 08:49:20 -07:00
Ryan Dahl
4fcbc1b64a Update make website-upload 2010-08-20 02:00:37 -07:00
Ryan Dahl
9283e134e5 bump version 2010-08-20 01:53:08 -07:00
Ryan Dahl
51ecba8da9 Add get/set methods to Buffer 2010-08-19 23:29:06 -07:00
Ryan Dahl
0c20c588af Remove YAWS vs Apache benchmark
http://twitter.com/bascule/status/21626934378
2010-08-19 19:25:00 -07:00
Tim Caswell
81a53e83ab Make process.nextTick worlds faster for large queues. 2010-08-19 19:19:18 -07:00
Ryan Dahl
60b93cca6d Fix race conditions in test-dgram-multicast.js 2010-08-19 18:49:27 -07:00
Ryan Dahl
12a169e8ff Add buffer_creation benchmark 2010-08-19 01:40:28 -07:00
Trent Mick
293809b8b6 drop obsolete TODO comment 2010-08-18 23:02:54 -07:00
Trent Mick
1aeaf8d289 repl tab completion: insert common prefix of multiple completions 2010-08-18 23:02:30 -07:00
Trent Mick
5c1ffa165f repl completion: completion for arguments to "require" 2010-08-18 22:59:49 -07:00
Trent Mick
2134982ea4 repl completion: comment/TODO cleanup, no functional change 2010-08-18 22:59:35 -07:00
Herbert Vojčík
c5eb1b55d9 Making "root" available in both context and non-context mode. 2010-08-18 22:50:55 -07:00
Ryan Dahl
0906f945be Fix V8 build for old gcc
also sent upstream: http://codereview.chromium.org/3130033/show
2010-08-18 22:50:16 -07:00
Herbert Vojčík
28b21d15c3 Fix undefined_reference_in_new_context test for own-context module loader. 2010-08-18 14:06:30 -07:00
Ryan Dahl
5bce8ed118 Fix process.platform 2010-08-18 13:16:32 -07:00
Herbert Vojčík
2b126da395 Tests for behaviour of 'global'. 2010-08-18 12:08:39 -07:00
Herbert Vojčík
5dc2b93311 Fix sys.inspect for regex in different context. 2010-08-18 11:47:43 -07:00
Herbert Vojčík
9253333850 Fix registerExtension for NODE_MODULE_CONTEXTS
Fix of registerExtension-produced non-string module loading with own
context. Plus finishing touches to the test.
2010-08-18 11:46:37 -07:00
Ryan Dahl
39b432e42a Add process.versions 2010-08-17 11:25:42 -07:00
Ryan Dahl
41ad33910f Add Paul Querna's io benchmarks 2010-08-17 08:43:26 -07:00
Herbert Vojčík
cf2b206a8e More changes to tests so they really work under context module loader.
Plus, getting rid of test/common.js defining things in global.
2010-08-17 08:41:05 -07:00
Herbert Vojčík
1872719b8c Typo in comment. 2010-08-17 08:38:44 -07:00
Ryan Dahl
91757fa840 Upgrade V8 to 2.3.8 2010-08-17 08:37:25 -07:00
Ryan Dahl
d4f4380f7e Add TODO 2010-08-17 08:16:43 -07:00
Ryan Dahl
03dda31b75 Simplify loading events.js 2010-08-17 08:15:46 -07:00
Herbert Vojčík
32e309440f Fix of 'sys.common.debug' calls in tests. 2010-08-17 08:08:36 -07:00
Marco Rogers
6744e59e46 detect 0 length fs writes with tests 2010-08-16 23:57:01 -07:00
Herbert Vojčík
4db608dbba Get away uint/int comparision warning. 2010-08-16 15:17:17 -07:00
Ryan Dahl
ae5d613b3e Add --without-snapshot configure option 2010-08-15 14:27:05 -07:00
Ryan Dahl
4593c04959 Implement net.Server.maxConnections
Simplify EMFILE behavior.
2010-08-15 14:01:55 -07:00
Illarionov Oleg
cde80d9859 Fix OpenSSL 100% CPU usage on error 2010-08-15 13:23:09 -07:00
Herbert Vojčík
ff953dccf1 Refactor of resolveModulePath to make it clearer. 2010-08-15 11:12:48 -07:00
Herbert Vojčík
13a3bf5b7d Clean up findModulePath
Separating "what to traverse" from "how to traverse and what to do with it "
in findModulePath.  It may also fix one not-yet-found bug (absolute ids
weren't loaded when dirs.length = 0).
2010-08-15 11:06:36 -07:00
Herbert Vojčík
361759d179 Using Array.isArray for Array testing in findModulePath. 2010-08-15 11:05:48 -07:00
Ryan Dahl
1b589be1d6 Remove TODO item 2010-08-14 14:23:09 -07:00
Vanilla Hsu
49cd211dff Add freebsd's process.title support. 2010-08-13 22:29:38 -07:00
Ryan Dahl
b14dd49222 bump version 2010-08-13 09:02:10 -07:00
Ryan Dahl
a8c2bb41af Fix tests 2010-08-13 08:55:42 -07:00
Ryan Dahl
03123435e0 Remove platform specific asserts 2010-08-13 08:13:54 -07:00
Ryan Dahl
4bbab14346 Revert "Upgrade V8 to 2.3.7"
This reverts commit 083ee0f8b7.

V8 build broken on cygwin:
  ./deps/v8/src/handles.h:62: instantiated from `T*
  v8::internal::Handle<T>::operator->() const [with T = v8::internal::Code]'
  ./deps/v8/src/accessors.cc:396: instantiated from here
  ./deps/v8/src/handles-inl.h:50:
  error: call of overloaded `BitCast(v8::internal::Code** const&)' is
  ambiguous
  ./deps/v8/src/utils.h:732: note: candidates are: Dest
  v8::internal::BitCast(const Source&) [with Dest = v8::internal::Code**,
  Source = v8::internal::Code**]
  ./deps/v8/src/utils.h:743:
  note:                 Dest v8::internal::BitCast(Source* const&) [with Dest
  = v8::internal::Code**, Source = v8::internal::Code*]
  scons: *** [obj/release/accessors.o] Error 1
2010-08-13 07:43:53 -07:00
Bert Belder
0e8d858aba One more test with a race condition fixed 2010-08-13 07:18:38 -07:00
Bert Belder
d8642a8aa6 Implement process.title for cygwin 2010-08-13 07:01:32 -07:00
Rasmus Andersson
cf909e8725 added dns.getHostByAddr() -- resolve an external IP address to hostname(s) 2010-08-12 16:25:45 -07:00
Rasmus Andersson
758f12f34c added read and write support for process.title Darwin
This will only manipulate the OS X-level process name, not the title shown
in e.g. ps.
2010-08-12 16:23:41 -07:00
Ryan Dahl
083ee0f8b7 Upgrade V8 to 2.3.7 2010-08-12 10:11:03 -07:00
Ryan Dahl
9acd76ed6e Don't throw on HEAD requests 2010-08-12 10:06:52 -07:00
Trent Mick
72e4a49cac repl completion: multi-column display of completions 2010-08-12 00:07:26 -07:00
Rasmus Andersson
8d5e05668b Added support for multiple listeners to DNS multicast datagrams.
Some platforms require SO_REUSEPORT to be set for the socket.
2010-08-11 19:02:20 -07:00
Bert Belder
7059be19ec Fix http and net tests failing due to race condition
Plus some minor cosmetic corrections
2010-08-11 17:27:44 -07:00
Trent Mick
1c9a85b9a6 First pass at tab-completion in the REPL 2010-08-11 13:42:45 -07:00
Ryan Dahl
06634f48eb Implement process.title for linux 2010-08-11 13:15:00 -07:00
Ryan Dahl
5185c15ef7 Stub out process.title 2010-08-11 12:39:42 -07:00
Fedor Indutny
49888a01c3 Cygwin: process.execPath fix 2010-08-11 11:44:51 -07:00
Ryan Dahl
883b3e2873 Remove -Werror from v8 SConstruct 2010-08-11 00:23:12 -07:00
Rasmus Andersson
fd3cd755d1 [dgram] only look up hostname for the requested address family
- [lib/dns.js] dns.lookup takes a new optional argument "family" which
  should be the integer 4, 6, dns.AF_INET or dns.AF_INET6. Passing a
  non-false "family" argument makes c-ares explicitly look up addresses for
  the specified family.

- [test/simple/test-c-ares.js] test explicit address family lookups
2010-08-10 17:53:32 -07:00
Ryan Dahl
9395786d11 Fix race conditions in tests 2010-08-10 17:48:37 -07:00
Ryan Dahl
3d551e5538 Close fd on readFile(emptyfile) 2010-08-10 14:47:40 -07:00
Ryan Dahl
a5be730906 Upgrade V8 to 2.3.6 2010-08-10 09:17:11 -07:00
Ryan Dahl
1c5d5e0b72 uppercase request methods 2010-08-09 21:23:52 -07:00
Bert Belder
7d4e8a9a71 If no options are given to child_process.spawn, env should default to process.env
Regression.
2010-08-09 15:37:14 -07:00
Ryan Dahl
f4f05a8851 Unset CLOEXEC on spawn's customFds 2010-08-09 15:33:57 -07:00
Rasmus Andersson
e07f568230 ignore test/fixtures/hello.txt created by some test(s) 2010-08-09 13:15:28 -07:00
Brian
3aa5cfde10 Misc. corrections and consistency changes to documentation. 2010-08-09 09:08:08 -07:00
Ryan Dahl
5033da733d Add TODO list items 2010-08-08 13:37:51 -07:00
Ryan Dahl
cf5ae13f85 Remove completed TODO task 2010-08-08 12:13:20 -07:00
Ryan Dahl
7068912fbb Export Interface from readline.js 2010-08-08 11:52:31 -07:00
Trent Mick
e8c2453f6d spelling correction 2010-08-06 14:48:38 -07:00
Bert Belder
aaa1f451e6 Expose cwd option to child_process.exec() 2010-08-06 13:38:41 -07:00
Bert Belder
94914135df New api for child_process.spawn; ability to set cwd for spawn()ed process
Tests for child_process.spawn() use new API

Test for deprecated child_process.spawn() API
2010-08-06 13:37:30 -07:00
Ryan Dahl
d408de87fc Remove module.js - put code into src/node.js 2010-08-06 12:34:02 -07:00
Tj Holowaychuk
e8795cea30 Added console.trace() 2010-08-06 12:15:04 -07:00
Tj Holowaychuk
a8e1e8d057 Added console.{time,timeEnd}() 2010-08-06 12:11:04 -07:00
Tj Holowaychuk
e15221a8de console formatter appends extra arguments
This makes the console methods more "browser-like",
for example:

  console.log("foo", "bar", "baz");
  // foo bar baz

but still works with formatting

  console.log("hey %s", "tj", "whats up");

  // hey tj whats up
2010-08-06 12:10:08 -07:00
cloudhead
fe3e419687 querystring.parse: handle undefined value properly 2010-08-05 10:46:28 -07:00
Felix Geisendörfer
ffbbc465d3 Support inspecting objects with console.log
If the first parameter passed into console.log() is not a string, all
parameters will be printed as formated by sys.inspect. This change
also affects console.info and console.warn.
2010-08-05 10:23:17 -07:00
Ryan Dahl
6cd32fb62e Update AUTHORS 2010-08-04 16:50:59 -07:00
Ryan Dahl
a4906c7c83 Print warning when OpenSSL not found 2010-08-04 16:07:10 -07:00
Nick Stenning
0a3eff8021 Standardise module load order for native and registered file extensions.
This patch standardises the load order for modules. Highest priority is trying to load exactly the file the user specified, followed by native extensions, followed by registered extra extensions, etc.

In full, if we require('foo') having registered '.coffee' as an alternative extension, we try and load the following files in order:

    foo
    foo.js
    foo.node
    foo.coffee
    foo/index.js
    foo/index.node
    foo/index.coffee
2010-08-04 16:03:08 -07:00
Nick Stenning
78520ba482 Don't attempt to load a directory.
This patch replaces the path.exists check for module loading with a call to
fs.statSync (or fs.stat for require.async) which ensures that it's not trying
to load a directory.
2010-08-04 15:55:47 -07:00
Ryan Dahl
0b925d075d bump version 2010-08-04 12:04:12 -07:00
Ryan Dahl
81f5ed5c65 Upgrade V8 to 2.3.5 2010-08-04 11:46:42 -07:00
Ryan Dahl
7db5c8a10d Fix toString('base64') bug
Thanks to Stepan Stolyarov for the test case.
2010-08-04 11:38:48 -07:00
Samuel Shull
24c6d26cca Add node_version.h to install 2010-08-04 10:54:02 -07:00
Ryan Dahl
adec544fdd Revert "Expose the V8 debug object process.debug"
This reverts commit d9fbb8a580.
2010-08-04 10:38:19 -07:00
Ryan Dahl
31b59400f8 Allow null context in Script 2010-08-04 10:20:40 -07:00
isaacs
1a1214866f SetBlocking should set blocking, not toggle it 2010-08-04 09:58:56 -07:00
isaacs
e9aacd40c6 When the parent's stdio FDs are passed to a child, make them temporarily blocking.
Many programs do not handle non-blocking stdio very well.  In particular,
man and less have serious problems with this, and since stdout isn't being
flushed after each write, the output jumps about on the screen as you page
down.  Programs that do use non-blocking stdio will set that flag themselves
(as node does).

This puts the stdio file descriptors into blocking mode before sharing them
with the child process, so that one could spawn a vim subprocess, or some
other program that depends on blocking IO.
2010-08-03 18:11:43 -07:00
Ryan Dahl
a6bc68a83b Upgrade V8 to 2.3.4 2010-08-03 10:33:16 -07:00
Ben Noordhuis
4b19bd2896 Client.onend: Anticipate that the HTTP parser object is uninitialized when the client setup failed. 2010-08-02 11:25:53 -07:00
Ryan Dahl
d9fbb8a580 Expose the V8 debug object process.debug
Add one duplicate test from V8, just to make sure it works.
2010-08-02 00:46:09 -07:00
Mikeal Rogers
3214116be6 Implement keep-alive for http.Client
Send the 'Connection: keep-alive' header in your request to enable.
2010-08-01 22:34:17 -07:00
Brian
71009ad3fe Allow signals to be used with process.on in addition to process.addListener. 2010-08-01 20:23:03 -07:00
isaacs
65037eeb32 Don't let path.normalize get above the root.
Any path.join or path.normalize that starts with a / will not go "above" that after normalization.  This is important because /../foo is almost *always* some sort of error, and doesn't match the corollary in sh: `cd $p; pwd`

At the worse, this can be a vector for exploits, since a static file server might do path.join(docroot, path.normalize("/"+req)) to get the file.  If the normalized request path could be something like "/../../../etc/passwd" then bad things could happen.
2010-08-01 20:20:17 -07:00
Danny Coates
dc8c079d90 remove node::CheckBreak in favor of using the v8 debugger js object 2010-08-01 20:04:31 -07:00
Ryan Dahl
e59b3f0eb3 Upgrade http-parser for clang compat 2010-07-31 14:32:59 -07:00
Ryan Dahl
b2a2bb736b [v8] Remove global.print from v8natives.js (fixes issue 791)
Review URL: http://codereview.chromium.org/3045016
2010-07-30 12:20:32 -07:00
Ryan Dahl
c38dd24dc5 Fix style 2010-07-30 10:54:43 -07:00
Ben Noordhuis
f72ac17c89 Buffer: graciously handle padding in base64-encoded input. 2010-07-30 10:49:00 -07:00
Ryan Dahl
cf49fc7bfe Fix email address in AUTHORS file 2010-07-30 09:42:36 -07:00
Ryan Dahl
f291fbc8a7 Fix ending \0 in base64 decoding 2010-07-29 14:52:40 -07:00
Ben Noordhuis
95638c9b0d Buffer: adjust buffer size so the base64-decoded input fits snugly.
Stops Valgrind from complaining about uninitialized memory access.
2010-07-28 11:37:23 -07:00
Ryan Dahl
b5b83b210b Fix --debug-brk; hacky solution 2010-07-27 20:36:58 -07:00
Ryan Dahl
505178d82b Add todos 2010-07-27 12:19:08 -07:00
Ryan Dahl
8052dd0022 Clarify string encoding docs 2010-07-27 12:16:48 -07:00
Ryan Dahl
5459e5c606 Globalize the Buffer object 2010-07-27 10:58:45 -07:00
Ryan Dahl
b3c0359b56 Only one line break before stacktrace 2010-07-26 19:08:21 -07:00
Ryan Dahl
d489555553 Use kqueue on recent macintosh builds 2010-07-26 19:07:31 -07:00
Matt Ranney
f7c5334195 Check for socket on Unix domain connect.
Change scope to context in REPL docs.
2010-07-26 19:02:15 -07:00
Ryan Dahl
23cf556c6c Upgrade http-parser
support for
- long messages
- spaces in header fields
2010-07-26 15:02:20 -07:00
Ryan Dahl
552cf28260 Upgrade V8 to 2.3.3 2010-07-26 14:26:42 -07:00
Benjamin Kramer
eeaf1ef970 Constify read-only global data
Also silences a compiler warning about deprecated conversion from const
char* to char*.
2010-07-26 22:14:39 +02:00
Benjamin Kramer
93cb09642d Add missing parentheses
& has higher precedence than ==, making this a noop. Use the less
error-prone S_IS* macros instead. Found by clang.
2010-07-26 22:14:10 +02:00
Benjamin Kramer
eeb54c63d8 Fix addrlen for unix_dgram sockets
The old definition was off by one byte on BSD. Also simplify
ADDRESS_TO_JS because sun_path is always zero-terminated now.
2010-07-26 22:13:49 +02:00
Ryan Dahl
28db0c2562 Add write() callback TODO item 2010-07-26 12:42:59 -07:00
Chandra Sekar S
66deea10c7 Support for HOME and END in REPL. 2010-07-26 10:59:34 -07:00
Ryan Dahl
6fdb874e2e Fix DNS example in docs 2010-07-26 10:35:45 -07:00
Ryan Dahl
2a4568c85f bump version 2010-07-25 23:39:58 -07:00
Ryan Dahl
402bcb83bc Add reference to base64 encoding 2010-07-25 23:21:39 -07:00
Dmitry Baranovskiy
8ab3c3e7c3 Added ability to pass offset to buffer write and toString methods as a string, i.e. '2' and encoding as anything 2010-07-25 20:16:37 -07:00
Dmitry Baranovskiy
a585c5bbb3 Fixed format, so it wouldn’t blow up if %d argument is null or undefined + ensure that numbers will be numbers 2010-07-25 20:14:12 -07:00
Ryan Dahl
2c1ca4078d Implement buffer.write for base64
There might be an off-by-one on the returned value.
2010-07-23 16:36:52 -07:00
Ryan Dahl
528015e0d8 Implement buffer.toString('base64') 2010-07-23 13:52:44 -07:00
Ryan Dahl
138593b156 Fix case in docs 2010-07-23 12:14:51 -07:00
isaacs
f0f247d7e5 Fix dirname so that dirname('/a/b/') -> '/a', like sh's does.
Before there was this comment:
  Can't strip trailing slashes since module.js incorrectly
  thinks dirname('/a/b/') should yield '/a/b' instead of '/a'.
But now, such thinking is corrected.
2010-07-23 09:08:49 -07:00
Andrew Naylor
e0d6f14b22 Buffer for Cipher, Decipher, Hmac, Sign and Verify 2010-07-23 09:08:30 -07:00
Ryan Dahl
cb97cdb256 Remove Werror from SConstruct 2010-07-21 12:43:19 -07:00
Ryan Dahl
e4eeaa7fbc Upgrade V8 to 2.3.2 2010-07-21 12:31:46 -07:00
Ryan Dahl
07ab34cd58 TODO items 2010-07-21 11:44:47 -07:00
Chandra Sekar S
f5f7cb9264 Support for reading byte ranges from files using fs.createReadStream. 2010-07-21 11:33:35 -07:00
Peter Griess
56f200af5d Fix Buffer.toString() on 0-length slices.
- Buffer.toString('ascii', 0, 0) incorrectly returns the entire contents
  of the buffer. Fix this.
- Provide similar behavior to Buffer.write() and Buffer.copy() when
  dealing with 0-length in valid and invalid byte ranges.
2010-07-20 15:38:10 -07:00
Sam Shull
8acea2693d Add parenthesis to NODE_VERSION_AT_LEAST 2010-07-20 12:41:39 -07:00
Robert Keizer
5ebf6049d0 Added process.binding('stdio').getRows() 2010-07-20 12:38:03 -07:00
isaacs
d75b63bc3c Support including modules that don't have an extension.
This way, require("/foo") will work if there is a "foo.js", or a file named
simply "foo" with no extension.
2010-07-20 10:26:24 -07:00
Ryan Dahl
7067a7155f Specify env differently in execFile
Callbacks should always be the last argument.
2010-07-19 20:08:35 -07:00
Brian
352b8c3ad5 Consistency changes in api docs 2010-07-19 14:18:55 -07:00
isaacs
49e0f14a2f Cache modules based on filename rather than ID
This is ever so slightly less efficient than caching based on ID, since the
filename has to be looked up before we can check the cache.  However, it's
the most minimal approach possible to get this change in place.  Since
require() is a blocking startup-time operation anyway, a bit of slowness is
not a huge problem.

A test involving require.paths modification and absolute loading. Here's the
gist of it.

Files: /p1/foo.js /p2/foo.js

  1. Add "/p1" to require.paths.
  2. foo1 = require("foo")
  3. assert foo1 === require("/p1/foo") (fail)
  4. Remove /p1 from require.paths.
  5. Add /p2 to require.paths.
  6. foo2 = require("foo")
  7. assert foo1 !== foo2 (fail)
  8. assert foo2 === require("/p2/foo") (fail)

It's an edge case, but it affects how dependencies are mapped by npm.
If your module requires foo-1.2.3, and my module requires foo-2.3.4,
then you should expect to have require("foo") give you foo-1.2.3, and
I should expect require("foo") to give me foo-2.3.4.  However, with
module ID based caching, if your code loads *first*, then your "foo"
is THE "foo", so I'll get your version instead of mine.

It hasn't yet been a problem, but only because there are so few
modules, and everyone pretty much uses the latest version all the
time.  But as things start to get to the 1.x and 2.x versions, it'll
be an issue, I'm sure.  Dependency hell isn't fun, so this is a way to
avoid it before it strikes.
2010-07-19 14:17:22 -07:00
Peter Griess
a9d8cac4b0 Document setuid/setgid sync resolution capability. 2010-07-19 11:47:25 -07:00
Micheil Smith
299671b731 querystring: Removing typecasting of numeric strings to numbers
The tests did not accurately test for a strict equality, meaning that the
number == to the string.
2010-07-19 11:07:08 -07:00
Jan Kassens
f18d9d8466 querystring.js: JSLint warnings fixed 2010-07-19 10:54:50 -07:00
Jan Kassens
c7e0c64506 querystring doc fix 2010-07-19 10:53:54 -07:00
Jan Kassens
bb2acd5e75 querystring.stringify is now more solid
* handles NaN and Infinity
* works with arrays from other contexts
2010-07-19 10:53:32 -07:00
Ryan Dahl
eda1edd07f Add todo item 2010-07-19 10:35:59 -07:00
Ryan Dahl
9a26946aaa Fix for issue #214 2010-07-19 10:32:56 -07:00
Benjamin Fritsch
0ed3532699 added test for Issue #214 2010-07-19 10:16:31 -07:00
Ryan Dahl
65f2e72d77 Fix style in readline 2010-07-19 10:16:20 -07:00
Jérémy Lal
0fd1656d63 Support DEL in the REPL. 2010-07-18 22:20:23 -07:00
Ryan Dahl
02746eddd6 Apple's SUN_LEN is broken, override 2010-07-17 23:26:58 -07:00
Ryan Dahl
341e41726f Set SO_REUSEADDR on all sockets 2010-07-17 23:10:38 -07:00
Ryan Dahl
11a784d6da Upgrade http-parser 2010-07-17 01:22:16 -07:00
Ryan Dahl
fa344d8514 Fix solaris build 2010-07-16 23:24:08 -07:00
Ryan Dahl
0174ceb6b2 bump version 2010-07-16 21:50:26 -07:00
Ryan Dahl
458bbb4687 fs.writeSync should return bytes written 2010-07-16 19:05:28 -07:00
Marco Rogers
1662c37c40 Fix console formatter to recognize json properly 2010-07-15 23:36:35 -07:00
Ryan Dahl
dcd41ca864 Upgrade V8 to 2.3.0 2010-07-15 18:52:48 -07:00
Сергей Крыжановский
078a48a97b added env to child_process.exec 2010-07-15 17:17:03 -07:00
Matt Ranney
98341daee2 Fix unix dgram socket address resolution on Linux. 2010-07-15 16:46:46 -07:00
Ryan Dahl
02729d4af7 instanceof Buffer to Buffer.isBuffer() 2010-07-15 15:58:35 -07:00
Ryan Dahl
6961bc568f More instanceof Array fixes 2010-07-15 14:37:56 -07:00
Ryan Dahl
bd05d83ae7 Update TODO 2010-07-15 14:21:35 -07:00
Ryan Dahl
c926ab7746 Fix test-executable-path.js
Now that process.version doesn't say if the build is debug or not.
2010-07-15 14:21:32 -07:00
Ryan Dahl
8921bf454d Remove race conditions and simplify test-http-exceptions.js 2010-07-15 14:21:32 -07:00
Ryan Dahl
4c6f4dabf5 Adjust tests for error reporting on JSON.parse(undefined)
The V8 upgrade changed the stacktrace reports (?)
2010-07-15 14:21:32 -07:00
Ryan Dahl
9fd5e3c89c Update tests to work with module contexts 2010-07-15 14:21:31 -07:00
Ryan Dahl
9472812569 Fix reference to root global context 2010-07-15 10:52:31 -07:00
Ryan Dahl
ddad872020 Add TODO list 2010-07-15 10:36:35 -07:00
Ryan Dahl
6a57a42109 Use Array.isArray instead of instanceof 2010-07-15 10:35:29 -07:00
Ryan Dahl
3a00470dbb Add 'root' global variable as reference to sandbox 2010-07-15 10:35:29 -07:00
Ryan Dahl
5f30377bbc Load modules in individual contexts
Add NODE_MODULE_CONTEXTS env var

Only one test was modified to check that this works. NEED to go through all
tests and modify them so that

  NODE_MODULE_CONTEXTS=1 make test

passes.
2010-07-15 10:34:39 -07:00
Matt Ranney
4e50197e53 Datagram socket refactor. Add tests and documentation.
Support setTTL() and setBroadcast() socket options.
2010-07-15 10:27:44 -07:00
Peter Griess
e7c4f8cdaa Buffer.copy() should liberally allow empty copies. 2010-07-15 10:20:42 -07:00
Peter Griess
b64a521d66 Buffer('') should create a 0-length buffer 2010-07-15 09:54:53 -07:00
Ryan Dahl
8e2530c320 Upgrade V8 to 2.2.24 2010-07-14 11:16:20 -07:00
Paul Querna
870aa3d97f Move evals to extension module. 2010-07-14 10:55:07 -07:00
Paul Querna
ace2be8aa6 Move the Stat structure functions to node_file.cc
from node.cc, so we can convert fs to a module.
2010-07-14 10:42:32 -07:00
Paul Querna
82daa46e26 Move Buffer to extension model. 2010-07-14 10:37:24 -07:00
Paul Querna
4f7f43762d Move child process to extension model. 2010-07-14 10:36:52 -07:00
Paul Querna
e65c27062f Move http parser to extension model. 2010-07-14 10:36:24 -07:00
Paul Querna
e51aef7f3c Move signal_watcher to extension model. 2010-07-14 10:31:45 -07:00
Paul Querna
208290b524 Move cares to extension model 2010-07-14 10:31:20 -07:00
Paul Querna
e5bb8abc9d Move stdio to extension model. 2010-07-14 10:29:56 -07:00
Paul Querna
8dbfe5ea8f Use the top level check for the bindings cache
(rather than each potential module having its own if check)
2010-07-14 10:23:24 -07:00
Paul Querna
30dadfc033 Register builtin extensions via a macro, rather than a manual strcmp
Set the stage for making the builtin modules more dynamic.

Note: this only converts crypto and net, I will add more extensions in a
later commit.

* node.h: Add utility macro for converting macro values to strings.

* node.h: Include the actual module name inside the module structure, not
  just the file it was built from.

* node.h: New Macro, NODE_MODULE_DECL, for declaring an external reference
  to a module structure.

* node_extensions.cc: New File, implements get_builtin_module, which
  iterates over the module structures that are compiled into node.

* node.cc(node::Binding): Use the new module lookup function to find
  modules.

* node_{net,crypto}.c: Add NODE_MODULEs to generate the module structure.
2010-07-14 10:17:25 -07:00
isaacs
781d51285d Use execPath for default NODE_PATH, not installPrefix 2010-07-14 09:58:18 -07:00
Jérémy Lal
fb645f75fb Update ronnjs (fix rendering of html self-closing tags) 2010-07-14 09:52:59 -07:00
Ryan Dahl
50c38dec70 Update README, remove ref to Ronn 2010-07-14 09:50:17 -07:00
Mikeal Rogers
16cb45103f Adds "pause" and "resume" events to pump and it's readable argument. 2010-07-13 17:17:20 -07:00
David Siegel
2085909aeb fix corner-case bug in Module
and added a test to expose it
2010-07-13 17:15:10 -07:00
Ryan Dahl
6bf294d71a JSON is %j not %f 2010-07-13 10:16:33 -07:00
Paul Querna
367b87d26d Add support for the module structure to process.dlopen. 2010-07-13 07:08:08 -07:00
Paul Querna
49066042a2 Add basic structure and macros for node modules. 2010-07-13 06:59:53 -07:00
Paul Querna
480164f923 Move node version to a single static header file.
Some compile time variables like the cflags and prefix have been moved to
the node_config.h.in, in the anticipation that they will be removed at
somepoint.
2010-07-13 06:39:47 -07:00
Peter Griess
99a5d1e293 Free kbuf[] in Verify::VerifyFinal(). 2010-07-12 16:37:35 -07:00
Peter Griess
ac2404283e Coverity stack size warnings in DefineConstants(). 2010-07-12 16:37:17 -07:00
rick
c9e505791a use delete for removing events after removing the final listener 2010-07-12 16:29:58 -07:00
Jérémy Lal
abd3f8a02a make node.1 depend on make all 2010-07-12 16:29:42 -07:00
Jérémy Lal
4be4b5f6f4 lib/node, not lib/nodejs ! 2010-07-12 15:23:10 -07:00
Brian
554b02a14c Improve docs
Added default values for many parameters, missing properties and methods,
and slight reorganization of the Child Process section.
2010-07-12 14:23:35 -07:00
Ryan Dahl
d700a6f74a Return child from execFile 2010-07-12 14:18:09 -07:00
Peter Griess
7a706e4206 Coverity fixes: src/platform_linux.cc 2010-07-12 13:20:31 -07:00
Peter Griess
6eb0b6ac27 Coverity fixes: src/node_net 2010-07-12 13:20:31 -07:00
Peter Griess
760fb17bbf Coverity fixes: src/node_file 2010-07-12 13:20:31 -07:00
Peter Griess
792c7caf40 Coverity fixes: src/node_crypto 2010-07-12 13:20:31 -07:00
Peter Griess
4e3c5d88b3 Coverity fixes: src/node.cc 2010-07-12 13:20:26 -07:00
Adam Wiggins
c8dba94ff6 docs for dgram module (UDP and unix sockets) 2010-07-12 11:18:52 -07:00
Jérémy Lal
a7763d55e4 Fix spelling error 2010-07-12 10:35:35 -07:00
Jérémy Lal
2b8a9a8358 Use ronnjs 0.2 to generate docs. Small cosmetic change. 2010-07-12 10:24:09 -07:00
Jérémy Lal
a7e1efc5bd Environment variables NODE_PREFIX, NODE_PATH in node-waf
Those variables have following defaults :
 - NODE_PREFIX is relative to the current path of the node_addon.py file
   It is used as the base path of node include files.
 - NODE_PATH is ~/.node_libraries
   It's where modules are installed when calling `node-waf install`
   Note .js files must be explicitely installed by the module's wscript.

Usage :
NODE_PREFIX=/usr/local NODE_PATH=~/.node_libraries node-waf configure
2010-07-12 07:46:45 -07:00
Ryan Dahl
b1901cd5a5 hack fix to v8 2.2.23 2010-07-07 20:10:01 +02:00
Ryan Dahl
facb904c5d Upgrade V8 to 2.2.23 2010-07-07 19:47:38 +02:00
Dmitriy Shalashov
70a8fb3763 Fix headers with empty value. 2010-07-07 18:46:24 +02:00
Brian
1191ca052f Fix docs
Added consistency to the representation of optional parameters and separated
out multiple functions that were in a single heading.
2010-07-07 16:49:04 +02:00
Jerome Etienne
8e9f59a452 Support of console.dir + console.assert 2010-07-07 16:48:59 +02:00
Ryan Dahl
0bceaaa3d4 Fix addon example in docs 2010-07-07 16:48:53 +02:00
Ryan Dahl
3d948d85ce Remove a bunch of useless waf files 2010-07-04 04:16:55 +02:00
Ryan Dahl
0315251d01 Use 'on' in the docs 2010-07-03 10:54:35 +02:00
Ryan Dahl
515dc2161b Experimental: 'on' as alias to 'addListener' 2010-07-03 09:30:32 +02:00
Ryan Dahl
a6b8586e94 bump version 2010-07-03 08:37:46 +02:00
Ryan Dahl
2072925f12 Upgrade V8 to 2.2.21 2010-07-03 08:37:05 +02:00
Peter Griess
94cd83ef34 Doc fixes for FD related features, upgrade.
- Add docs for 'fd' events, Server.listenFD(), Stream.write(...[, fd])
  and http.Client 'upgrade' event.
2010-07-03 08:18:42 +02:00
Ryan Dahl
82ce3481fe Fix undefined_reference_in_new_context test 2010-07-03 08:16:36 +02:00
Ryan Dahl
192234c689 Remove unnecessary defines in node_events.cc 2010-07-01 23:36:56 -07:00
Ryan Dahl
2998e3bafa Add my awk script to update AUTHORS file 2010-07-01 14:31:42 -07:00
Ryan Dahl
24de2bd58c Amend .gitignore 2010-07-01 14:29:50 -07:00
Ryan Dahl
8a52fb7aeb Revert "Fix 'uncaughtException' for top level exceptions"
This reverts commit 8f8dcf8ed6.
2010-07-01 11:10:22 -07:00
Ryan Dahl
8f8dcf8ed6 Fix 'uncaughtException' for top level exceptions
Done by not evaluating the code in the first tick.

This breaks one test in test-error-reporting.js but I believe this to be a
V8 error and I have reported it in
http://code.google.com/p/v8/issues/detail?id=764
2010-06-30 15:04:40 -07:00
Ryan Dahl
ce8c30c9de Clean up indention on module compile
Remove strange code artifact
2010-06-30 14:30:37 -07:00
Ryan Dahl
d49d53fd49 Expose new HTTP methods 2010-06-30 00:54:08 -07:00
Blake Mizerany
8c8534046c fix whitespace errors 2010-06-29 23:59:24 -07:00
Dmitry Baranovskiy
f8ca6b383c Rewrote QueryString.parse to make it smaller and more effective.
Also added ability to parse foo.bar=4 equal to foo[bar]=4
Added tests for this as well
2010-06-29 23:52:42 -07:00
Ryan Dahl
0a8bd34b69 Resolve .local domains with getaddrinfo()
C-Ares doesn't go through the Name Service Switch (NSS) and thus can't
resolve certain classes of names. Generally this doesn't matter and the
whole idea of NSS is rather annoying. Nevertheless until C-Ares gets better
support, adding this hack to go through getaddrinfo() for .local domain look
up.

This reverts commit 9926dacd14.
2010-06-29 22:15:28 -07:00
Matt Ranney
02ed0ec93b On overlapping buffers use memmove 2010-06-29 21:06:00 -07:00
Blake Mizerany
898afbaf34 Buffer.prototype.write: Indifferent order preference of encoding and offset 2010-06-29 19:56:07 -07:00
Ryan Dahl
5e86d01385 Revert "Buffer.copy should copy through sourceEnd, as specified."
This reverts commit a2f70da4c9.

Keep tests modifies a few edge checks on Copy()
2010-06-29 19:40:20 -07:00
Ryan Dahl
0172cb39f0 Fix incorrect output on docs 2010-06-29 19:28:59 -07:00
Dmitry Baranovskiy
8ec12339f5 Refactored isA, isBool, etc functions to use some of ES5 goodness. 2010-06-29 19:22:28 -07:00
Dmitry Baranovskiy
d3f04933f1 sys.inherts to shadow constructor property from enumerability
thanks to ES5 features in V8 it is quite easily possible.
2010-06-29 19:11:40 -07:00
Ryan Dahl
6b430a95c9 console.log: if not string, coerce into one 2010-06-29 09:53:20 -07:00
Ryan Dahl
5aadeae888 Simply C++ event emitter 2010-06-28 21:20:21 -07:00
Ryan Dahl
b69c6a03b1 If not string, console.log should just print it without trying to format 2010-06-28 21:20:21 -07:00
Ryan Dahl
c9e12204a2 Stub out console.log format strings, info, warn, error 2010-06-28 20:47:35 -07:00
Ryan Dahl
23172c5d85 Lint node_script.cc 2010-06-28 19:37:50 -07:00
Ryan Dahl
e2db605308 Use EVBACKEND_POLL on Solaris; select() is just a wrapper anyway 2010-06-28 15:37:29 -07:00
Ruben Rodriguez
242161bef2 Added new API to Script, and implemented it in the REPL 2010-06-28 15:16:26 -07:00
Ryan Dahl
5a25338ac0 Upgrade V8 to 2.2.20 2010-06-28 08:47:01 -07:00
Rasmus Andersson
67f7fe5e5c Use all available CPUs when building
Automatically set Options.options.jobs to the number of CPUs/cores on the
executing machine, unless the environment variable JOBS is set
2010-06-27 08:49:06 -07:00
Ryan Dahl
bbdd61dc3f Fix supported archs on website 2010-06-25 09:46:10 -07:00
Matt Ranney
a2f70da4c9 Buffer.copy should copy through sourceEnd, as specified.
Improve test-buffer.js to cover all copy error cases.

Fix off by one error in string_decoder.
2010-06-25 09:10:49 -07:00
Ryan Dahl
aa491518f4 Fix authors 2010-06-24 14:37:55 -07:00
Ryan Dahl
444b33584d Remove switch-replace residue 2010-06-24 09:37:36 -07:00
Ryan Dahl
0499618c2b Edit binary encoding docs 2010-06-24 07:51:45 -07:00
Ryan Dahl
8825c74e7a Upgrade http-parser 2010-06-23 21:10:13 -07:00
Ryan Dahl
2c0d91be6c Upgrade V8 to 2.2.19 2010-06-23 20:32:06 -07:00
Ryan Dahl
ba792ea202 :%s/sys.puts/console.log/g
and there was much rejoicing
2010-06-23 20:05:29 -07:00
Ryan Dahl
4c21aa736f Fix name in AUTHORS file 2010-06-23 15:27:56 -07:00
Ryan Dahl
7b119f8b38 Fix error message 2010-06-23 09:09:15 -07:00
Ryan Dahl
f541043618 Remove ini.js 2010-06-22 19:37:29 -07:00
Ryan Dahl
fc175a089d Remove mjsunit from repo 2010-06-22 19:33:01 -07:00
Mikeal Rogers
f62979da6b Add sys.pump 2010-06-22 17:58:09 -07:00
Ryan Dahl
20905d9d62 Fix names in AUTHORS file 2010-06-22 13:23:45 -07:00
Ryan Dahl
1b5ec7017d Don't use NULL in realpath() on darwin, doesn't work in older versions
Thanks to Peter Griess <pg@std.in> for the bug report.
2010-06-22 13:19:49 -07:00
Ryan Dahl
7105aeb22f Doc process.execPath 2010-06-22 02:09:58 -07:00
Marshall Culpepper
ca35ba640a Initial implementation of process.execPath
Darwin, Linux, Solaris. FreeBSD still needs testing.

TODO: Amend the tests where we use spawn with argv[0].
2010-06-22 02:02:25 -07:00
Ryan Dahl
95b252e86d Fix bad email addresses in authors file 2010-06-21 20:41:53 -07:00
Ryan Dahl
a8e9923b44 Add Contributor License Agreement. 2010-06-21 19:40:22 -07:00
Ryan Dahl
9bb890271b Add other OSes to website 2010-06-21 17:03:19 -07:00
Ryan Dahl
a620b7298f bump version 2010-06-21 13:34:10 -07:00
Peter Griess
51bd1b4483 Only concatenate some incoming HTTP headers.
- Concatenate 'accept', 'accept-charset', 'accept-encoding',
  'accept-language', 'connection', 'cookie', and 'x-*' headers.
- For all others, drop duplicates.
2010-06-21 12:01:50 -07:00
Ryan Dahl
545e10f239 wscript shouldn't fail if 'git describe' doesn't work 2010-06-21 10:21:55 -07:00
Ryan Dahl
cb79614f73 Don't encourage strange ideas about req race conditions 2010-06-20 11:56:48 -07:00
Ryan Dahl
eda21cccb4 Fix race condition in test-http-exceptions.js 2010-06-19 23:13:28 -07:00
Ryan Dahl
b93faf9afa Comment out lines with full paths in message test.
Note that * in the .out files is a special wildcard.
2010-06-19 22:51:40 -07:00
Ryan Dahl
1c7057f09c Execute message tests by default 2010-06-19 20:30:49 -07:00
Ryan Dahl
f1a4f17897 script.runIn*Context not throwing errors properly. 2010-06-19 19:31:09 -07:00
Ryan Dahl
7d0252eae2 Fix message tests 2010-06-19 17:41:34 -07:00
Ryan Dahl
125b868e06 Add message tests 2010-06-18 18:14:06 -07:00
Micheil Smith
70c3e661b8 test-child-process-custom-fds to cleanup after running 2010-06-18 10:39:17 -07:00
Micheil Smith
e0d30b545a Renaming tcp tests to net tests 2010-06-18 10:34:56 -07:00
Micheil Smith
3f48276bf9 Coding style changes, added tests in for the md5, sha256, etc methods 2010-06-18 10:21:38 -07:00
Ryan Dahl
9bd3942f70 Add platform_none for cygwin build 2010-06-18 09:46:18 -07:00
Ryan Dahl
84c10265db Fix platform_linux.cc, missing include 2010-06-17 18:36:31 -07:00
Ryan Dahl
01a8d270cf Add platform files, move getmem to node::OS class. 2010-06-17 18:23:43 -07:00
Ryan Dahl
964ed9739b Fix text about threads on homepage 2010-06-17 15:38:02 -07:00
Ryan Dahl
1c6671aa67 Upgrade V8 to 2.2.18 2010-06-16 11:46:01 -07:00
Peter Griess
187f191558 Support 'upgrade' event in HTTP client.
- Add a unit test for client HTTP upgrade.
- Move around unit tests for server HTTP upgrade.
2010-06-16 11:27:56 -07:00
Ryan Dahl
cbf2a2233e Add callback to dgramSocket.send() 2010-06-16 11:03:34 -07:00
David Siegel
81ad8106dc Add UDP broadcast support 2010-06-16 10:45:16 -07:00
Ryan Dahl
cf86527a28 Fix writeFile(buffer) test 2010-06-16 10:28:46 -07:00
Micheil Smith
b05daaaf69 Adding path.existsSync (with tests.) 2010-06-16 10:26:11 -07:00
isaacs
73f207fe59 Throw exceptions, not strings 2010-06-16 10:11:08 -07:00
Aaron Heckmann
1d088fb906 fs.writeFile accepts Buffers 2010-06-15 23:58:32 -07:00
Ryan Dahl
c2e2479cc5 Fix Linux build 2010-06-15 20:04:29 -07:00
Peter Dekkers
e48f0d1dd9 Fixed incorrect mask for determining fs.Stats types 2010-06-15 19:52:37 -07:00
isaacs
4ce100fa62 A replacement for decodeURIComponent that doesn't throw.
And add a few more tests.
2010-06-15 19:28:09 -07:00
Ryan Dahl
ed5f4f3a44 RootCaCerts shouldn't be global 2010-06-15 18:29:45 -07:00
Ryan Dahl
6bed15e074 Refactor: Utf8Decoder -> StringDecoder
Instead of just decoding Utf8, this will proxy requests to buffer.toString()
for other encodings. This makes for a simpler interface.
2010-06-15 18:19:27 -07:00
Peter Griess
4b48042c17 Wrap FD in closure before emitting from Stream.
- Without this, recvMsg can be invoked before the event emitter gets a
  chance to run. In this case, recvMsg.fd will be overwritten and the
  original caller can end up emitting null.
2010-06-15 15:10:30 -07:00
Ryan Dahl
bc76624ec7 Upgrade V8 to 2.2.17 2010-06-15 14:52:00 -07:00
Ben Lowery
f3cd7bbe77 Coerce each argument to a String before attempting to print it via sys.print 2010-06-15 14:44:09 -07:00
Ryan Dahl
459440842f More lint on node_crypto 2010-06-15 13:36:01 -07:00
Ryan Dahl
9854216d36 Fix a bunch of memory leaks in node_crypto 2010-06-15 13:31:59 -07:00
Ryan Dahl
5bc00abed7 Lint node_crypto.cc 2010-06-15 13:16:20 -07:00
Ryan Dahl
5f88097eb4 Remove unused code from node_crypto 2010-06-15 12:41:14 -07:00
Ryan Dahl
14414f81f3 Soft deprecation of 'listening' event.
Add callback param to listen() instead
2010-06-15 12:38:25 -07:00
Peter Griess
c9dde726c6 Test case for net.Server.listenFD() 2010-06-15 11:44:33 -07:00
isaacs
1ffdad010b Expose the FD numbers for stdin and stderr on process.binding("stdio") 2010-06-14 15:10:00 -07:00
Ryan Dahl
d6072766ed Fix memory leak in hash.update() 2010-06-14 14:38:40 -07:00
Ryan Dahl
009b4569b3 Merge Hash.init() function into JS constructor 2010-06-14 13:10:23 -07:00
Felix Geisendörfer
5f3906b65e Fix: fs.writeFile could not handle utf8 2010-06-14 10:58:17 -07:00
Paul Querna
02da5ed4a1 Implement datagram sockets
- Adds new dgram module, for all data-gram type transports
- Supports both UDP client and servers
- Supports Unix Daemon sockets in DGRAM mode too (think syslog)
- Uses a shared Buffer and slices that as needed to be reasonably
  performant.
- One supplied test program so far, test-dgram-pingpong
- Passes test cases on osx 10.6 and ubuntu 9.10u
2010-06-12 02:41:45 -07:00
isaacs
e65e6039a8 Fix #169. Expose require members in the repl.
This fixes #169 by putting the require members onto the cwdRequire function
which is exposed to the repl scope.
2010-06-11 14:04:58 -07:00
Brian McKenna
431e72cbe8 Make addon building work for Cygwin. 2010-06-11 13:25:03 -07:00
isaacs
94be898fbc Remove "uri" module.
The deprecation warning was broken, so clearly no one is using this thing.
2010-06-11 13:19:50 -07:00
Ryan Dahl
4e80587cbe Add Orlando to changelog 2010-06-11 13:16:08 -07:00
Ryan Dahl
10d8adb089 bump version 2010-06-11 12:58:14 -07:00
Ryan Dahl
9c85357846 Upgrade C-Ares to 1.7.3 2010-06-11 12:48:58 -07:00
Ryan Dahl
d127d15d1b License file maintenance.
- reference to OpenSSL
- note about http-parser
2010-06-11 12:48:25 -07:00
Matt Ranney
cbd1f1481c Remove setTimeout from initial example and description. 2010-06-10 23:55:46 -07:00
Ryan Dahl
fe89caba2e Improve fs.write tests 2010-06-10 15:17:46 -07:00
Ryan Dahl
0e390d69a8 Don't use bzero 2010-06-10 07:58:24 -07:00
Jérémy Lal
ce347124e6 The underscores are not meant to emphasize. Escape them. 2010-06-10 07:15:27 -07:00
Raffaele Sena
b3b81d67ff Port to cygwin 2010-06-09 15:08:46 -07:00
Ryan Dahl
cd232a9cce Upgrade V8 to 2.2.16 2010-06-09 10:09:37 -07:00
Matt Ranney
cec775a0de Web site example fixes. 2010-06-09 00:52:28 -07:00
Ryan Dahl
0bb47b6c97 Upgrade V8 to 2.2.15 2010-06-09 00:52:06 -07:00
Peter Griess
de6d663a67 Add 'type' parameter to net.Server.listenFD()
This is needed in case the provided socket is not the default 'tcp4' type
(i.e. and needs different read/write/etc methods). With this patch, one can
call listenFD(sock, 'unix') to bind to existing UNIX domain sockets.
2010-06-08 18:09:17 -07:00
Ryan Dahl
bca16a0581 Handle ctrl+z from readline 2010-06-08 17:49:22 -07:00
Ryan Dahl
adc06dd705 Add NODE_NO_READLINE check for REPL
Setting this environmental variable to a non-zero integer will start all
REPL interfaces without readline. For use with rlwrap.
2010-06-08 15:44:43 -07:00
Ryan Dahl
0377b12964 Use strings instead of buffers in readline
For eventual large character support.
2010-06-08 10:00:43 -07:00
Ryan Dahl
a6942b345d Fix test-repl 2010-06-07 17:39:52 -07:00
Matt Ranney
09af242c89 Support more readline navigation keys. 2010-06-07 16:51:07 -07:00
Ryan Dahl
0c3b6aba7a Do not output \n on stderr on output, breaks tests 2010-06-07 16:23:48 -07:00
Ryan Dahl
6056d2ea2c node without arguments starts the REPL 2010-06-07 16:15:41 -07:00
Ryan Dahl
e43d6fc879 Fix misspelling 2010-06-07 16:03:57 -07:00
Ryan Dahl
41f213be18 Add binding to termios, implement readline for repl 2010-06-07 15:24:21 -07:00
Peter Griess
a0134ff0f8 add net.Server.listenFD
Now that FD passing is in master, it'd be great to be able to use a received
socket (which has already had bind(2) and listen(2) called on it) to fire up a
new net.Server instance. This patch adds a net.Server.listenFD() method which
will start up the accept watcher on the provided FD.
2010-06-07 10:13:30 -07:00
Ryan Dahl
9be6c501ec Upgrade http-parser 2010-06-06 17:41:03 -07:00
Ryan Dahl
935f8437fd Allow ObjectWrap destructors before Wrap() 2010-06-04 14:30:59 -07:00
Ryan Dahl
9e8df0e836 More dynamic linking options (again)
Original commit: 75f0cf471a
2010-06-04 11:42:34 -07:00
Peter Griess
78d33f4fd5 Fix options parsing
The current node has a bug where it will fail to pass the option argument
immediately preceding the first non-option argument to V8. That is the
--perf flag will be ignored by V8 when running 'node --perf script.js'.
2010-06-04 08:29:10 -07:00
Ryan Dahl
0055dd133d Apply fix for V8 bug 728 2010-06-03 18:50:44 -07:00
Ryan Dahl
3104662bab Use a less common port in docs 2010-06-03 18:45:35 -07:00
Ryan Dahl
62d9bff06b Fix ability to disable TCP timeouts with setTimeout(0) 2010-06-03 11:01:47 -07:00
Felix Geisendörfer
987cbe35c6 Fix: require.async module exception delegation
The fs.readFile bug was hiding another bug that was causing this test
to pass, even so it was broken:

require.async("../fixtures/throws_error1") in test-module-loading.js

This patch fixes the original test by running _compile within a
try..catch block for _loadScript.

_loadScriptSync also had some useless (deprecated?) code for dealing
with module entry point exceptions. This code was also removed for
greater clarity.
2010-06-03 09:59:56 -07:00
Felix Geisendörfer
55e964ec19 Fix: fs.readFile would execute callbacks twice
fs.readFile was executing a callback in a try..catch context, which is
a problem in itself. To make matters worse, it would re-execute the
same callback if there was an execution.

This patch fixes both of these problems.
2010-06-03 09:40:40 -07:00
rentzsch
55d7352189 DOC note stats.isSymbolicLink() is only valid with fs.lstat().
ref: <http://github.com/ry/node/issues#issue/153>
2010-06-03 00:26:23 -07:00
Peter Griess
8f0b4e9111 Send and receive file descriptors through net.Stream.
a) create a layer of indirection in net.Stream to allow swapping in
different read/write implementations and

b) emit an 'fd' event when file descriptors are received over a UNIX pipe,
as finally as a tangential benefit

c) remove a bunch of conditionals from the primary codepaths for
ease-of-reading.
2010-06-02 18:16:53 -07:00
Ryan Dahl
55a6f01732 Server responses should have a body if HEAD request 2010-06-02 15:07:15 -07:00
Ryan Dahl
ef9f4046c9 Better 'make' output
Removes 'make all-debug' since it is unnecessary now.
2010-06-02 13:03:31 -07:00
Orlando Vazquez
92da636b97 Add a parameter to spawn() that sets the child's stdio file descriptors.
After the child is forked, these file descriptors will get dup2()'d to STDIN,
STDIO, and STDERR.

(API may be changed.)
2010-06-02 10:41:24 -07:00
Ryan Dahl
501136b999 Revert "More dynmaic linking options"
Broke the build. Will fix and reapply soon.

This reverts commit 75f0cf471a.
2010-06-02 09:16:28 -07:00
Ryan Dahl
75f0cf471a More dynmaic linking options
This adds the following options to the `configure` program

  --shared-v8           Link to a shared V8 DLL instead of static linking
  --shared-v8-includes=SHARED_V8_INCLUDES
                        Directory containing V8 header files
  --shared-v8-libpath=SHARED_V8_LIBPATH
                        A directory to search for the shared V8 DLL
  --shared-cares        Link to a shared C-Ares DLL instead of static linking
  --shared-cares-includes=SHARED_CARES_INCLUDES
                        Directory containing C-Ares header files
  --shared-cares-libpath=SHARED_CARES_LIBPATH
                        A directory to search for the shared C-Ares DLL
  --shared-libev        Link to a shared libev DLL instead of static linking
  --shared-libev-includes=SHARED_LIBEV_INCLUDES
                        Directory containing libev header files
  --shared-libev-libpath=SHARED_LIBEV_LIBPATH
                        A directory to search for the shared libev DLL

and removes --system.
2010-06-01 20:18:43 -07:00
Ryan Dahl
d62b0f442a Fix style in sys.js 2010-06-01 09:28:56 -07:00
Ryan Dahl
f86a214357 Upgrade to V8 2.2.13 2010-05-31 11:52:20 -07:00
Ryan Dahl
0c1aa36835 bump version 2010-05-29 19:37:57 -07:00
Ryan Dahl
16818ff250 Remove throttling bug notes 2010-05-29 19:37:56 -07:00
Ryan Dahl
1a5acd9850 API: readFileSync without encoding argument now returns a Buffer
Correctly load utf8 data; add a test test-fs-read-file-sync.js
2010-05-29 13:38:00 -07:00
Ryan Dahl
c82d64649c Deprecate the 'ini' module 2010-05-29 13:14:38 -07:00
Ryan Dahl
78e49f1c88 Rename node_net2.cc to node_net.cc 2010-05-29 13:08:05 -07:00
isaacs
a26f7d753d Make require() from the repl be relative to cwd 2010-05-29 12:35:30 -07:00
isaacs
82813f2f8c Execute repl code in new context 2010-05-29 12:33:55 -07:00
isaacs
3c7873bd3f Use duck-typing as well as instanceof in sys.inspect
This makes it so that inspecting objects from other contexts works as expected.
2010-05-29 12:31:46 -07:00
Ryan Dahl
2fa4de001c addons should have debugging symbols 2010-05-29 12:25:28 -07:00
Tim Caswell
b480184fd6 Check for a couple of edge cases on the inspect hook.
Don't treat sys.inspect special, same with prototype objects.
2010-05-28 15:40:25 -07:00
Tim Caswell
7f5320b167 Provide a hook for user-specified inspect functions 2010-05-28 14:29:51 -07:00
Ryan Dahl
80a8e71fe0 Insert some hot paths into HTTP 2010-05-27 20:43:56 -07:00
Ryan Dahl
74b7fa29a1 Refactor HTTP
Allow throttling from outgoing messages.
2010-05-27 20:41:57 -07:00
Ryan Dahl
0e713e7482 :%s/8000/PORT/g for a few tests 2010-05-27 20:41:57 -07:00
Brian White
72262060db Added support for OpenBSD 32-bit for c-ares 2010-05-27 14:02:16 -07:00
Ryan Dahl
8840ce340d Bugfix: fs.ReadStream.setEncoding
Improve test-fs-read-stream test.
2010-05-26 18:33:38 -07:00
Ryan Dahl
31854c7990 Fix Solaris V8 build
Patch submitted to V8: http://codereview.chromium.org/2282003/show
2010-05-26 18:05:44 -07:00
Micheil Smith
d89de07758 Adding experimental support for fs.chown and fs.chownSync.
Notes:
- Currently only accepts numeric user and group ids.
- No tests, as tests depend on getpwuid and getgrgid.
- No documentation, as there is no tests and this is experimental.
2010-05-26 13:37:45 -07:00
Ryan Dahl
29e867aaa0 Simplify a few internal HTTP events. 2010-05-26 13:37:33 -07:00
Ryan Dahl
311a62dea7 Fix JOBS for Solaris make 2010-05-26 13:07:45 -07:00
Ryan Dahl
4b216d266a Remove -Werror from V8 SConstruct 2010-05-26 10:48:20 -07:00
Ryan Dahl
d4345e1ff8 Upgrade V8 to 2.2.12 2010-05-26 10:15:43 -07:00
Sam Hughes
895f89d62a Avoided sending empty chunkedEncoding chunks in the middle of http responses 2010-05-25 22:58:17 -07:00
Ryan Dahl
15ec99ec59 Fix issue 89, parsing responses to HEAD requests
Test from Mark Hansen (mark at markhansen.co.nz)
2010-05-25 19:25:40 -07:00
Ryan Dahl
35c14f637e In HTTP parser, proxy return value of onHeadersComplete 2010-05-25 19:25:38 -07:00
Ryan Dahl
2fca40e44f Upgrade http-parser 2010-05-25 19:25:35 -07:00
Ryan Dahl
e97a481785 Destroy REPL pipes instead of shutting down. 2010-05-24 17:14:13 -07:00
Ryan Dahl
19f475c573 fs.ReadStream should emit Buffers
And do proper utf8 encoding.
2010-05-24 15:47:42 -07:00
Ryan Dahl
3768aaaea4 Create a public Buffer constructor for use in addons. 2010-05-24 13:26:18 -07:00
Aapo Laitinen
c4876d01a1 Change the behavior of path.extname
Make path.extname return an empty string also if:
- The last dot is not in the last path component
- The last dot starts the last path component
2010-05-24 09:56:28 -07:00
Brian White
ab5c0dd63e Port to OpenBSD 2010-05-23 17:08:57 -07:00
Ryan Dahl
0f143f6c23 Upgrade libeio 2010-05-23 17:02:35 -07:00
Ben Noordhuis
b58db3cd73 Added reason phrases for a bunch of HTTP status codes. 2010-05-23 17:02:35 -07:00
Ryan Dahl
1369d606f7 Add bug notes about HTTP streams and throttling 2010-05-22 13:02:30 -07:00
Mikeal Rogers
fe3d8f2411 Add assert.ifError 2010-05-21 12:06:12 -07:00
Ryan Dahl
2b34363d03 Upgrade V8 to 2.2.11 2010-05-21 09:41:50 -07:00
Ryan Dahl
9514a4d547 bump version 2010-05-21 02:55:38 -07:00
Ryan Dahl
0de138acb5 improve test for stdio non-blockingness 2010-05-21 01:22:20 -07:00
Ryan Dahl
f73b6e2190 Fix opposite logic, which coincidentially works 2010-05-20 22:11:26 -07:00
Ryan Dahl
8c56284776 Remove unneeded fd variables in node_stdio.cc 2010-05-20 22:01:13 -07:00
Felix Geisendörfer
c93e0aaf06 Deprecate string interface for fs.read()
This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-20 16:31:18 -07:00
Ryan Dahl
e84395ff8c Revert "Deprecate string interface for fs.read()"
This reverts commit cbbf9e43d1.
2010-05-20 16:11:33 -07:00
Felix Geisendörfer
cbbf9e43d1 Deprecate string interface for fs.read()
This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-20 15:25:49 -07:00
Ryan Dahl
cbd2c3945b Throwing in a callback should kill the process
There is a difference between errors which happen to a socket - like
receiving EPIPE - an exceptional situation but ultimately okay and the
situation where code throws in a callback - which is not okay.

Fixes test/simple/test-http-exceptions.js

TODO: explain this in docs.
2010-05-20 15:23:36 -07:00
rentzsch
36a45c4e0d FIX path.dirname('/tmp') => '/'.
Previously path.dirname('/tmp') incorrectly returned '.'.

Unfortunately module.js incorrectly thinks dirname('/a/b/') should
yield '/a/b', so I can't strip trailing slashes yet. Once module.js
is fixed, then the commented-out code should be activated and a test
written for it.
2010-05-20 10:16:09 -07:00
Ryan Dahl
022c083848 Deprecate sys.p() 2010-05-20 10:12:05 -07:00
Ryan Dahl
44ad6a7db2 Make buffer's c++ constructor public 2010-05-20 09:44:10 -07:00
isaacs
5b740c488f Fix a leaking global 2010-05-20 09:38:25 -07:00
isaacs
78be1e4930 Remove the ReportException from the Script class
This is so that syntax errors can be handled discretely in places like the
repl, where SyntaxErrors are expected and normal.
2010-05-19 15:02:47 -07:00
Ryan Dahl
d8af9d8edf Minor style changes for fs.write code 2010-05-19 14:59:03 -07:00
Felix Geisendörfer
c46cbe0de4 Deprecate string interface for fs.write()
This patch makes buffers the preferred input for fs.write() and
fs.writeSync(). The old string interface is still supported by
converting strings to buffers dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-19 12:53:43 -07:00
Ryan Dahl
c489c2c1b5 Fix api for request.connection 2010-05-19 11:01:21 -07:00
Peter Griess
2420f07e94 Allow process.setuid() and process.setgid() to accept string names in lieu of numeric IDs 2010-05-18 17:41:10 -07:00
Ryan Dahl
2663c69f8d Fix utf8stream references 2010-05-18 09:32:28 -07:00
Felix Geisendörfer
f987ecf45b Use Utf8Stream for http Streams with utf8 encoding 2010-05-18 01:04:39 -07:00
Felix Geisendörfer
ed5f1162fa Use Utf8Stream for net Streams with utf8 encoding 2010-05-18 01:02:15 -07:00
Felix Geisendörfer
caba9c70c3 Implemented Utf8Decoder module
Allows to safely decode a utf8 stream into strings without breaking
on multibyte characters.
2010-05-17 22:12:30 -07:00
Ryan Dahl
e232f09d38 fs.WriteStream.write should support buffer
Also re-adding the callback parameter.
2010-05-17 19:44:14 -07:00
Ryan Dahl
1036aa9762 Fix errno display in c-ares exceptions 2010-05-17 13:58:15 -07:00
Felix Geisendörfer
0a539865dd Support arrays and strings in buffer constructor
This is be very useful for testing code that deals with buffers.
2010-05-17 11:19:14 -07:00
visionmedia
45948e054d Added better error messages for async and sync fs calls with paths 2010-05-14 19:46:16 -07:00
Jonas Pfenniger
53a9869ff7 FIX: EventEmitter#removeAllListeners signature
This function should return this is all cases.
2010-05-14 19:15:07 -07:00
Jonas Pfenniger
fea6f829bf FIX: EventEmitter#removeListener logic
In the case of one defined listener, the function should only remove it
if it is the same as the passed listener.
2010-05-14 19:13:50 -07:00
Jonas Pfenniger
4274e6b7d0 FIX: signal-unregister bug
We now restore the default signal behavior when all listeners are
removed for a given signal.

Re-enabled test-signal-unregister
2010-05-14 19:05:19 -07:00
Jonas Pfenniger
50148022d1 Thinner SignalWatcher, only using callback
Since it is only used internally, we don't need the complexity of
EventEmitter. The new SignalWatcher's design was copied from
IdleWatcher.
2010-05-14 18:57:17 -07:00
Andrew Johnston
9599607065 Added posix fsync and fdatasync to fs module 2010-05-14 18:42:22 -07:00
Ryan Dahl
ac3a2d899a Changes to work on Solaris 10 2010-05-14 16:38:17 -07:00
Ryan Dahl
a9b962a653 Add --without-ssl configure option 2010-05-14 16:34:47 -07:00
Ryan Dahl
0b7bda8f46 Remove some unused cruft from wscript 2010-05-14 16:30:58 -07:00
Ryan Dahl
da9323040f Simplify stack trace reporting using new V8 API 2010-05-14 11:48:14 -07:00
Ryan Dahl
320d3e9d33 Fix AUTHORS file 2010-05-14 11:15:31 -07:00
Matt Ranney
cd4f94e71a Add test for exceptions in HTTP parser event handlers. 2010-05-14 10:16:55 -07:00
Matt Ranney
307e70afaf Remove unused CSS reference. 2010-05-14 10:12:03 -07:00
Matt Ranney
1f0963558c Add process.version description. 2010-05-14 10:11:47 -07:00
Jérémy Lal
4e40e8804b System EV compatibility fix : use EV_DEFAULT_UC 2010-05-13 16:56:13 -07:00
Ryan Dahl
0914d33842 bump version 2010-05-13 16:24:28 -07:00
Ryan Dahl
23d680bb85 Allow parallel jobs to be passed to V8 build
e.g. JOBS=2 make
2010-05-13 16:24:28 -07:00
Ryan Dahl
ce2d5ad0d7 Change the 'make dist' to remove v8 test dir 2010-05-13 15:55:02 -07:00
Elijah Insua
976926376d Handle empty files with fs.readFile 2010-05-13 12:42:17 -07:00
Ben Noordhuis
c6c77d535f Support for fstat(2) through fs.fstat() and fs.fstatSync(). Added test cases, updated documentation. 2010-05-12 14:20:43 -07:00
Ryan Dahl
67eeedd602 Disable test-signal-unregister.js as functionality doesn't exist yet 2010-05-12 12:45:53 -07:00
Ryan Dahl
1c7670aca2 Remove reference to C++ EventEmitter in docs
I prefer ppl to use ObjectWrap
2010-05-12 12:17:53 -07:00
Ryan Dahl
d0128787e7 Deprecate sendHeader() and writeHeader(), ppl should use writeHead() 2010-05-12 12:15:58 -07:00
Ryan Dahl
7a2e6d674a Default to 2 second timeout for http servers
Taking a performance hit on 'hello world' benchmark by enabling this by
default, but I think it's worth it. Hopefully we can improve performance by
resetting the timeout less often - ideally a 'hello world' benchmark would
only touch the one timer once - if it runs in less than 2 seconds. The rest
should be just link list manipulations.
2010-05-12 11:49:28 -07:00
Ryan Dahl
ed0c109950 Add note about 'error' event to docs 2010-05-12 10:42:14 -07:00
Ryan Dahl
d2cff34fa3 Idle timeout changes
- setTimeout should active the timeout too. (test-net-set-timeout tests
  this.)

- 'timeout' event is not automatically followed by an 'error' event. That
  is the user is now responsible for destroying the stream if there is an
  idle timeout.
2010-05-12 10:06:13 -07:00
Ryan Dahl
f7ff548dd0 Quote variables in configure script 2010-05-11 10:25:27 -07:00
Ryan Dahl
c90e44e582 Just add an extra include for strings.h - don't try to be cute 2010-05-10 16:38:47 -07:00
Ryan Dahl
8e5b91c79b Revert "Check for strings.h"
This reverts commit 032f651824.
2010-05-10 16:38:14 -07:00
Ryan Dahl
032f651824 Check for strings.h 2010-05-10 16:30:31 -07:00
Ryan Dahl
35dd0fb271 Patch v8 build for solaris
Submitted this patch to V8
http://codereview.chromium.org/1990010/show
2010-05-10 16:28:02 -07:00
Ryan Dahl
615d890622 Upgrade V8 to 2.2.9 2010-05-10 09:58:20 -07:00
Ryan Dahl
8ab238e7de Revert "destroy instead of end http connection at end of pipeline"
This reverts commit 4ce1e1fca5.

To fix test-http-full-response.js. Clearly this is not the correct solution.
Probably need idle timeouts.
2010-05-09 21:29:51 -07:00
Ryan Dahl
15bb392afd Disable test-remote-module-loading
In ab068db9b1 this test was broken because (I
think) compile/run errors are set to crash the program instead of being
passed back.

Error reporting is more important than remote loading. Disabling until there
is a fix
2010-05-09 18:46:04 -07:00
Ryan Dahl
b78508266b Change string.h to strings.h compile on solaris 2010-05-09 16:29:23 -07:00
Ryan Dahl
1ecb11f944 Add failing test - http responses not all complete
Report and test by soderblom.peter@gmail.com
2010-05-09 15:08:54 -07:00
Ryan Dahl
ab068db9b1 Improve error reporting
- No more single line "node.js:176:9" errors
- No more strange output when error happens on first line due to
  module wrapper function.
- A few tests to check these things
2010-05-09 13:55:42 -07:00
Ryan Dahl
1d28cfcfb9 Better logic for testing if an argument is a port
If you did server.listen('123') it would open a socket in the current
directory called 123. Now it will interpret it as a port.
2010-05-09 12:10:42 -07:00
Ryan Dahl
d38d96eb61 Don't emit 'exit' twice from child process 2010-05-08 23:28:26 -07:00
Ryan Dahl
d7762dffe3 Forgot to add child_process_should_emit_error.js 2010-05-08 23:24:24 -07:00
Ryan Dahl
264e540d00 Fix error reporting in child_process callbacks
Issue 120, test case by Nathan Ostgard
2010-05-08 22:13:34 -07:00
rentzsch
a5b132ad63 fs.Stats.size V8::Integer => V8::Number.
While VM::Integer::Value() offers an int64_t, V8::Integer::New() only
accepts an int32_t, truncating fs.Stat's size in BuildStatsObject().

I consider this a bug in V8, and we should move back to V8::Integer
when it gets a ctr that allows a int64_t. Until then, this work-around
should hold.
2010-05-08 19:52:22 -07:00
Ryan Dahl
3ac6deefa8 Change GC idle notify so that it runs along side setInterval
Doesn't appear any slower. Also checks for high memory usage and tries to
force more notifications.
2010-05-07 19:06:05 -07:00
isaacs
bc45adcffa Add binding.close to fs.readFile 2010-05-07 13:17:57 -07:00
Tim Caswell
c07c601c3b fs.readFile uses a buffer internally and will return the raw buffer if no encoding is specified. 2010-05-06 22:22:14 -07:00
Ryan Dahl
62b642a88d fix authors file 2010-05-06 14:15:16 -07:00
Ryan Dahl
d2415945c1 Install node_buffer.h on make install 2010-05-06 14:14:52 -07:00
Ryan Dahl
f711d5343b bump version 2010-05-06 10:39:27 -07:00
Ryan Dahl
6aab6ebe61 Upgrade V8 to 2.2.8 2010-05-06 09:59:35 -07:00
Ryan Dahl
4ce1e1fca5 destroy instead of end http connection at end of pipeline 2010-05-06 09:15:44 -07:00
Thomas Lee
3674563dd5 Fix a bug in http.Client where parsers may be prematurely released back to the free pool. 2010-05-06 00:44:07 -07:00
Jonathan Knezek
82c8973dfa Changed undefined pos to null to prevent hanging on SheevaPlug 2010-05-05 22:34:36 -07:00
Jonathan Knezek
874b80bd6a Added c-ares headers for linux-arm 2010-05-05 22:33:53 -07:00
Ryan Dahl
ab723d022d Add buffer response to http_simple.js 2010-05-04 22:35:55 -07:00
Ryan Dahl
1415650463 Use test port instead of 8000 in test-http-304 2010-05-04 22:06:46 -07:00
isaacs
c0d42b0365 Look in /usr/local/lib/node for modules, so that there's a way to install modules globally 2010-05-04 22:02:16 -07:00
Matt Ranney
eb4951d499 Add proper HTML header for changelog so UTF-8 works. 2010-05-04 21:36:10 -07:00
Ryan Dahl
453c9e6411 Fix whitespace 2010-05-04 21:35:46 -07:00
isaacs
3892628657 Emit a better error message when something strange is sent to OutgoingMessage#write 2010-05-04 18:37:00 -07:00
Ryan Dahl
d044e2de07 Lazy load crypto
The whole program is being slowed down by the large CA string in crypto.
Why?
2010-05-04 14:21:14 -07:00
Rhys Jones
afce4c3ae8 Added default CAs, updated openssl verify behaviour, added crypto and https documentation 2010-05-04 14:12:54 -07:00
Ryan Dahl
b6c5cf60b7 Ignore SIGPIPE
Was inadvertently removed with evcom,
c72967d335 (L10L1900)
2010-05-04 10:41:56 -07:00
Peter Griess
d9882395e2 Fix SEGV by setting msg_controllen earlier.
- Some implementations of CMSG_FIRSTHDR() rely on msg_controllen being
  set correctly, else it returns NULL: see <linux/socket.h>.
2010-05-04 10:32:01 -07:00
Rhys Jones
1a317135c5 Additional OpenSSL tests 2010-05-03 16:15:06 -07:00
Paulo Matias
430cfd1825 Read all records to always empty the OpenSSL reading buffer. 2010-05-03 16:11:42 -07:00
Paulo Matias
3fed1cf36f Make it possible to use client certificates to connect with a nodejs server, and make verifyPeer behaviour consistant. 2010-05-03 16:06:42 -07:00
Ryan Dahl
ea37d98949 Implement writeSync for buffers
(Needs tests still)
2010-05-03 13:26:09 -07:00
Ryan Dahl
3202bce288 Implement fs.readSync for buffers 2010-05-03 13:18:33 -07:00
Ryan Dahl
d76091d7d1 Implement fs.read() for Buffers (again) 2010-05-03 12:56:11 -07:00
Ryan Dahl
7a9c81d2dc Fix memory leak with fs.writeSync 2010-05-03 11:41:30 -07:00
Ryan Dahl
b5bdf9434b Add another http upgrade test 2010-05-03 11:23:36 -07:00
Ryan Dahl
f0fec7352a Don't emit error twice from http.Client 2010-05-03 10:53:52 -07:00
Michaeljohn Clement
fd3e1ca3e2 documentation typos and tweaks 2010-05-03 00:15:35 -07:00
Ryan Dahl
48d58f92f1 Add symbols to release build 2010-05-02 18:20:02 -07:00
Ryan Dahl
d13f518010 Revert changes to node_file.cc
Revert "Fix memory leak in fs.writeSync()"

This reverts commit 5457eae28c.

Revert "Implement fs.read() for buffers"

This reverts commit 692f580a07.
2010-05-02 17:38:32 -07:00
Ryan Dahl
99984772df Allow different ports for http_simple.js 2010-05-02 17:26:18 -07:00
Ryan Dahl
5457eae28c Fix memory leak in fs.writeSync() 2010-05-02 17:02:13 -07:00
Ryan Dahl
61364f9443 GnuTLS -> OpenSSL on website 2010-05-02 11:19:01 -07:00
dpb587
a1f23c1aa1 Fix a couple mistypes in API doc 2010-05-01 19:16:00 -07:00
Micheil Smith
3db613e31a Documenting http.Server#event:upgrade 2010-05-01 19:15:50 -07:00
Micheil Smith
aee226b243 Fixing the 1 byte off error in http.Server's upgradeHead
(And fix up some style issues)
2010-05-01 18:05:53 -07:00
Ryan Dahl
67fb0ece6b Fix deprecation message 2010-05-01 14:45:14 -07:00
Micheil Smith
d6110fbd11 Making requestListener for the construction of a http.Server optional, as it is for net.Server 2010-05-01 11:56:00 -07:00
Micheil Smith
f990f24ad3 Implementing the event emit for Upgrade requests, with tests. 2010-05-01 11:52:40 -07:00
Ryan Dahl
692f580a07 Implement fs.read() for buffers 2010-04-30 18:36:36 -07:00
kriskowal
8d1f1186ca Fixed/Completed buffer copy range checks. 2010-04-30 17:36:21 -07:00
Ryan Dahl
20372d2df3 Fix docs in node_file.cc 2010-04-30 15:35:51 -07:00
Ryan Dahl
285c5ed36f Fix some styling in the docs 2010-04-30 10:33:56 -07:00
Ryan Dahl
5b2801e3ea Add http server 'request' event to docs 2010-04-30 10:31:21 -07:00
Ryan Dahl
3b323027be http server emits 'clientError' 2010-04-30 10:29:35 -07:00
Ryan Dahl
557ba6bd97 bump version 2010-04-29 17:44:51 -07:00
Ryan Dahl
301b44d45d Chunk strings together on Stream buffer 2010-04-29 12:00:37 -07:00
Ryan Dahl
c75e4cb48a fix typos 2010-04-29 10:11:06 -07:00
Ryan Dahl
f919216446 Upgrade http-parser, fixes issue 77
http://github.com/ry/node/issues#issue/77
2010-04-28 23:28:52 -07:00
Thomas Lee
a63ce5cd72 Allow callers to disable PHP/Rails style parameter mungeing in querystring.stringify 2010-04-28 16:18:48 -07:00
Herbert Vojčík
039d13b0c3 DRY binding('stdio') 2010-04-28 16:08:36 -07:00
Ryan Dahl
6d85802100 basicRequest -> module.requireNative 2010-04-28 15:28:21 -07:00
Ryan Dahl
3bb21b5191 Fix signo_string for linux and solaris 2010-04-28 15:07:15 -07:00
Herbert Vojčík
7a72885ede process.evalcx has a deprecation message. 2010-04-28 14:40:11 -07:00
Herbert Vojčík
7e4c1285dc Minor stylistic changes. 2010-04-28 14:39:41 -07:00
Herbert Vojčík
5d9753fccf Fix child_process.cc build failure for FreeBSD. 2010-04-28 14:21:52 -07:00
Felix Geisendörfer
f8a3cf980f Properly handle child process exit codes
The child process 'exit' was returning the status of the process, rather than
the exit code. This patch properly deconstructs the status into the exit code
and the term signal a process may have received.

See:
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-5
and waitpid(2)
2010-04-28 13:54:17 -07:00
Ryan Dahl
9b2aac61b2 Resolve EWOULDBLOCK to string if different thatn EAGAIN 2010-04-28 12:58:51 -07:00
Ryan Dahl
3b75f5070d Upgrade V8 to 2.2.6 2010-04-28 10:46:26 -07:00
Tim Caswell
8f79169aef Remove node.* deprecation messages. 2010-04-28 09:47:50 -07:00
Ryan Dahl
e7a1fa1293 fs.FileWriteStream -> fs.WriteStream, fs.FileReadStream -> fs.ReadStream 2010-04-27 18:52:16 -07:00
Ryan Dahl
5aea12b4c4 stdout should be writable only 2010-04-27 18:45:10 -07:00
Felix Geisendörfer
203561208e Remove coupling dep 2010-04-27 18:17:30 -07:00
Felix Geisendörfer
c143cba590 Get rid of coupling for stdin 2010-04-27 18:02:30 -07:00
Felix Geisendörfer
f2212fa59d Support for FileReadStream.setEncoding 2010-04-27 17:31:04 -07:00
Felix Geisendörfer
76f98c27de Get rid of coupling for stdout 2010-04-27 17:27:34 -07:00
Ryan Dahl
f618551694 Remove callback argument to FileWriteStream.prototype.write 2010-04-27 17:26:10 -07:00
Matt Ranney
d1b352e4b3 Shorten some long lines. 2010-04-27 00:52:40 -07:00
Ryan Dahl
24931f8405 Upgrade V8 to 2.2.5 2010-04-27 00:31:47 -07:00
Matt Ranney
2374e557e3 More Buffer descriptions and examples.
Updated Script examples for New Script methods.
2010-04-27 00:25:58 -07:00
Ryan Dahl
e235aae018 Fix bug in socket write optimization
Thanks to tlb@tlb.org for finding it!
2010-04-26 20:26:43 -07:00
Ryan Dahl
c7b3c1ecbc Add more asserts to test-http-big-proxy-responses 2010-04-26 20:26:36 -07:00
Ryan Dahl
c6248efd73 Compile for beta versions of OpenSSL 1.0.0 2010-04-26 18:53:30 -07:00
Jérémy Lal
0802326fc9 test-dns so that NXDOMAIN does not rise errors 2010-04-26 15:09:03 -07:00
Jérémy Lal
5caf53a053 Add support for MX queries in dns module, works with c-ares upstream patch. 2010-04-26 15:09:03 -07:00
Jérémy Lal
14d1ab5a3e Apply unreleased upstream patch to support parse_mx_reply. 2010-04-26 15:09:03 -07:00
Jonas Pfenniger
df07a713bd New test-case: signal unregistration
The default signal-handler should be restored if no handlers are
assigned.
2010-04-25 23:14:07 -07:00
Ryan Dahl
cee9080381 Fix typos 2010-04-25 22:44:31 -07:00
Jérémy Lal
610faf713d Drop UDNS from node.uselib. Add CARES for --system. 2010-04-24 01:13:42 -07:00
Ryan Dahl
9926dacd14 Remove getaddrinfo from net2.cc 2010-04-23 17:29:36 -07:00
Ryan Dahl
3d6ebbd296 Don't look for GnuTLS in wscript 2010-04-23 17:24:37 -07:00
Ryan Dahl
c72967d335 Remove http_old tcp_old 2010-04-23 17:19:29 -07:00
Ryan Dahl
caa828a242 bump version 2010-04-23 16:37:14 -07:00
Ryan Dahl
bb4ae1769b Link to old versions 2010-04-23 16:37:14 -07:00
mape
b299b4b7a1 Update API doc 2010-04-23 16:37:10 -07:00
Ryan Dahl
16f02403f8 Catch errors from stream events in net.js
Pipe into 'error' event.
2010-04-23 14:08:54 -07:00
Ryan Dahl
e72b7b8002 Upgrade V8 to 2.2.4.2 2010-04-23 12:05:36 -07:00
Krishna Rajendran
7a34afba77 openssl 1.0.0 constification 2010-04-23 10:53:09 -07:00
Brian Hammond
40820ec8d5 Leave pos as undefined to allow reads from unseekable files like /proc/x/smaps on Linux 2010-04-23 10:34:10 -07:00
Ryan Dahl
c9e27b11c5 Unify ErrnoException creation 2010-04-22 17:53:45 -07:00
Ryan Dahl
0633e5cac9 Optimize for few args in EventEmitter.emit 2010-04-22 17:31:35 -07:00
Ryan Dahl
6abdf051d3 Unhandled 'error' events kill program
By default 'error' throws. addListener to prevent this.
2010-04-22 17:22:06 -07:00
Ryan Dahl
11f673e819 curl after server is listening 2010-04-22 15:48:57 -07:00
Ryan Dahl
76d525b034 Remove assert for no-such-module 2010-04-22 14:43:25 -07:00
Ryan Dahl
d70474dc10 SIGPIPE on stdout should kill the process by default 2010-04-22 14:25:13 -07:00
Ryan Dahl
3934cb5485 Force no body on http 204 and 304
Thanks to tjholowayhuk@gmail.com for the test case.
2010-04-21 15:15:21 -07:00
Ryan Dahl
94f9dc67c0 Add link to older tarball versions 2010-04-21 13:16:46 -07:00
isaacs
cfd459abde Move the module loading framework into lib/module.js. Minimal changes otherwise. 2010-04-21 12:05:01 -07:00
isaacs
e0061a511d refactor path module to lib/path.js 2010-04-21 11:38:51 -07:00
isaacs
7ff53f4c6a Refactor events module to lib/events.js 2010-04-21 11:38:46 -07:00
Herbert Vojčík
4badb227cf Fix TCP_KEEPIDLE build failure in FreeBSD. 2010-04-21 10:51:45 -07:00
Julian Lamb
5f8f561d61 add setKeepAlive function, which enables and sets the TCP keep-alive timer 2010-04-20 16:34:21 -07:00
Ryan Dahl
27ec33aad7 Add some libpaths for SSL 2010-04-20 14:44:05 -07:00
Michaeljohn Clement
ac9d9f4e9f better function test in addEventListener 2010-04-20 12:32:18 -07:00
Tim Caswell
61308a5bff Add a note in the API docs about binding to ports and using strings. 2010-04-19 15:52:51 -07:00
Tim Caswell
60de86351a Add Buffer.byteLength docs 2010-04-19 15:51:32 -07:00
Ryan Dahl
ff6409469d Make 'make distclean' work on solaris 2010-04-19 15:48:12 -07:00
Ryan Dahl
6e715b82d0 Upgrade Waf to 1.5.16 2010-04-18 19:57:13 -04:00
Standa Opichal
fa514a9f16 Do a manual check for openssl if 'pkg-config openssl' fails.
This makes the node_crypto module available for node built using just a
default OS X dev environment (no darwinports or fink).
2010-04-18 17:25:05 -04:00
Herbert Vojčík
8daa1f8d04 Docs for Script class of 'evals' binding. 2010-04-18 17:23:01 -04:00
Ryan Dahl
4ff45c264c Remove old EvalCX 2010-04-18 15:44:23 -04:00
Herbert Vojcik
c2a06725d6 Script class with eval-function-family in binding('evals') plus tests. 2010-04-18 15:01:36 -04:00
Matt Ranney
39464b498f Add docs for new REPL options and fill out description of commands. 2010-04-15 18:03:56 -07:00
Rhys Jones
3510669db2 Fixed ssl client and server examples 2010-04-15 20:03:55 +01:00
Rhys Jones
8efab857d0 Merge branch 'master' into openssl 2010-04-15 19:57:35 +01:00
Rhys Jones
e4a6b72ae3 Added test and started tidy-up of node_crypto.cc 2010-04-15 19:57:17 +01:00
Micheil Smith
6ad18a27a0 Fix upgradeHead bounds. 2010-04-15 11:19:54 -07:00
Rhys Jones
e6a1091cc6 Merge branch 'master' into openssl 2010-04-15 10:56:42 +01:00
Ryan Dahl
311d7dee19 bump version 2010-04-15 02:09:51 -07:00
Ryan Dahl
2ad587cc35 Default to UTF8 on stream write 2010-04-15 02:09:51 -07:00
Ryan Dahl
5281f29012 Use new method of getting chars written for UTF8 2010-04-15 02:09:51 -07:00
Ryan Dahl
d2e1b0855f Move two broken tests to disabled folder 2010-04-15 01:37:27 -07:00
Ryan Dahl
ac3bc2ed41 Simplify GC idle notification
In particular, don't leave the timeout running when the heap is fully
compacted.
2010-04-15 01:30:58 -07:00
Rhys Jones
d27d6dcc6f Merge branch 'master' into openssl 2010-04-15 06:21:15 +01:00
Rhys Jones
fbad5dc062 Updated https support 2010-04-15 06:17:22 +01:00
Ryan Dahl
4efe27bbab Add execFile() for Orlando
Undocumented for now, but basically like exec() with args.
2010-04-14 18:50:44 -07:00
Ryan Dahl
9cf2a02d8b Add timeout and maxBuffer options to child_process.exec 2010-04-14 11:59:24 -07:00
Ryan Dahl
41ef1717e0 Upgrade V8 to 2.2.3.1 2010-04-14 10:34:27 -07:00
Ryan Dahl
760bba5518 Support Upgrade in HTTP messages
This allows for web servers to be "hijacked" and used as Web Socket servers
(or other). You simply listen for requests as normal, but check if

  req.upgrade === true

If so, this will be the last request of the connection. It's your job now to
hijack req.connection and start reading from it. req.upgradeHead is a buffer
containing the first part of the new protocol communication (in the case it
arrived on the same packet).

This needs tests and documentation. API subject to change.
2010-04-14 03:52:15 -07:00
Ryan Dahl
af49187e57 Upgrade http-parser 2010-04-14 03:22:38 -07:00
Ryan Dahl
684740c232 net.js: Slice the right buffer in _writeOut 2010-04-14 00:41:56 -07:00
Ryan Dahl
b8c0349750 Fix triple buffer slice bug 2010-04-14 00:36:34 -07:00
Rhys Jones
144200435f Merge branch 'master' into openssl
Conflicts:
	lib/net.js
	wscript
2010-04-14 07:31:33 +01:00
Ryan Dahl
a934566eb9 Disable test-idle-watcher
IdleWatcher was disabled in a98d23d905
2010-04-13 16:57:19 -07:00
Ryan Dahl
b549b3fcce Fix test case style 2010-04-13 16:43:15 -07:00
Ryan Dahl
6732e7fa17 Add big proxy failing test
GH-77. Code by Robert Newson <robert.newson@gmail.com>
2010-04-13 16:22:14 -07:00
Ryan Dahl
71dc232f93 Use === instead of == for END_OF_FILE compares
This caused a very hard to track down bug. Thanks to Mikeal Rogers for this
fix. Unfortunately we were unable to put together a test case.
2010-04-13 15:56:08 -07:00
Ryan Dahl
a98d23d905 Disable IdleWatcher 2010-04-13 15:43:58 -07:00
Ryan Dahl
4e7e2f8724 Change nextTick implementation for the better
Use a prepare and idle watcher to execute the nextTick callback more
quickly. Test provided by Matt Ranney.
2010-04-13 15:43:46 -07:00
Ryan Dahl
57edff1f31 Remove mixin from docs 2010-04-13 13:50:17 -07:00
Ryan Dahl
b98cd6753b process.mixin: deprecation -> removed 2010-04-13 13:45:31 -07:00
Micheil Smith
57ea07ac91 Moving the http.js, net.js FreeList to being standalone. 2010-04-12 16:57:45 -07:00
Ryan Dahl
b7947e45c0 Recycle http client parsers 2010-04-12 16:34:39 -07:00
Ryan Dahl
1efd261572 doc typo 2010-04-12 16:27:04 -07:00
Matt Ranney
afe3c1cdea Buffer partial reads before doing expect match. 2010-04-12 14:38:16 -07:00
Rhys Jones
80174392bb Moved Credentials into crypto module. Added node_crypto into crypto module 2010-04-12 21:25:16 +01:00
Ryan Dahl
4681e34c1e Fix a race condition or two in net.js
When making a TCP connection, readyState returns 'opening' while resolving
the host. However between the resolving period and the establishing a
connection period, it would return 'closed'. This fixes it.

This change also ensures that the socket is closed before the 'end' event is
emitted in the case that the socket was previously shutdown.
2010-04-12 12:38:11 -07:00
Rhys Jones
45b8d24ea6 Added https server support 2010-04-12 20:36:46 +01:00
Rhys Jones
c9f71a807c Added https support 2010-04-12 18:57:22 +01:00
Tim Caswell
62d9852c3d Replace slow and broken for..in loops with faster for loops over the keys. 2010-04-12 10:34:35 -07:00
Matt Ranney
b7441040f8 REPL can be run from multiple different streams.
e.g. from UNIX sockets with socat.
2010-04-12 00:31:51 -07:00
Ryan Dahl
cc9d5ab546 C-Ares shouldn't iterate over all Object.prototype elements
and furthermore error out of one of them isn't a DNS option.

Test case by Ben Lund <ben.lund@gmail.com>; additional help from Tim Caswell
<tim@creationix.com>.
2010-04-11 16:12:20 -07:00
Matt Ranney
715e119eea Fix typo in comments. 2010-04-11 15:47:29 -07:00
Ryan Dahl
8553e8a15d Add incoming.httpVersion 2010-04-11 15:15:36 -07:00
isaacs
57fbb627ca trailing whitespace fixes 2010-04-11 14:48:23 -07:00
Ryan Dahl
93913dbdb8 Add failing test for HEAD requests
Needs to be fixed for 0.2.
2010-04-11 12:21:36 -07:00
James Herdman
dd50b86449 Fix documentation errors for DNS 2010-04-11 12:16:36 -07:00
Ryan Dahl
07e64d45ff bump version 2010-04-09 17:05:03 -07:00
Ryan Dahl
54f02345b5 Fix doc again 2010-04-09 16:52:10 -07:00
Ryan Dahl
ee3026797c More documentation work. Remove long lines 2010-04-09 15:34:08 -07:00
Ryan Dahl
03ea4b644e Improve(\?) docs 2010-04-09 14:51:20 -07:00
Micheil Smith
fd0bebcdbc Mods to the docs 2010-04-09 12:45:44 -07:00
Ryan Dahl
9331218449 Servers shouldn't die on EMFILE 2010-04-09 10:44:13 -07:00
Ryan Dahl
b36f11d7b5 Set old/new from benchmark script args 2010-04-09 10:42:20 -07:00
Tim Caswell
ff56d6364e Fix child_process to use end() instead of close() in the stdin stream. 2010-04-09 10:01:47 -07:00
Herbert Vojcik
06b9c8bf1f Fix of normalizing paths of form ./../the/rest 2010-04-09 08:01:36 -07:00
Ryan Dahl
a5184fe938 Change api.html style 2010-04-08 22:42:02 -07:00
Ryan Dahl
323a5e11e5 Change how events are represented in docs 2010-04-08 17:39:33 -07:00
Matt Ranney
631e5bf5cb Improve child_process documentation. 2010-04-08 16:31:36 -07:00
Ryan Dahl
08a09bb50a Use some more Binary/F methods for Buffer 2010-04-08 16:31:02 -07:00
Ryan Dahl
b8bb6e9007 Close child process stdin on SIGCHLD 2010-04-08 15:20:13 -07:00
Ryan Dahl
499c615c9e Doc changes for new API (part 1) 2010-04-08 15:00:08 -07:00
Felix Geisendörfer
b544185bd8 Fix doc toc for small screens
Only make the toc fixed position for big screens.
2010-04-08 14:20:43 -07:00
Felix Geisendörfer
1a9c9b0c55 Bring back the old manual style
This brings back the old manual style, including the toc and syntax
highlighting.
2010-04-08 14:20:33 -07:00
Ryan Dahl
50c70ac714 Update stream API: forceClose() -> destroy(), close() -> end() 2010-04-08 12:24:29 -07:00
Ryan Dahl
7faf7d5c8d Put file stream methods into prototype, small style fixes 2010-04-08 11:26:26 -07:00
Ryan Dahl
3819920d77 Rename binding reference in fs.js 2010-04-08 11:26:26 -07:00
Herbert Vojcik
c16508c87a Better require.async throw test 2010-04-08 08:17:58 -07:00
isaacs
de9778b5bd Add line breaks to the code when the user types a line break 2010-04-08 08:12:30 -07:00
Ryan Dahl
7a6b5635eb Revert "Enable TCP timeout by default"
Causing programs to not exit gracefully.

This reverts commit cb84cde4d4.
2010-04-08 07:19:42 -07:00
Ryan Dahl
62277ab79b Support both old and new HTTP closing APIs in benchmark program 2010-04-08 01:00:35 -07:00
Ryan Dahl
cb84cde4d4 Enable TCP timeout by default 2010-04-08 00:59:57 -07:00
Ryan Dahl
d923c94a0c Remove udns 2010-04-07 18:25:37 -07:00
Ryan Dahl
0281e1acf6 Fix benchmark script for testing both old and new version 2010-04-07 16:19:50 -07:00
Ryan Dahl
970e9025fe Remove debugging statements from dns_cares 2010-04-07 16:09:10 -07:00
Ryan Dahl
33e774eeba Use c-ares in lib/net.js 2010-04-07 16:05:07 -07:00
Ryan Dahl
8f671041a5 Check for ip address in dns_cares.lookup 2010-04-07 16:04:33 -07:00
Ryan Dahl
f13e2f96e4 Add a simple c-ares test, dns_cares.lookup() for easy resolv 2010-04-07 15:37:08 -07:00
Ryan Dahl
f56ff0de92 Add darwin-x86, linux-x86_64 c-ares headers 2010-04-07 13:39:11 -07:00
Ryan Dahl
9ea8c9f2b0 Clean up c-ares platform includes, add support for a few more 2010-04-07 13:34:40 -07:00
Ryan Dahl
eac3dc9d5f Bugfix: net.js flushing, _doFlush typo 2010-04-07 11:47:46 -07:00
Herbert Vojcik
d36bb6536e Better require.async tests 2010-04-07 11:47:45 -07:00
Vanilla Hsu
067f4086b6 add c-ares' freebsd support. 2010-04-07 09:36:35 -07:00
Ryan Dahl
888a494ad8 Update LICENSE file with C-Ares info 2010-04-07 01:45:20 -07:00
Krishna Rajendran
96df65e88e Make test-dns.js use dns_cares. 2010-04-07 01:29:20 -07:00
Krishna Rajendran
dc1f4ebd44 c-ares based dns module 2010-04-07 01:29:05 -07:00
Ryan Dahl
e9a116fe02 Include c-ares in deps/ 2010-04-07 01:17:49 -07:00
Vanilla Hsu
25adb2eb55 [FreeBSD] use /dev/null instead /dev/mem
Without this patch, Node needs to setgid kmem when run as normal user.
2010-04-06 22:05:12 -07:00
Ryan Dahl
38041fcaa0 Try out Flatten API
Speeds up WriteUtf8 significantly when dealing with strings made by the
concatenation of many others.
2010-04-06 16:15:09 -07:00
Ryan Dahl
ca0038bf2f Add mising EV_DEFAULT_UC in ev_now() 2010-04-06 15:23:42 -07:00
Vanilla Hsu
d7a4501057 freebsd install execinfo's header to /usr/local, add it to include path. 2010-04-06 10:23:43 -07:00
Ryan Dahl
53dd9fe200 Fix bug in buffer.utf8Write() which included \u0000 2010-04-05 18:10:36 -07:00
isaacs
4befe93a4b Add ini.stringify functionality, a test, and some TODOs in ini.js 2010-04-05 17:05:35 -07:00
Ryan Dahl
1b758ef268 Allow stream to write on close 2010-04-05 16:50:05 -07:00
Ryan Dahl
801fb8a614 Better, faster, idle notification 2010-04-05 14:04:14 -07:00
Ryan Dahl
0301adf9b4 In tests, wait for 'listening' before connecting 2010-04-05 11:32:18 -07:00
Ryan Dahl
b0d1d6c2b9 Reset stdin, stdout fd flags on exit
In vim, lauching node as a child process would mess up the screen. This was
because Node was changing the flags on STDIN_FILENO and STDOUT_FILENO
(particularly adding O_NONBLOCK) but those flags leaked into the parent
process.
2010-04-04 22:51:30 -07:00
Ryan Dahl
85487c82d0 Blob struct should not contain actual data
This is to allow eventual realloc without messing up the data_ references in
all the slices.
2010-04-04 21:37:08 -07:00
Ryan Dahl
01f7d4484e Upgrade to WAF 1.5.15 2010-04-04 21:12:25 -07:00
Ryan Dahl
ec0266a56c Update libev's clock when starting timers
Make the timeouts more accurate. See test/pummel/test-timers.js
2010-04-04 19:33:12 -07:00
Ryan Dahl
b72ffc0e07 Add buffer.copy 2010-04-04 18:59:40 -07:00
Ryan Dahl
cd577d503d Upgrade V8 to 2.2.0.3 2010-04-04 18:07:32 -07:00
Ryan Dahl
129310676d Fix style in SSL patch 2010-04-02 17:30:49 -07:00
Rhys Jones
c55c0a1fca Add SSL tests 2010-04-02 17:14:03 -07:00
Rhys Jones
fb3a9cd0d8 Initial openssl support for net2 2010-04-02 17:13:54 -07:00
Ryan Dahl
ae805f1057 Emit 'error' on tcp connection DNS error 2010-04-02 16:15:53 -07:00
Ryan Dahl
c0e18f37d4 Don't reference fixtures/multipart.js 2010-04-02 16:02:48 -07:00
Ryan Dahl
94644d743c Remove multipart library
Too messy, unmaintainable. Pull it out of the history if you need it.
2010-04-02 16:01:16 -07:00
Ryan Dahl
53530e981a Fix test-http-chunked. Need to check for \0 at end of utf8 strings 2010-04-02 14:55:28 -07:00
Ryan Dahl
b9106b0ecd Use AF_INET sockets instead of always AF_INET6
You can get AF_INET6 still, it's just not the only choice.
2010-04-02 13:20:56 -07:00
Ryan Dahl
fdae14070c Move buffer constants at the top of net.js
Remove some cruft.
2010-04-01 16:46:37 -07:00
Ryan Dahl
e232cf3100 Hack to support UTF8 writes again! 2010-04-01 16:24:36 -07:00
Ryan Dahl
3197cf291d Better flushing
Lost Utf8 support. Waiting for http://codereview.chromium.org/1539013
2010-04-01 15:53:48 -07:00
Tim Caswell
7af9cb9e80 Don't put an extra comma after bases in inspect.
{ [Function]     { [Function]
, more: true  =>   more: true
, more2: true    , more2: true
, more3: true    , more3: true
, more3: true    , more4: true
, more3: true    , more5: true
}                }
2010-04-01 08:58:19 -07:00
Ryan Dahl
4279725d79 Fix thread flags on Solaris
Also on other platforms use -pthread for compiling commands not just
linking because I noticed in the gcc(1) man page

  -pthread
      Adds support for multithreading with the pthreads library. This
      option sets flags for both the preprocessor and linker.

Removing the errno check in deps/coupling because it was a hack
(e165859c2e) added to fix stdio problems.
Without adding -threads, errno is not thread local, and coupling was not
correctly checking the errno. It appears -mt does nothing to gcc/solaris.
2010-03-31 13:44:36 -07:00
Ryan Dahl
d52f63d9b2 fix whitespcae in deps/coupling 2010-03-31 11:27:57 -07:00
Johan Dahlberg
18de108e4c Bugfix: watchFile, unwatch, watch causes error
Fixed bug that caused application to cast a "TypeError: Cannot call method
'addListener' of undefined" when first watching a file, unwatching and then
watching same file again.
2010-03-31 10:38:25 -07:00
Ryan Dahl
aec80d47bb Better check for FDs in net2 bindings 2010-03-31 08:20:59 -07:00
Herbert Vojcik
da16128bf6 missing return after forceClose 2010-03-31 08:13:03 -07:00
Herbert Vojcik
9e97e185ad EAI_NODATA deprecated, patch to use EAI_NONAME if missing (it is in FreeBSD) 2010-03-31 08:12:35 -07:00
Ryan Dahl
52b295400d Revert "Upgrade V8 to 2.2.0"
Experiencing strange errors on all platforms due to this commit. EG
http://buildbot.nodejs.org:8010/builders/Linux%20AMD64/builds/107/steps/shell_2/logs/stdio

This reverts commit 40ea061c30.
2010-03-29 16:42:39 -07:00
Matt Ranney
7c77a56b4a Improve documentation. 2010-03-29 11:23:27 -07:00
Ryan Dahl
40ea061c30 Upgrade V8 to 2.2.0 2010-03-29 01:04:53 -07:00
Ryan Dahl
d1b78c3f5d More efficient Stream.write 2010-03-27 14:07:43 -07:00
Ryan Dahl
aa6a785286 Add note about where to find ronn 2010-03-26 19:32:19 -07:00
Tim Caswell
179f718d62 Conversion to markdown based API docs.
With help from Matt Ranney <mjr@ranney.com>
2010-03-26 18:28:40 -07:00
Ryan Dahl
6ecdeada49 Remove -Werror on V8 -_- 2010-03-26 09:58:21 -07:00
Ryan Dahl
6192b8659a Upgrade V8 to 2.1.10 2010-03-26 09:09:40 -07:00
Ryan Dahl
bb00fef3cd Change Buffer.toString to conform to CommonJS Binary/F
Also add Buffer.inspect
2010-03-26 08:36:08 -07:00
Ryan Dahl
7ed80451ca Increase pool.used before making 'data' event 2010-03-26 08:35:12 -07:00
Ryan Dahl
a49bf8622f Finish V8 update 2010-03-25 15:01:59 -07:00
Ryan Dahl
48f5f77713 Update to V8 2.1.9.1 2010-03-25 09:53:58 -07:00
Ryan Dahl
6740dd48b3 Change Buffer toString() output 2010-03-25 09:50:49 -07:00
Ryan Dahl
3546106c43 Add req.connection and res.connection 2010-03-24 07:21:00 -07:00
Ryan Dahl
6f21ac1282 Don't free http parser for the client!
Fixes test-http-client-race.js, test-http.js
2010-03-23 21:41:42 -07:00
Ryan Dahl
5c6f063ef2 snake to camel in HTTP 2010-03-23 21:31:44 -07:00
Ryan Dahl
70ffdf5db9 Fix HTTP keep-alive 2010-03-23 21:10:01 -07:00
Ryan Dahl
6b6dcf4aad Move test-child-process-spawn-loop to pummel/ 2010-03-23 21:02:30 -07:00
Ryan Dahl
218d7e9f2d Clean up NODE_DEBUG detection
It wasn't detecting if NODE_DEBUG=0
2010-03-23 20:56:51 -07:00
Ryan Dahl
8e9ec4abea Fix idle timeouts
Remove process.now because it doesn't provide enough precision.
2010-03-23 20:54:19 -07:00
Ryan Dahl
3238944c7a Don't use sys.puts for debug in net.js 2010-03-23 18:10:13 -07:00
Ryan Dahl
a01d8a0d68 Timer clean ups
Also bugfix getting pointer to C++ class in watcher
2010-03-23 17:28:26 -07:00
Ryan Dahl
b35d72df76 Upgrade V8 to 2.1.7 2010-03-23 15:19:32 -07:00
isaacs
6e603ccbe2 Fix debug statement that was using puts instead of debug() 2010-03-23 08:54:05 -07:00
arlolra
6f84063a3b Migrates benchmarks to the new api. 2010-03-23 08:13:17 -07:00
Ryan Dahl
54d4efd44b Upgrade http-parser
Now at version 6f72c780f0a237a775150a9963bcdf5299685cde
2010-03-22 09:00:43 -07:00
Ryan Dahl
765f0cdece Fix ChildProcess::Kill 2010-03-22 05:06:13 -07:00
Ryan Dahl
bfdc421dda Don't kill negative PIDs
Fixes issue GH-79.
2010-03-20 03:01:17 -07:00
Ryan Dahl
069099a3e3 Remove old test file 2010-03-19 23:45:28 -07:00
Ryan Dahl
c66a0a739f recvBuffer -> pool 2010-03-19 23:09:16 -07:00
Ryan Dahl
cc053e7df7 Merge branch 'net2'
Expect instability on the master branch for a while.
Problems:
  - Documentation is not yet updated

  - SSL support is gone! It needs to be redone for net.js.  Use 'tcp_old'
    and 'http_old' if you need it. I want to use OpenSSL now, talk to me if
    you'd like to work on it.

  - fs.write() supports Buffers a little. See src/node_file.cc for details
    fs.read() not yet. The file streams need to be updated to handle Buffer.

  - The Buffer API will probably change.
2010-03-19 21:52:09 -07:00
Ryan Dahl
04001fb591 Don't deprecate readyState, yet 2010-03-19 21:51:07 -07:00
Ryan Dahl
ebe2721cbf Don't use sys.debug, it gets preprocessed out
Problem introduced in b29f78772e
2010-03-19 21:50:11 -07:00
Ryan Dahl
903977d5e8 Merge branch 'master' into net2
Conflicts:
	test/simple/test-event-emitter-modify-in-emit.js
2010-03-19 21:48:39 -07:00
Ryan Dahl
139c91e892 Support old 'binary' encoding in net.js 2010-03-19 21:25:29 -07:00
Ryan Dahl
663269f687 old tcp module is now tcp_old 2010-03-19 21:22:11 -07:00
Ryan Dahl
618296ef57 bump version 2010-03-19 21:07:03 -07:00
Ryan Dahl
025116f8d0 Move Buffer into own module 2010-03-19 20:58:24 -07:00
Zoka
b29f78772e Eliminate debug(x) statements from src/node.js and lib/*.js for release build
http://groups.google.com/group/nodejs/browse_thread/thread/8f20bcef6d6d96b7
2010-03-19 20:56:03 -07:00
Ryan Dahl
ac684f3583 Add legacy 'binary' encoding/decoding methods to Buffer 2010-03-19 20:33:09 -07:00
Ryan Dahl
b80f6e9ed1 http2 now default 2010-03-19 19:52:09 -07:00
Ryan Dahl
4278f35e89 Add support for Buffer to fs.write 2010-03-19 18:36:22 -07:00
Ryan Dahl
776c3e2b29 Add note about Buffer abstraction 2010-03-19 12:08:57 -07:00
Ryan Dahl
3a993d8897 Buffer.utf8ByteLength -> Buffer.byteLength 2010-03-19 12:02:59 -07:00
Ryan Dahl
3e969f0f74 Random net.js clean ups 2010-03-19 11:46:35 -07:00
Ryan Dahl
0c64768cb4 Don't error out when buffer.utf8Write() doesn't fit 2010-03-19 11:46:09 -07:00
Ryan Dahl
f8c3b6009d Remove send fd functionality
It was broken anyway. It will go into its own class later.
2010-03-19 11:34:26 -07:00
Ryan Dahl
e01464373f Speed up test-buffer 2010-03-19 11:30:51 -07:00
Ryan Dahl
90295d9fce [net2] inline write on empty write buffer for performance 2010-03-19 02:24:16 -07:00
Herbert Vojcik
9e8afe9133 DRY loading native module 2010-03-18 22:23:13 -07:00
Ryan Dahl
1762abcece http2 now passes all tests 2010-03-18 15:49:42 -07:00
Ryan Dahl
916e057fea Add 'opening' readyState 2010-03-18 14:33:42 -07:00
Carson McDonald
e5cbe73a82 Better EventEmitter modify-in-emit
Changed ReallyEmit so that it clones the Array of listeners before
processing the emit. Added better tests to make sure that modifying
listeners inside event handlers doesn't cause later listeners to be skipped
or added.
2010-03-18 14:08:20 -07:00
Ryan Dahl
33d5c46e8c All tests to use http2 2010-03-18 14:01:17 -07:00
Ryan Dahl
6db43f4c29 net2 HTTPClient work 2010-03-18 13:21:52 -07:00
Scott Taylor
39f0ef9d4a Remove duplicate shebang filtering 2010-03-18 07:56:54 -07:00
Tim-Smart
df8164c1c3 node.cc: EvalCX: Third argument as filename 2010-03-18 07:51:32 -07:00
Ryan Dahl
1332cafb7c s/Socket/Stream/g 2010-03-17 16:31:24 -07:00
Ryan Dahl
b865f9e9c8 Merge branch 'master' into net2 2010-03-17 16:24:43 -07:00
Ryan Dahl
2d7e86ef58 Upgrade V8 to 2.1.5 2010-03-17 15:52:57 -07:00
pyrotechnick
8aaffe71ee Fixing a typo in the fs.readFile example. 2010-03-17 14:44:15 -07:00
Ryan Dahl
04c06b9149 child process now use net.Socket 2010-03-17 14:00:17 -07:00
Krishna Rajendran
84277ea845 Check for callback argument in PTR lookup 2010-03-17 00:46:44 -07:00
isaacs
31ed37fdf0 evalcx shouldn't be too fancy
After getting some feedback from Mikeal Rogers and Tim Smart, it was decided
that evalcx should not try to do any fancy security stuff, and instead leave
that in the hands of the user. To comply more with spidermonkey, everything
is passed in, and objects are passed in by reference rather than being
cloned.
2010-03-16 20:09:13 -07:00
Ryan Dahl
217e4b40d4 Check for callback argument in DNS functions 2010-03-16 10:48:14 -07:00
Krishna Rajendran
3c97a4391a Update test-dns.js to work with latest api 2010-03-16 10:29:43 -07:00
Krishna Rajendran
3847add943 Fix calls to dns bindings in dns.js 2010-03-16 10:29:16 -07:00
isaacs
943b2c61a8 Make evalcx work like it's supposed to.
1. Move the context->Enter() call so that the global obj is available for writing.
2. On success, copy the modified global out to the sandbox object.
3. Don't copy functions in either direction.  They have scope and closures, and make for craziness when trying to keep contexts separate.
4. Only do the ->ToObject->Clone() on objects, so that simple values stay simple.
5. Update the test so that it tests all this stuff.
2010-03-16 10:27:47 -07:00
Ryan Dahl
953fa3a5f5 Move net2 bindings out of process 2010-03-15 16:44:50 -07:00
Ryan Dahl
5d5c8cf04a Fix StatWatcher typo 2010-03-15 15:53:44 -07:00
Ryan Dahl
fdf46a65c9 Use streams for stdout and stdin 2010-03-15 15:11:40 -07:00
Ryan Dahl
cbfd4da818 Merge branch 'master' into net2
Conflicts:
	src/node.cc
2010-03-15 14:34:01 -07:00
Ryan Dahl
6befc72f82 Add missing lib/events.js 2010-03-15 14:25:06 -07:00
Ryan Dahl
c90546f138 Move native js files into binding object 2010-03-15 14:24:15 -07:00
Ryan Dahl
8492c52e15 Use uniform watcher names 2010-03-15 14:24:15 -07:00
Ryan Dahl
627fb5adbb Load c++ modules on demand 2010-03-15 14:24:15 -07:00
Ryan Dahl
3994340a45 Fix gcc warnings in node.cc 2010-03-15 12:50:00 -07:00
Ryan Dahl
5c712a7da5 Lazy load fs.readFile 2010-03-15 10:41:58 -07:00
Ryan Dahl
1256df76bc remove whitespace 2010-03-15 09:02:52 -07:00
Ryan Dahl
d96c52694a Upgrade V8 to 2.1.4 2010-03-15 08:39:56 -07:00
Ryan Dahl
a6f904cab7 Tests should use compiled-in modules not build-dir modules 2010-03-15 08:14:51 -07:00
Ryan Dahl
1395cba6ce Remove require.paths from process object 2010-03-15 08:07:33 -07:00
Ryan Dahl
4ccdc501d4 Include lib/ directory in node executable. Compile on demand.
Instead of installing the files in /usr/lib/node/libraries and loading them
from the file system, the files are built-in to the node executable.
However, they are only compiled on demand.

The reasoning is:
  1. Allow for more complex internal javascript. In particular,
  process.stdout and process.stdin can be js implemented streams.

  2. Ease system installs. Loading from disk each time is unnecessary
  overhead. Note that there is no "system" path for modules anymore. Only
  $HOME/.node_libraries.
2010-03-15 08:04:35 -07:00
Krishna Rajendran
0d5a1fed33 Use gai_strerror when tcp.Server fails to resolve its address or service. 2010-03-14 23:08:45 -07:00
Jed Schmidt
004faf3846 Added check to make sure writeHead() is called before write(), to prevent silent failure. 2010-03-13 22:27:51 -08:00
Herbert Vojčík
49d30c6478 Only Ref in idle watcher when wasn't already active. 2010-03-13 20:45:26 -08:00
Ryan Dahl
7be0d06238 FreeBsd->Solaris on homepage 2010-03-13 12:47:41 -08:00
Scott González
d2ec5c23cf Fixed typo in comment for require.registerExtension(). 2010-03-13 12:29:33 -08:00
Ryan Dahl
ffeb4722d4 small wscript error 2010-03-13 12:20:09 -08:00
Ryan Dahl
61c8014135 bump version 2010-03-12 18:50:46 -08:00
Ryan Dahl
96f08cf05c Work on net2 http client 2010-03-12 18:39:02 -08:00
Ryan Dahl
c6ebfb0cc6 Merge branch 'master' into net2 2010-03-12 13:51:00 -08:00
Ryan Dahl
d7efb0fdb2 Factor out TryCatch in ReallyEmit 2010-03-12 13:48:03 -08:00
Ryan Dahl
2c7cbbc1b0 Optimize event emitter for single listener 2010-03-12 13:47:56 -08:00
Ryan Dahl
aa6eaae0aa Simplify Socket constructor 2010-03-12 13:06:05 -08:00
Ryan Dahl
b571900d9c Fix node_timer bug; sometimes was not initializing watcher 2010-03-12 12:56:10 -08:00
Ryan Dahl
c857d65dd3 Disable test-net-fd-passing for now 2010-03-12 12:43:28 -08:00
Ryan Dahl
28211519b6 Merge branch 'master' into HEAD
Conflicts:
	lib/fs.js
	wscript
2010-03-12 12:42:15 -08:00
Ryan Dahl
3adf7a3dcf TCP timeout opt-in instead of opt-out
For speed, idle connections are super cheap.
2010-03-12 12:39:37 -08:00
Ryan Dahl
b94af8d6b1 Only print readyState deprication message once 2010-03-12 12:34:25 -08:00
Ryan Dahl
836e6a3fcb Adjust object ref count after call to ev_timer_again 2010-03-12 12:27:41 -08:00
Ryan Dahl
177de8fefc Fix some gcc warnings 2010-03-12 12:21:27 -08:00
Ryan Dahl
3d10852c33 Disable AsciiSliceExt
Seems faster and less buggy?
2010-03-12 12:21:27 -08:00
Ryan Dahl
c1613e6ebb Deprecate process.mixin 2010-03-12 09:23:05 -08:00
Tim-Smart
ae10a48383 Initial implementation of process.evalcx 2010-03-12 08:22:48 -08:00
Ryan Dahl
6ec2f877c2 Depreciation -> Deprecation 2010-03-11 23:50:41 -08:00
Vanilla Hsu
b13081691e use getpagesize() to get PAGE_SIZE on FreeBSD. 2010-03-11 23:32:13 -08:00
Vanilla Hsu
116dfb8740 1: sync wscript with libeio.m4 2: try to enable macosx's sendfile. 2010-03-11 22:07:50 -08:00
Ryan Dahl
c96b7e5ca0 Missing EOL semicolons 2010-03-11 22:05:09 -08:00
Ryan Dahl
dd857f9fdf .addon -> .node
How'd that get in there?
2010-03-11 22:04:00 -08:00
Tim-Smart
0c17067d87 Add require.registerExtension 2010-03-11 22:00:55 -08:00
Ryan Dahl
6bd11f147a Fix undefined reference in fs.js 2010-03-11 14:32:10 -08:00
Ryan Dahl
ff2457754c Upgrade libeio 2010-03-11 14:31:51 -08:00
Jérémy Lal
c93bab141c Add --system option to configure, so make uses V8, EV, UDNS system libraries and headers. 2010-03-11 14:00:19 -08:00
Ryan Dahl
6d9227b79a Make relative ref to sys in fs module. 2010-03-11 12:48:47 -08:00
Ryan Dahl
ca862d75de [net2] Add Socket.setTimeout
Still seeing crashes and performance problems.
2010-03-11 12:43:32 -08:00
Ryan Dahl
4635ed7fde Add process.now
Faster way to find out current time.
2010-03-11 12:40:24 -08:00
Ryan Dahl
462a8f8652 add error listener to test-net-pingpong 2010-03-11 12:39:50 -08:00
Ryan Dahl
9b67962a44 Add timer.again method 2010-03-11 12:38:42 -08:00
Ryan Dahl
03f2bfe51f Make relative ref to sys in fs module. 2010-03-11 12:37:37 -08:00
Ryan Dahl
358b7516c7 Adjust process.compile documentation 2010-03-11 10:27:20 -08:00
isaacs
976983960d More ini parser features.
Update the ini parser to support some more whitespace cases, turn lines
without an equal sign into a "flag" that's just true if set, and support
comments.
2010-03-10 21:44:59 -08:00
Ryan Dahl
777e1a6c69 Merge branch 'master' into net2 2010-03-10 11:03:32 -08:00
Ryan Dahl
70b2a44579 Remove -Werror from V8 2010-03-10 11:03:26 -08:00
Ryan Dahl
7eb126474d Merge branch 'master' into net2 2010-03-10 11:02:01 -08:00
Ryan Dahl
073947c150 Upgrade V8 to 2.1.3 2010-03-10 10:50:46 -08:00
Ryan Dahl
0918bb2070 Adjust a few more tests to work with net2 2010-03-09 18:37:23 -08:00
Ryan Dahl
c1a0ade7e7 Further net2 compatibilities 2010-03-09 16:27:49 -08:00
Standa Opichal
c2c0cfb75f Making sure node-waf finds its real bindir even when executed through a symlinked path. 2010-03-09 13:05:44 -08:00
Ryan Dahl
b07f2e25f4 Update http2 for new stream API 2010-03-09 12:00:06 -08:00
Ryan Dahl
264a67aed2 Update net.js for new stream API 2010-03-09 11:59:42 -08:00
Ryan Dahl
dd21a4f4b9 Remove the 'Error: (no message)' exceptions print stack trace instead 2010-03-09 11:21:19 -08:00
Ryan Dahl
6310e717e4 Remove the 'Error: (no message)' exceptions print stack trace instead 2010-03-09 11:20:58 -08:00
Ryan Dahl
93c0c24a4e process.mixin: Return instead of continue in forEach 2010-03-09 10:54:26 -08:00
Ryan Dahl
c69d3f4a35 Don't use process.mixin in test-buffer.js 2010-03-09 10:54:01 -08:00
Ryan Dahl
faffee0c62 Merge branch 'master' into net2 2010-03-09 10:45:06 -08:00
Ryan Dahl
00333d59d6 process.inherits -> sys.inherits 2010-03-09 10:33:19 -08:00
Aaron Heckmann
f8eb163728 Add removeAllListeners 2010-03-09 09:30:14 -08:00
isaacs
b90d63b998 Change the include() message so that it doesn't recommend process.mixin. 2010-03-09 09:05:20 -08:00
isaacs
602d1861a1 Remove process.mixin from repl 2010-03-09 09:04:45 -08:00
Ryan Dahl
fb6dc11f11 Clean up some things in the benchmarks 2010-03-08 19:06:25 -08:00
Ryan Dahl
04999ef969 Remove -Werror from deps/v8/SConstruct
-_-
2010-03-08 18:04:59 -08:00
isaacs
c488e5775a Remove process.mixin dependencies from benchmark scripts 2010-03-08 17:57:38 -08:00
isaacs
a38aa02f9f Remove process.mixin dependency from fs 2010-03-08 17:57:08 -08:00
isaacs
5861db8a69 Remove process.mixin dependency from all tests. 2010-03-08 17:57:04 -08:00
Ryan Dahl
74614c1bf1 Change libev/wscript for waf 1.5.14 2010-03-08 17:45:57 -08:00
Ryan Dahl
5809483b78 Upgrade waf to 1.5.14a 2010-03-08 13:35:08 -08:00
Ryan Dahl
8c4561d2a0 Merge branch 'master' into net2 2010-03-08 11:14:11 -08:00
Ryan Dahl
c9c13e0718 require('fs') in test-http-tls 2010-03-08 11:13:24 -08:00
Felix Geisendörfer
39472709f0 fs.createWriteStream throws fs undefined error
The improved test suite now catches this bug, so hopefully thing like
this will not happen again.

See: http://github.com/ry/node/issues#issue/75
2010-03-08 10:22:19 -08:00
Felix Geisendörfer
44dde5f24c Remove fs/path globals from test suite
It is way too easy to not notice bugs due to those modules being
exported as globals while running the test suite.

See: http://github.com/ry/node/issues#issue/75
2010-03-08 10:20:07 -08:00
Ryan Dahl
e898c1f2e3 Upgrade WAF to 1.5.14 2010-03-08 10:18:24 -08:00
Ryan Dahl
c98b0799bf Upgrade V8 to 2.1.2.6 2010-03-08 09:33:11 -08:00
Ryan Dahl
40e42e8107 Replace --cflags with --vars 2010-03-08 09:10:24 -08:00
Felix Geisendörfer
9a9f08b1bc Add callbacks to stream methods
Allows for more fine graining, especially finding out about an individual
chunk of data being flushed in a write stream rather than the whole queue.

This commit also fixes a bug causing forceClose to fail on a readStream that
did not finish opening yet.
2010-03-08 09:05:56 -08:00
Felix Geisendörfer
c47391526c Fix typo in fs.writeStream docs 2010-03-08 09:05:31 -08:00
Ryan Dahl
209b219b10 Add environmental varibles to help text 2010-03-08 08:33:10 -08:00
Ryan Dahl
d67fdcc177 clean should not docclean 2010-03-07 12:13:16 -08:00
Rasmus Andersson
374300ca8d Updated patch of node.cc for supporting reading of umask 2010-03-07 12:07:57 -08:00
Ryan Dahl
681733d905 Merge branch 'master' into net2 2010-03-05 20:51:26 -08:00
Ryan Dahl
a258992855 Depreciation process.unloop() 2010-03-05 18:07:28 -08:00
Ryan Dahl
39b63dfe17 bump version 2010-03-05 17:55:13 -08:00
Ryan Dahl
b9cd3363ef Bugfix in querystring 2010-03-05 17:07:02 -08:00
Rob Ellis
5c78c45fa3 Added Parse INI to Node, tests 2010-03-05 16:17:57 -08:00
Ryan Dahl
939a6c7484 Clean up homepage 2010-03-05 16:02:06 -08:00
Ryan Dahl
e72b072d53 Decouple timer from EventEmitter 2010-03-05 15:31:26 -08:00
Ryan Dahl
6d60d2db00 Revert "Use kqueue on macintosh"
Experiencing bugs http://github.com/ry/node/issues/#issue/74

This reverts commit 409020a67d.
2010-03-05 14:36:13 -08:00
Ryan Dahl
5217eda1ae Merge remote branch 'felixge/file2' 2010-03-05 11:11:23 -08:00
Felix Geisendörfer
dbf9e466bc Documentation for FileWriteStream 2010-03-05 20:04:19 +01:00
Felix Geisendörfer
a96b5c792e Documentation for FileReadStream 2010-03-05 19:54:28 +01:00
Felix Geisendörfer
78c61000c2 Properly handle read errors
Also set readable to false if the initial fs.open call failed.
2010-03-05 19:53:59 +01:00
Felix Geisendörfer
145fac2b56 Use sys inherits
Also use events.EventEmitter instead of process.EventEmitter.
2010-03-05 19:24:20 +01:00
Felix Geisendörfer
0fcc94525a Renamed fileReadStream -> createReadStream
Did the same for fileWriteStream as well.
2010-03-05 18:56:25 +01:00
Felix Geisendörfer
48562fa938 Updated file streams
Read streams now only support forceClose()

Write streams support close() and forceClose()
2010-03-05 18:43:29 +01:00
Felix Geisendörfer
b4fba5fe8e Simplify buffering
There is no way more than one read event would be buffered.
2010-03-05 18:43:29 +01:00
Felix Geisendörfer
f6e00759ef Initial read stream implementation 2010-03-05 18:43:28 +01:00
Felix Geisendörfer
9415ca909e Use process.mixin instead of sys.mixin
The process namespace has not been cleaned up yet, so mixin is still
attached to process.
2010-03-05 18:42:32 +01:00
Ryan Dahl
e6dbf8d632 Revert "Remove process.unloop()"
People need this for backwards compatibility. Will be removed soon though!

This reverts commit 1e710cafa7.
2010-03-04 13:00:37 -08:00
Ryan Dahl
1e710cafa7 Remove process.unloop() 2010-03-04 11:51:39 -08:00
Ryan Dahl
409020a67d Use kqueue on macintosh 2010-03-04 10:02:41 -08:00
Ryan Dahl
d5ee777af2 Don't allow child process to clobber environ 2010-03-03 15:34:57 -08:00
Ryan Dahl
d1500cee6e Store connection in OutgoingMessage 2010-03-03 13:06:19 -08:00
Ryan Dahl
9d4d232eaa Factor out a http.Client._reconnect() function 2010-03-03 12:49:06 -08:00
Ryan Dahl
64d0e328e8 Remove unused EventEmitter object 2010-03-03 12:41:31 -08:00
isaacs
0dba38eef0 Fix a bug that was suppressing the error in setgid, allowing it to fail silently. 2010-03-03 10:57:01 -08:00
Ryan Dahl
769a35024f Allow passing env to child process 2010-03-03 10:45:58 -08:00
Jacek Becela
548d59d07e Fix fs.readFile handling encoding. Should close issue #72 2010-03-03 10:28:33 -08:00
Ryan Dahl
0e844d3bcb tcp.Connection.prototype.write should return boolean 2010-03-02 21:16:17 -08:00
Rasmus Andersson
5c602b750a Rewrote realpath implementation solving all known failing tests (also added a bunch of new test cases) 2010-03-02 17:35:34 -08:00
Ryan Dahl
9be3df0828 Add sys.log() 2010-03-02 17:35:01 -08:00
Felix Geisendörfer
18a70ffda1 Tweaks
- Add 'writeable' property
- Renamed pump->flush
- Use sys.mixin instead of process.mixin
2010-03-02 23:29:54 +01:00
Felix Geisendörfer
61785afb3d Initial write stream implementation 2010-03-02 23:29:54 +01:00
Ryan Dahl
7881b59f6b Merge branch 'master' into net2 2010-03-02 13:20:07 -08:00
Ryan Dahl
6670154819 'make test' only runs the simple test 2010-03-02 13:18:59 -08:00
Ryan Dahl
776b099d75 Disable ipv6 test on solaris 2010-03-02 21:10:05 +00:00
Ryan Dahl
62c4214711 Properly throw error on failed connection 2010-03-02 20:59:47 +00:00
Ryan Dahl
e165859c2e Fix coupling error on Solaris
Was getting a lot of

  push_pump read(): Resource temporarily unavailable

Apparently Solaris can return read() < 0 but errno == 0 to indicate a
EAGAIN?
2010-03-02 20:39:38 +00:00
Ryan Dahl
7bd3280cc2 process.inherits -> sys.inherits in net.js 2010-03-02 10:59:19 -08:00
Ryan Dahl
d9e3b466a7 Merge branch 'master' into net2 2010-03-02 10:44:25 -08:00
Ryan Dahl
fdbc9a82e4 Use EVBACKEND_SELECT on Solaris
Using EVBACKEND_PORT DTraceToolkit-0.99/Proc/syscallbypid.d reports after 5
seconds

   PID CMD                      SYSCALL                     COUNT
     . .                        .                               .
     . .                        .                               .
     . .                        .                               .
 28551 mysqld                   fcntl                         485
 24793 httpd                    gtime                         528
 28551 mysqld                   read                          707
 28551 mysqld                   gtime                         956
 21050 rsync                    pollsys                       965
 21050 rsync                    read                          965
 24793 httpd                    read                          982
 28551 mysqld                   lwp_sigmask                  1422
  4675 dtrace                   ioctl                        1579
 15136 node                     portfs                      15681
 15136 node                     clock_gettime               31358

On a very simple node process.
2010-03-02 10:39:07 -08:00
Rasmus Andersson
20d5963fae Added fs.realpath and fs.realpathSync (pure javascript versions) 2010-03-01 19:14:24 -08:00
Ryan Dahl
7a251f3bdf Fix shebang in wscript 2010-03-01 19:14:14 -08:00
Felix Geisendörfer
55ab9b4541 Bug fix for deep process.mixin array handling
process.mixin was throwing an exception when trying to do a deep copy
of an object that included an array.

This bug was introduced in: 3bb7ad6fea
2010-03-01 14:13:57 -08:00
Benjamin Thomas
6034701f57 Stop sys.inspect from adding extra new lines for deep objects that are elements in an array.
A couple other small fixes:

If the keys of an object were all numeric they should be quoted. This
way, you can now hypothetically copy and paste the output into your code
(if the object doesn't contain any circular objects, deeply nested
objects, Dates, RegExps or functions. I think).

If a nested object isn't being recursed into, output "[Object]" as
opposed to "[object Object]".

If an object is longer than the max width but it is one line no matter
what, then don't put the closing brace on a new line.

Fix some formatting issues to try and match Node's style guidelines.
2010-03-01 13:34:46 -08:00
Ryan Dahl
b021a845f7 Move process.inherits to sys 2010-03-01 11:39:35 -08:00
Ryan Dahl
30b700ee22 Move watchFile into fs module 2010-03-01 10:42:37 -08:00
Ryan Dahl
810882c1ad Move 'fs' module out of src/node.js into its own file 2010-03-01 10:14:49 -08:00
Ryan Dahl
faa0c6d449 Add note about testing patches with debug build 2010-03-01 09:11:04 -08:00
kriskowal
2b91f8d265 Fixed spurious suffixes on fs.readlink. 2010-02-27 21:33:27 -08:00
arlolra
724ccf10df Tests on common port. 2010-02-26 12:20:10 -08:00
Ryan Dahl
16e32c8fd9 Allow for net reconnects 2010-02-26 12:13:49 -08:00
Ryan Dahl
71d237e6a0 Move net2 tests into test/simple 2010-02-26 12:13:33 -08:00
Ryan Dahl
c6cc386819 Merge branch 'master' into net2 2010-02-26 11:34:24 -08:00
Zoran Tomicic
b2995829e1 Edit PrintHelp() text 2010-02-26 00:30:43 -08:00
Ryan Dahl
c219571eac Use more beautiful object syntax in docs 2010-02-25 18:59:02 -08:00
arlolra
3497da370b Decoupled readdir test. 2010-02-25 18:49:10 -08:00
Benjamin Thomas
de1521413e Make the output of sys.inspect a lot more compact.
See:
http://groups.google.com/group/nodejs/browse_thread/thread/ac060521e27fef65

By default now, sys.inspect doesn't recurse more than two times.  Pass
in null as the third parameter to make it recurse indefinitely.
2010-02-25 18:23:11 -08:00
Benjamin Thomas
a2714be8b5 Add optional third argument sys.inpect to indicate how many times you want it to recurse 2010-02-25 13:17:05 -08:00
Benjamin Thomas
b1b84960ce Rename writeHeader to writeHead 2010-02-25 13:01:21 -08:00
Ryan Dahl
b08f2af344 Update common.js path for new test layout 2010-02-25 12:01:23 -08:00
arlolra
04fac19822 Split tests. 2010-02-25 11:41:11 -08:00
Karl Guertin
9ad7539cf9 Add (unused) callback parameter to fs.readFile, fs.writeFile 2010-02-24 14:46:30 -08:00
Jonas Pfenniger
8f59cccb75 Removed deprecation errors in src/node.cc
Removed constness on string litterals. This should cause no problem
since we're not modifying them.
2010-02-24 13:16:52 -08:00
Ryan Dahl
e0ecf4f8f5 Remove -Werror on V8
Are they ever going to fix this?
2010-02-23 22:58:54 -08:00
Ryan Dahl
b80bdda14e Upgrade V8 to 2.1.2 2010-02-23 17:52:50 -08:00
James Duncan
df1c1e593f Add setgid,getgid 2010-02-23 14:45:02 -08:00
Ryan Dahl
4fd0225e41 Give signal handlers maximum priority 2010-02-23 13:08:04 -08:00
Ryan Dahl
c5b149ab1e Add hack to get error event on socket timeout
See
http://groups.google.com/group/nodejs/browse_thread/thread/4898a1ed3b99dcf0
2010-02-23 13:05:15 -08:00
Rasmus Andersson
b57d946184 added fs.link, fs.symlink, fs.readlink
including sync versions and complete tests
2010-02-22 19:23:06 -08:00
Ryan Dahl
a97fdf5c39 Merge branch 'master' into net2 2010-02-22 14:22:20 -08:00
Ryan Dahl
f0f2d2ee70 Fix readdirSync in docs 2010-02-22 14:04:54 -08:00
Ryan Dahl
dc041628ce Add not about nextTick and setTimeout(fn, 0) 2010-02-22 13:58:48 -08:00
Jérémy Lal
ffb4b47367 Fix for when EV_MULTIPLICITY=1 2010-02-22 13:25:57 -08:00
Ryan Dahl
46ebaa00ce Encoding 0 length data, returns '' instead of null 2010-02-22 12:07:07 -08:00
Ryan Dahl
b8dee2eb20 camel case variables in url module 2010-02-22 06:49:14 -08:00
Ryan Dahl
bb0d1e65e1 bump version 2010-02-22 01:31:14 -08:00
Ryan Dahl
6ee0bf704a Fix dns bug - first cb arg wasn't null 2010-02-22 01:26:40 -08:00
Ryan Dahl
e8363abb6a delete changelog.html on 'make docclean' 2010-02-21 23:13:40 -08:00
Ryan Dahl
05ae932a0e Implement fs.readdirSync() 2010-02-21 23:06:08 -08:00
Benjamin Thomas
49cd1bbf84 Fix bug in process.mixin where deep copies would not work at all.
Before, doing this:

    var sys = require("sys");

    var obj = {
      one: 1,
      two: 2,
      three: {
        value: 3
      }
    };

    sys.p(process.mixin(true, {}, obj));

Would output this:

    {
     "two": 2,
     "three": {
      "one": 1,
      "two": 2,
      "three": {
       "value": 3
      },
      "value": 3
     },
     "one": 1
    }

When it should have outputed this:

    {
     "one": 1,
     "two": 2,
     "three": {
      "value": 3
     }
    }
2010-02-21 22:51:23 -08:00
Ryan Dahl
4c8889bba2 Revert "Add fs.readdirSync()"
Doesn't work on Linux.

This reverts commit 05d6da6c4a.
2010-02-21 21:53:35 -08:00
isaacs
9acc8a686a Expose fs.lstat 2010-02-21 21:43:45 -08:00
Zoran Tomicic
d98ea70168 Configurable debug ports, and --debug-brk 2010-02-21 21:17:25 -08:00
Ryan Dahl
12d78cd1df Rename sendHeader to writeHeader; allow reasonPhrase 2010-02-21 16:53:49 -08:00
Micheil Smith
05d6da6c4a Add fs.readdirSync() 2010-02-21 16:32:20 -08:00
Ryan Dahl
c094dda53c Move errors for readPause and readResume 2010-02-21 16:01:12 -08:00
Ryan Dahl
7a8ede6f80 Add note about Promise removal 2010-02-21 15:48:43 -08:00
Scott González
6eff8937d7 Fixed encoding in fs.writeFile(). 2010-02-21 10:35:48 -08:00
Jeremy Ashkenas
2916a2acd4 Remove '--' from command line parsing 2010-02-20 22:47:49 -08:00
Ryan Dahl
a0c48eecab Rename readPause and readResume to pause/resume 2010-02-20 22:38:42 -08:00
Ryan Dahl
1db824a9c1 Add changelog to website 2010-02-20 22:30:56 -08:00
Tim Caswell
68af59ef6b Fix typo in fs.writeFile 2010-02-20 21:03:03 -08:00
Ryan Dahl
ea4956f046 Simplify call to V8::IdleNotification
Run a max priority ev_timer every 2 seconds. If there aren't any pending
watchers then call V8::IdleNotification() once. This is slower at freeing
memory, but I think simpler and less aggressive.
2010-02-20 20:36:33 -08:00
Ryan Dahl
0485cc41d5 Remove promises 2010-02-20 19:49:00 -08:00
Ryan Dahl
7a51184420 Multipart test no longer depend on Promise 2010-02-20 19:44:47 -08:00
Ryan Dahl
5fbc750db7 multipart no longer depends on Promise 2010-02-20 19:17:58 -08:00
Ryan Dahl
daacb81d3a Experimental idle garbage compact 2010-02-20 18:23:21 -08:00
Ryan Dahl
fcda5e8dfa If ab isn't installed skip keep-alive test 2010-02-19 18:54:25 -08:00
Rasmus Andersson
860fcf23f4 skipping TLS test if node was not compiled with TLS 2010-02-19 18:35:35 -08:00
Ryan Dahl
de7016eac5 sys.exec() no longer uses Promise 2010-02-19 16:55:46 -08:00
Ryan Dahl
c04b679e12 'dns' no longer uses Promise 2010-02-19 16:41:08 -08:00
Ryan Dahl
d0f2d465aa http.cat no longer uses Promise 2010-02-19 16:26:48 -08:00
Ryan Dahl
ef55324f1a Do not use Promise in 'fs' module 2010-02-19 16:02:30 -08:00
Ryan Dahl
662fdfed37 fs.closeSync should return Undefined on success 2010-02-19 16:02:14 -08:00
Ryan Dahl
375131376f Module loading no longer depends on Promise
The module loading code is looking extremely messy. It needs a refactor.
2010-02-19 11:59:05 -08:00
Ryan Dahl
bcf163da27 Upgrade V8 to 2.1.1 2010-02-19 10:40:48 -08:00
Ryan Dahl
764783560e Remove Promise.prototype.wait()
I don't want users to have to think about coroutine safety.

http://thread.gmane.org/gmane.comp.lang.javascript.nodejs/2468/focus=2603
2010-02-19 10:19:46 -08:00
Ryan Dahl
860d008d54 Truly synchronous require()
This is to reduce our dependency on wait(). For some reason this patch
affects the timer test:

  % ./node test/mjsunit/test-timers.js
  diff: 989
  diff: 989
  diff: 1989
  diff: 2989

Previously it showed:

  % ./node test/mjsunit/test-timers.js
  diff: 1000
  diff: 1000
  diff: 2000
  diff: 3000

I'm not sure what caused this change, and it's rather disturbing. However I
want to remove wait() as soon as possible and so am pushing this patch
through.

The module loading code is becoming increasingly ugly - this patch has not
helped. A refactor needs to be done soon.
2010-02-19 10:06:49 -08:00
Ryan Dahl
ca02b4f586 Fix AUTHORS again
I hope I won't spend all my time now maintaining this file...
2010-02-18 16:46:20 -08:00
Ryan Dahl
c5de1b6350 fix email in AUTHORS 2010-02-18 10:17:19 -08:00
Rasmus Andersson
3bb7ad6fea fixed process.mixin to properly copy getters/setters 2010-02-18 10:17:13 -08:00
Micheil Smith
bcc032e43a Adding interface between node and libeio for Chmod. 2010-02-18 10:13:57 -08:00
Ryan Dahl
cb32883537 Add authors file 2010-02-17 22:43:28 -08:00
Ryan Dahl
c2e58c9dee Remove a few wait() calls in the tests 2010-02-17 21:28:31 -08:00
Ryan Dahl
4f01c74e9f Fix long lines in docs 2010-02-17 18:41:56 -08:00
Ryan Dahl
7811fa6fec Update example on index.html 2010-02-17 17:07:08 -08:00
Ryan Dahl
07423f3a87 Merge branch 'master' into net2 2010-02-17 15:46:30 -08:00
Ryan Dahl
7c1c89fc29 Update benchmark script to new API 2010-02-17 15:37:12 -08:00
Ryan Dahl
916d592be1 Fix 'make website-upload' 2010-02-17 15:20:09 -08:00
Ryan Dahl
87d5e5b316 bump version 2010-02-17 15:12:42 -08:00
Ryan Dahl
217b60a272 sed -i 's/git-/git /g' Makefile 2010-02-17 15:07:44 -08:00
Ryan Dahl
0314a10e10 Clean up and rename test-stat-handler 2010-02-17 14:30:50 -08:00
Ryan Dahl
92292c8394 Rename a few remaining fs.cat calls. 2010-02-17 14:00:53 -08:00
Ryan Dahl
0b823dce61 Add /opt/local/lib as a search path for gpg-error
Why doesn't WAF just search LD_LIBRARY_PATH?
2010-02-17 13:56:47 -08:00
Ryan Dahl
c622142692 Add note about gnutls and libgpg-error in installation instructions 2010-02-17 13:39:03 -08:00
Ryan Dahl
d9b0eb3922 Remove references to wait() in docs 2010-02-17 13:29:25 -08:00
Ryan Dahl
df94c763ae documentation clean up 2010-02-17 13:14:34 -08:00
Ryan Dahl
f57b0e993b Add asciidoc-xhtml11.js for use with asciidoc 8.5.1 2010-02-17 12:48:14 -08:00
Ryan Dahl
5013bf1781 API: OutgoingMessage.prototype.finish() renamed to close() 2010-02-17 11:10:10 -08:00
Tim Caswell
6115df6338 File API tweaks
- Rename fs.cat to fs.readFile
- Move file.write to fs.writeFile
- Allow strings for the flag argument to fs.open
  ("r", "r+", "w", "w+", "a", "a+")
- Remove the unused 'File' module / class
2010-02-16 23:55:53 -08:00
Ryan Dahl
ae85d9af97 API: Make request/response object closer to stream interface
- sendBody() renamed to write()
- 'body' event renamed to 'data'
- 'complete' event renamed to 'end'
2010-02-16 22:16:29 -08:00
isaacs
46a47d2799 Add some puts() to test-multipart.js to show what it's doing. 2010-02-16 21:18:02 -08:00
Ryan Dahl
5468173ce9 [debug] Give debug_watcher maximum priority 2010-02-16 19:45:12 -08:00
Ryan Dahl
4322523fcf [debug] Use ProcessDebugMessage() instead of executing empty script
And don't use --debugger_auto_break v8 flag, it seems unnecessary.
2010-02-16 19:45:01 -08:00
Jérémy Lal
5a08a5653c Calculate page size with getpagesize for armel 2010-02-16 16:16:01 -08:00
Ryan Dahl
ecd61742a1 Throw from connection.connect if resolving.
Bug reported by James Golick.
2010-02-16 14:38:51 -08:00
Ryan Dahl
23cf502db7 API: connection.send() renamed to connection.write() 2010-02-16 13:18:42 -08:00
Ryan Dahl
1bf46d1536 Revert "Add process.startTime"
Unnecessary

This reverts commit 896cef23c4.
2010-02-16 09:32:25 -08:00
Zoka
fbef11b679 Use InstanceTemplate() instead of PrototypeTemplate() for accessor methods
This fixes crash that used to happen when Eclipse debugging session hits the
breakpoint that is set either in timer or connection callback.
2010-02-16 09:04:19 -08:00
Felix Geisendörfer
490cac0d7e Fix Promise.wait() for fired promises
Failure introduced in 80ace36e4c
2010-02-15 17:24:07 -08:00
Jonas Pfenniger
80ace36e4c Added failing test: promise.wait() after promise.emitXXX() 2010-02-15 17:22:13 -08:00
Ryan Dahl
95fd370096 Remove unused variable 2010-02-15 17:15:40 -08:00
Yuichiro MASUI
1793ee1c80 Fixed: promise late chain 2010-02-15 17:12:40 -08:00
Mark Hansen
98e61db216 sys.inspect(Date) now shows the date value 2010-02-15 17:08:22 -08:00
visionmedia
9c6263bff8 Added multiple arg support for sys.puts(), print(), etc. 2010-02-12 10:43:07 -08:00
Ryan Dahl
b82ef28d9d Rename 'posix' module to 'fs' 2010-02-12 01:04:14 -08:00
Ryan Dahl
896cef23c4 Add process.startTime 2010-02-12 00:47:35 -08:00
Ryan Dahl
bc17d94a0a API: tcp events 'receive' to 'data', 'eof' to 'end'
No deprecation messages. Not sure how...
2010-02-12 00:25:19 -08:00
Ryan Dahl
7d428a7741 s/tinyclouds.org/nodejs.org/ 2010-02-12 00:08:26 -08:00
Ryan Dahl
b20c343a7a Fix whitespace and warnings in node.cc 2010-02-11 21:55:08 -08:00
Felix Geisendörfer
211e82e8d9 Simple test case for require.async()
This is to make sure this doesn't break after implementing the new
truly sync require() function.
2010-02-11 21:45:03 -08:00
Felix Geisendörfer
6c94b8e4e4 Implemented posix.catSync() 2010-02-11 21:11:16 -08:00
Ryan Dahl
1b42276851 Small clean up to test-timers.js 2010-02-11 15:51:46 -08:00
Ryan Dahl
cd41e30bcc Return chunk & bytes read for posix.readSync() 2010-02-11 15:17:32 -08:00
Felix Geisendörfer
b02b54e003 Fix: Module cache did not propagate
This patch makes sure nested modules are available in their parents
cache. The module simplification broke this behavior.

See:

http://groups.google.com/group/nodejs/browse_thread/thread/e875132469547d2
b73f61a137
2010-02-11 11:23:19 -08:00
Ryan Dahl
dc01587c6c Merge branch 'master' into net2 2010-02-10 14:05:29 -08:00
masuidrive
3337e9da1a Build system: support spaces in directory names 2010-02-10 07:42:16 -08:00
Michael Stillwell
9f6f19df1b Add test: modifying event listeners during callback. 2010-02-09 14:47:37 -08:00
Ryan Dahl
3eaaaffadb Ignore EAGAIN in stderr dumps.
(Going out of the way to be sync)
2010-02-09 14:45:14 -08:00
Ryan Dahl
88b9359284 Fix stderr flushing problem 2010-02-09 14:11:58 -08:00
Ryan Dahl
b6edae5671 Expose errno exception creation 2010-02-08 07:36:40 -08:00
Ryan Dahl
979f5889d5 Optimize: Use callbacks instead of events in net2 2010-02-05 20:14:48 -08:00
Ryan Dahl
d979a7993e Wrap syscalls with try-catch 2010-02-05 19:47:16 -08:00
Ryan Dahl
263813ae3e Whitespace for node_net2.cc 2010-02-05 19:34:27 -08:00
Ryan Dahl
8fdb39a4ae Add errno symbol to error messages 2010-02-05 19:26:55 -08:00
Ryan Dahl
96f42745ff Merge branch 'master' into net2 2010-02-05 19:00:26 -08:00
Ryan Dahl
0b07f32819 Merge branch 'master' into net2 2010-02-03 10:00:39 -08:00
Ryan Dahl
1660db6b87 Inline Buffer::HasInstance 2010-02-02 19:35:06 -08:00
Ryan Dahl
7c9919f810 Remove some unnecessary handlescopes 2010-02-02 18:37:14 -08:00
Ryan Dahl
33509bdbe5 eof -> end 2010-02-01 18:19:14 -08:00
Ryan Dahl
4f56d8ae24 Rename Buffer.utf8Length to Buffer.utf8ByteLength 2010-02-01 13:10:37 -08:00
Ryan Dahl
785531691b Add buffer.unpack 2010-01-29 09:57:47 -08:00
Ryan Dahl
49451c1dab Merge branch 'master' into net2 2010-01-29 00:58:43 -08:00
Ryan Dahl
344243db92 Simplify send buffer logic 2010-01-28 19:13:13 -08:00
Ryan Dahl
aadce8e1a9 Optimize, clean up net2 net.js and http2.js 2010-01-28 14:31:57 -08:00
Ryan Dahl
c328f3e6c6 Add new http server library 2010-01-28 11:17:21 -08:00
Ryan Dahl
4347906b7f Fix require() in test-buffer.js 2010-01-27 18:45:07 -08:00
Ryan Dahl
b93b09a877 ObjectWrap fixed - buffers working! 2010-01-27 18:23:35 -08:00
Ryan Dahl
e82893d3f2 Clean up IOWatcher 2010-01-27 16:07:15 -08:00
Ryan Dahl
bf803f478b Reimplment Buffers 2010-01-27 15:40:09 -08:00
Ryan Dahl
a668d07484 Clean up http_parser binding - add asserts 2010-01-26 18:37:16 -08:00
Ryan Dahl
824a2fd1c6 Clean up a few bugs in net.js 2010-01-26 18:36:24 -08:00
Ryan Dahl
c106c3740b Use ObjectWrap again for IOWatchers.
I think the problem is in Buffers.
2010-01-26 18:35:01 -08:00
Ryan Dahl
b8c3d715fd use efence again 2010-01-26 18:34:42 -08:00
Ryan Dahl
ccd632f278 Simplify ObjectWrap; make fewer Weak callbacks 2010-01-26 12:00:17 -08:00
Ryan Dahl
741e3fa91b HTTP works somewhat on net2 now
However it's not working very well: Hitting a 'hello world' server with many
requests (ab -t 60 -c 10) will cause it to crash with the following error.

  Obtained 3 stack frames.

  ./node(_Z11print_tracev+0x1c) [0x80d1b3c]
  ./node(_ZN4node6Parser7ExecuteERKN2v89ArgumentsE+0x69) [0x80d3759]
  ./node [0x811f44b]
  TypeError: Already parsing a buffer
      at Socket.<anonymous> (/home/ryan/projects/node/lib/http2.js:393:20)
      at IOWatcher.callback (/home/ryan/projects/node/lib/net.js:81:12)
      at node.js:985:9
      at node.js:989:1
2010-01-25 17:55:08 -08:00
Ryan Dahl
dda1d681f7 Provide buffer in HTTPParser callbacks. 2010-01-24 14:12:15 -08:00
Ryan Dahl
bffa18befc Expose buffer_root() 2010-01-24 14:06:07 -08:00
Ryan Dahl
42ee16978e Implement new http-parser binding using Buffer 2010-01-24 11:21:45 -08:00
David Sklar
6f738d6e7a Adjust passing-FDs test to wait until socket is really writeable 2010-01-22 14:37:30 -08:00
Ryan Dahl
2788064bc2 Make callback_symbols static so they don't conflict 2010-01-20 15:43:06 -08:00
Ryan Dahl
653bf580bf Merge branch 'develop' into net2
Conflicts:
	src/node.cc
2010-01-20 15:24:38 -08:00
Ryan Dahl
df59f06734 recvMsg shouldn't return array for efficiency. 2010-01-13 08:41:04 -08:00
Ryan Dahl
02e52ef8e9 Merge branch 'master' into net2 2010-01-12 16:59:14 -08:00
David Sklar
a876df6c71 Initial take on passing FDs between processes 2010-01-09 01:28:19 -08:00
Ryan Dahl
d9757520fb Merge branch 'master' into net2 2009-12-30 16:37:36 -08:00
Ryan Dahl
20eec646b3 [net2] add unix server to ping-pong test 2009-12-30 11:51:43 -08:00
Ryan Dahl
8d0f756158 [net2] delete unix sockfile on server start and shutdown 2009-12-30 11:32:07 -08:00
Ryan Dahl
a8ede8dd9e [net2] port ping pong test 2009-12-30 10:58:46 -08:00
Ryan Dahl
0d31e9875f [net2] socket.setNoDelay 2009-12-30 10:43:47 -08:00
David Sklar
de9bfdea8e [net2] toRead() for non-linux (SIOCINQ -> FIONREAD) 2009-12-30 10:06:40 -08:00
Ryan Dahl
402755b14a Add socket.address() 2009-12-30 00:57:55 -08:00
Ryan Dahl
2582560f91 [net2] Do hostname lookups in connect and listen 2009-12-30 00:53:14 -08:00
Ryan Dahl
1beb840fec Back to 64kb stack size - enlarging it was a typo 2009-12-30 09:01:28 +01:00
Ryan Dahl
8330316014 Fix errors in getaddrinfo 2009-12-30 08:53:19 +01:00
Ryan Dahl
07333a4ab0 [net2] Set FD_CLOEXEC on created socket fds. 2009-12-29 21:12:32 +01:00
Ryan Dahl
48ccbb9afa [net2] lower-case socket.type 2009-12-29 21:12:32 +01:00
Ryan Dahl
25700e65ee [net2] Better EOF marking, rename events 2009-12-29 21:12:32 +01:00
Ryan Dahl
153b755936 Change IOWatcher constructor to have no arguments 2009-12-29 21:12:32 +01:00
Ryan Dahl
6e5abf4551 implement getaddrinfo 2009-12-29 21:12:31 +01:00
Ryan Dahl
0618f02f6f Implement half-closed streams 2009-12-29 21:12:31 +01:00
Ryan Dahl
3fce98c853 Add Stream.prototype.connect() and test-net-server.js 2009-12-29 21:12:31 +01:00
Ryan Dahl
b23ed4a98c Rename new streaming code to 'net' 2009-12-29 21:12:31 +01:00
Ryan Dahl
bddd6e9ca3 Implement stream.send() 2009-12-29 21:12:31 +01:00
Ryan Dahl
1da15d623e Fix buffer bug, implement tcp recv 2009-12-29 21:12:30 +01:00
Ryan Dahl
0ecd0fa598 IOWatcher callback isn't internal, fix bug in Accept 2009-12-29 21:12:30 +01:00
Ryan Dahl
469e2648e5 More bindings, beginning tcp server code in js 2009-12-29 21:12:30 +01:00
Ryan Dahl
c819abccb6 Start on net2 2009-12-29 21:12:30 +01:00
Ryan Dahl
f219938b69 add io watcher 2009-12-29 21:12:29 +01:00
Ryan Dahl
3377a30fb8 Move cb_persist functions out of dns module 2009-12-29 21:12:29 +01:00
Ryan Dahl
e2569c402f Add some tests to test-buffer.js 2009-12-29 21:12:28 +01:00
Ryan Dahl
630bb7a012 Rename blob to buffer. 2009-12-29 21:12:28 +01:00
Ryan Dahl
0afed52329 initial blobs 2009-12-29 21:12:28 +01:00
6591 changed files with 1708112 additions and 238476 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
test/fixtures/* -text

41
.gitignore vendored
View File

@@ -1,10 +1,45 @@
build
core
vgcore.*
.waf*
tags
.lock-wscript
*.pyc
doc/api.xml
doc/api.html
doc/node.1
tmp/
node
node_g
*.swp
.benchmark_reports
/.project
/.cproject
/out
# various stuff that VC++ produces/uses
Debug/
Release/
!doc/blog/**
*.sln
!nodemsi.sln
*.suo
*.vcproj
*.vcxproj
*.vcxproj.user
*.vcxproj.filters
UpgradeLog*.XML
_UpgradeReport_Files/
ipch/
*.sdf
*.opensdf
/config.mk
/config.gypi
*-nodegyp*
/gyp-mac-tool
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
email.md
deps/v8-*
./node_modules
.svn/

104
.mailmap Normal file
View File

@@ -0,0 +1,104 @@
Aaron Heckmann <aaron.heckmann@gmail.com> <aaron.heckmann+github@gmail.com>
Abe Fettig <abefettig@gmail.com> <abe@fettig.net>
Alex Kocharin <rlidwka@kocharin.ru>
Alex Kocharin <rlidwka@kocharin.ru> <alex@kocharin.ru>
Alexis Sellier <self@cloudhead.net>
Alexis Sellier <self@cloudhead.net> <alexis@cloudhead.io>
Arlo Breault <arlolra@gmail.com>
Artem Zaytsev <a.arepo@gmail.com>
Atsuo Fukaya <fukayatsu@gmail.com>
Ben Noordhuis <info@bnoordhuis.nl> <bnoordhuis@bender.(none)>
Bert Belder <bertbelder@gmail.com> <bert@piscisaureus2.(none)>
Bert Belder <bertbelder@gmail.com> <piscisaureus@Berts-MacBook-Pro.local>
Brandon Benvie <brandon@bbenvie.com> <brandon@brandonbenvie.com>
Brian White <mscdex@mscdex.net>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Chew Choon Keat <choonkeat@gmail.com>
Christopher Lenz <cmlenz@gmail.com> <chris@lamech.local>
Daniel Berger <code+node@dpbis.net>
Daniel Chcouri <333222@gmail.com>
Daniel Gröber <darklord@darkboxed.org>
Daniel Gröber <darklord@darkboxed.org> <dxld@darkboxed.org>
Daniel Pihlström <sciolist.se@gmail.com>
David Siegel <david@artcom.de> <david.siegel@artcom.de>
Domenic Denicola <domenic@domenicdenicola.com>
Eduard Burtescu <eddy_me08@yahoo.com>
Einar Otto Stangvik <einaros@gmail.com>
Elliott Cable <me@ell.io>
EungJun Yi <semtlenori@gmail.com>
Evan Larkin <evan.larkin.il.com> <evan.larkin.iit@gmail.com>
Farid Neshat <FaridN_SOAD@yahoo.com>
Felix Geisendörfer <felix@debuggable.com>
Felix Geisendörfer <felix@debuggable.com>
Friedemann Altrock <frodenius@gmail.com>
Fuji Goro <gfuji@cpan.org>
Gabriel de Perthuis <g2p.code@gmail.com>
Herbert Vojčík <herby@mailbox.sk>
Igor Zinkovsky <igorzi@microsoft.com>
Isaac Z. Schlueter <i@izs.me>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Jérémy Lal <kapouer@melix.org>
Jérémy Lal <kapouer@melix.org> <holisme@gmail.com>
Jered Schmidt <tr@nslator.jp>
Joe Shaw <joe@joeshaw.org> <joeshaw@litl.com>
Johan Bergström <bugs@bergstroem.nu>
Johan Dahlberg <jfd@distrop.com> <dahlberg.johan@gmail.com>
Jonas Pfenniger <jonas@pfenniger.name> <jonas@stvs.ch>
Jonathan Rentzsch <jwr.git@redshed.net>
Joshua S. Weinstein <josher19@users.sf.net>
Koichi Kobayashi <koichik@improvement.jp>
Kris Kowal <kris.kowal@cixar.com>
Kyle Robinson Young <kyle@dontkry.com>
Mathias Pettersson <mape@mape.me>
Michael Bernstein <michaelrbernstein@gmail.com>
Michael Wilber <gcr@sneakygcr.net>
Micheil Smith <micheil@brandedcode.com> <micheil@yettobebranded.net>
Mikael Bourges-Sevenier <mikeseven@gmail.com> <msevenier@motorola.com>
Nebu Pookins<nebu@nebupookins.net>
Nicholas Kinsey <pyrotechnick@feistystudios.com>
Onne Gorter <onne@onnlucky.com>
Paul Querna <pquerna@apache.org> <paul@querna.org>
Ray Morgan <rmorgan@zappos.com>
Ray Solomon <raybsolomon@gmail.com>
Rick Olson <technoweenie@gmail.com>
Ryan Dahl <ry@tinyclouds.org>
Ryan Emery <seebees@gmail.com>
Sam Shull <brickysam26@gmail.com> <brickysam26@samuel-shulls-computer.local>
Sam Shull <brickysam26@gmail.com> <sshull@squaremouth.com>
Sambasiva Suda <sambasivarao@gmail.com>
San-Tai Hsu <v@fatpipi.com>
Sergey Kryzhanovsky <skryzhanovsky@gmail.com> <another@dhcp199-223-red.yandex.net>
Shannen Saez <shannenlaptop@gmail.com>
Shigeki Ohtsu <ohtsu@d.jp> <ohtsu@iij.ad.jp>
Siddharth Mahendraker <siddharth_mahen@hotmail.com> <siddharth_mahen@me.com>
Simon Willison <simon@simonwillison.net>
Stanislav Opichal <opichals@gmail.com>
Stefan Bühler <stbuehler@web.de>
Tadashi SAWADA <cesare@mayverse.jp>
Takahiro ANDO <takahiro.ando@gmail.com>
Ted Young <ted@radicaldesigns.org>
Thomas Lee <thomas.lee@shinetech.com> <tom@tom-debian.sensis.com.au>
Tim Caswell <tim@creationix.com> <tim@0-26-8-e9-4c-e1.dyn.utdallas.edu>
Tim Smart <timehandgod@gmail.com> <tim@fostle.com>
Tim Smart <timehandgod@gmail.com> <timehandgod@gmail.com>
TJ Holowaychuk <tj@vision-media.ca>
TJ Holowaychuk <tj@vision-media.ca> <tjholowayhuk@gmail.com>
Trevor Burnham <trevor@databraid.com> <trevorburnham@gmail.com>
Tyler Larson <talltyler@gmail.com>
Vincent Voyer <v@fasterize.com>
Yoshihiro KIKUCHI <yknetg@gmail.com>
Yuichiro MASUI <masui@masuidrive.jp>
Zachary Scott <zachary@zacharyscott.net> <zachary.s.scott@gmail.com>
Zoran Tomicic <ztomicic@gmail.com>
# These people didn't contribute patches to node directly,
# but we've landed their v8 patches in the node repository:
Daniel Clifford <danno@chromium.org>
Erik Corry <erik.corry@gmail.com>
Jakob Kummerow <jkummerow@chromium.org>
Kevin Millikin <kmillikin@chromium.org>
Lasse R.H. Nielsen <lrn@chromium.org>
Michael Starzinger <mstarzinger@chromium.org>
Toon Verwaest <verwaest@chromium.org>
Vyacheslav Egorov <vegorov@chromium.org>
Yang Guo <yangguo@chromium.org>

14
.travis.yml Normal file
View File

@@ -0,0 +1,14 @@
language: node_js
before_script:
- "./configure"
- "make"
script:
- "make test"
notifications:
email: false
irc:
- "irc.freenode.net#libuv"

358
AUTHORS Normal file
View File

@@ -0,0 +1,358 @@
# Authors ordered by first contribution.
Ryan Dahl <ry@tinyclouds.org>
Urban Hafner <urban@bettong.net>
Joshaven Potter <yourtech@gmail.com>
Abe Fettig <abefettig@gmail.com>
Kevin van Zonneveld <kevin@vanzonneveld.net>
Michael Carter <cartermichael@gmail.com>
Jeff Smick <sprsquish@gmail.com>
Jon Crosby <jon@joncrosby.me>
Felix Geisendörfer <felix@debuggable.com>
Ray Morgan <rmorgan@zappos.com>
Jérémy Lal <kapouer@melix.org>
Isaac Z. Schlueter <i@izs.me>
Brandon Beacher <brandon.beacher@gmail.com>
Tim Caswell <tim@creationix.com>
Connor Dunn <connorhd@gmail.com>
Johan Sørensen <johan@johansorensen.com>
Friedemann Altrock <frodenius@gmail.com>
Onne Gorter <onne@onnlucky.com>
Rhys Jones <rhys@wave.to>
Jan Lehnardt <jan@apache.org>
Simon Willison <simon@simonwillison.net>
Chew Choon Keat <choonkeat@gmail.com>
Jered Schmidt <tr@nslator.jp>
Michaeljohn Clement <inimino@inimino.org>
Karl Guertin <grayrest@gr.ayre.st>
Xavier Shay <xavier@rhnh.net>
Christopher Lenz <cmlenz@gmail.com>
TJ Holowaychuk <tj@vision-media.ca>
Johan Dahlberg <jfd@distrop.com>
Simon Cornelius P. Umacob <simoncpu@gmail.com>
Ryan McGrath <ryan@venodesigns.net>
Rasmus Andersson <rasmus@notion.se>
Micheil Smith <micheil@brandedcode.com>
Jonas Pfenniger <jonas@pfenniger.name>
David Sklar <david.sklar@gmail.com>
Charles Lehner <celehner1@gmail.com>
Elliott Cable <me@ell.io>
Benjamin Thomas <benjamin@benjaminthomas.org>
San-Tai Hsu <v@fatpipi.com>
Ben Williamson <benw@pobox.com>
Joseph Pecoraro <joepeck02@gmail.com>
Erich Ocean <erich.ocean@me.com>
Alexis Sellier <self@cloudhead.net>
Blaine Cook <romeda@gmail.com>
Stanislav Opichal <opichals@gmail.com>
Aaron Heckmann <aaron.heckmann@gmail.com>
Mikeal Rogers <mikeal.rogers@gmail.com>
Matt Brubeck <mbrubeck@limpet.net>
Michael Stillwell <mjs@beebo.org>
Yuichiro MASUI <masui@masuidrive.jp>
Mark Hansen <mark@markhansen.co.nz>
Zoran Tomicic <ztomicic@gmail.com>
Jeremy Ashkenas <jashkenas@gmail.com>
Scott González <scott.gonzalez@gmail.com>
James Duncan <james@joyent.com>
Arlo Breault <arlolra@gmail.com>
Kris Kowal <kris.kowal@cixar.com>
Jacek Becela <jacek.becela@gmail.com>
Rob Ellis <kazoomer@gmail.com>
Tim Smart <timehandgod@gmail.com>
Herbert Vojčík <herby@mailbox.sk>
Krishna Rajendran <krishna@emptybox.org>
Nicholas Kinsey <pyrotechnick@feistystudios.com>
Scott Taylor <scott@railsnewbie.com>
Carson McDonald <carson@ioncannon.net>
Matt Ranney <mjr@ranney.com>
James Herdman <james.herdman@gmail.com>
Julian Lamb <thepurlieu@gmail.com>
Brian Hammond <brian@fictorial.com>
Mathias Pettersson <mape@mape.me>
Trevor Blackwell <tlb@tlb.org>
Thomas Lee <thomas.lee@shinetech.com>
Daniel Berger <code+node@dpbis.net>
Paulo Matias <paulo.matias@usp.br>
Peter Griess <pg@std.in>
Jonathan Knezek <jdknezek@gmail.com>
Jonathan Rentzsch <jwr.git@redshed.net>
Ben Noordhuis <info@bnoordhuis.nl>
Elijah Insua <tmpvar@gmail.com>
Andrew Johnston <apjohnsto@gmail.com>
Brian White <mscdex@mscdex.net>
Aapo Laitinen <aapo.laitinen@iki.fi>
Sam Hughes <sam@samuelhughes.com>
Orlando Vazquez <ovazquez@gmail.com>
Raffaele Sena <raff367@gmail.com>
Brian McKenna <brian@brianmckenna.org>
Paul Querna <pquerna@apache.org>
Ben Lowery <ben@blowery.org>
Peter Dekkers <soderblom.peter@gmail.com>
David Siegel <david@artcom.de>
Marshall Culpepper <marshall.law@gmail.com>
Ruben Rodriguez <cha0s@therealcha0s.net>
Dmitry Baranovskiy <Dmitry@Baranovskiy.com>
Blake Mizerany <blake.mizerany@gmail.com>
Jerome Etienne <jerome.etienne@gmail.com>
Dmitriy Shalashov <skaurus@gmail.com>
Adam Wiggins <adam@heroku.com>
Rick Olson <technoweenie@gmail.com>
Sergey Kryzhanovsky <skryzhanovsky@gmail.com>
Marco Rogers <marco.rogers@gmail.com>
Benjamin Fritsch <beanie@benle.de>
Jan Kassens <jan@kassens.net>
Robert Keizer <root@black.bluerack.ca>
Sam Shull <brickysam26@gmail.com>
Chandra Sekar S <chandru.in@gmail.com>
Andrew Naylor <argon@mkbot.net>
Benjamin Kramer <benny.kra@gmail.com>
Danny Coates <dannycoates@gmail.com>
Nick Stenning <nick@whiteink.com>
Bert Belder <bertbelder@gmail.com>
Trent Mick <trentm@gmail.com>
Fedor Indutny <fedor.indutny@gmail.com>
Illarionov Oleg <oleg@emby.ru>
Aria Stewart <aredridel@nbtsc.org>
Johan Euphrosine <proppy@aminche.com>
Russell Haering <russellhaering@gmail.com>
Bradley Meck <bradley.meck@gmail.com>
Tobie Langel <tobie.langel@gmail.com>
Tony Metzidis <tonym@tonym.us>
Mark Nottingham <mnot@mnot.net>
Sam Stephenson <sam@37signals.com>
Jorge Chamorro Bieling <jorge@jorgechamorro.com>
Evan Larkin <evan.larkin.il.com>
Sean Coates <sean@seancoates.com>
Tom Hughes <tom.hughes@palm.com>
Joshua Peek <josh@joshpeek.com>
Nathan Rajlich <nathan@tootallnate.net>
Peteris Krumins <peteris.krumins@gmail.com>
AJ ONeal <coolaj86@gmail.com>
Sami Samhuri <sami.samhuri@gmail.com>
Nikhil Marathe <nsm.nikhil@gmail.com>
Vitali Lovich <vitali.lovich@palm.com>
Stéphan Kochen <stephan@kochen.nl>
Oleg Efimov <efimovov@gmail.com>
Guillaume Tuton <guillaume@tuton.fr>
Tim Cooijmans <tim@aapopfiets.nl>
Dan Søndergaard <dan1990@gmail.com>
Silas Sewell <silas@sewell.ch>
Wade Simmons <wade@wades.im>
Daniel Gröber <darklord@darkboxed.org>
Travis Swicegood <development@domain51.com>
Oleg Slobodskoi <oleg008@gmail.com>
Jeremy Martin <jmar777@gmail.com>
Michael Wilber <gcr@sneakygcr.net>
Sean Braithwaite <brapse@gmail.com>
Anders Conbere <aconbere@gmail.com>
Devin Torres <devin@devintorres.com>
Theo Schlossnagle <jesus@omniti.com>
Kai Chen <kaichenxyz@gmail.com>
Daniel Chcouri <333222@gmail.com>
Mihai Călin Bazon <mihai@bazon.net>
Ali Farhadi <a.farhadi@gmail.com>
Daniel Ennis <aikar@aikar.co>
Carter Allen <CarterA@opt-6.com>
Greg Hughes <greg@ghughes.com>
David Trejo <david.daniel.trejo@gmail.com>
Joe Walnes <joe@walnes.com>
Koichi Kobayashi <koichik@improvement.jp>
Konstantin Käfer <github@kkaefer.com>
Richard Rodger <richard@ricebridge.com>
Andreas Reich <andreas@reich.name>
Tony Huang <cnwzhjs@gmail.com>
Dean McNamee <dean@gmail.com>
Trevor Burnham <trevor@databraid.com>
Zachary Scott <zachary@zacharyscott.net>
Arnout Kazemier <info@3rd-Eden.com>
George Stagas <gstagas@gmail.com>
Ben Weaver <ben@orangesoda.net>
Scott McWhirter <scott.mcwhirter@joyent.com>
Jakub Lekstan <jakub.lekstan@dreamlab.pl>
Nick Campbell <nicholas.j.campbell@gmail.com>
Nebu Pookins <nebu@nebupookins.net>
Tim Baumann <tim@timbaumann.info>
Robert Mustacchi <rm@joyent.com>
George Miroshnykov <george.miroshnykov@gmail.com>
Mark Cavage <mark.cavage@joyent.com>
Håvard Stranden <havard.stranden@gmail.com>
Marcel Laverdet <marcel@laverdet.com>
Alexandre Marangone <a.marangone@gmail.com>
Ryan Petrello <lists@ryanpetrello.com>
Fuji Goro <gfuji@cpan.org>
Siddharth Mahendraker <siddharth_mahen@hotmail.com>
Dave Pacheco <dap@joyent.com>
Mathias Buus <m@ge.tt>
Henry Rawas <henryr@schakra.com>
Yoshihiro KIKUCHI <yknetg@gmail.com>
Brett Kiefer <kiefer@gmail.com>
Mariano Iglesias <mariano@cricava.com>
Jörn Horstmann <git@jhorstmann.net>
Joe Shaw <joe@joeshaw.org>
Niklas Fiekas <niklas.fiekas@googlemail.com>
Adam Luikart <me@adamluikart.com>
Artem Zaytsev <a.arepo@gmail.com>
Alex Xu <alex_y_xu@yahoo.ca>
Jeremy Selier <jeremy@jolicloud.com>
Igor Zinkovsky <igorzi@microsoft.com>
Kip Gebhardt <kip.gebhardt@voxer.com>
Stefan Rusu <saltwaterc@gmail.com>
Shigeki Ohtsu <ohtsu@d.jp>
Wojciech Wnętrzak <w.wnetrzak@gmail.com>
Devon Govett <devongovett@gmail.com>
Steve Engledow <steve.engledow@proxama.com>
Pierre-Alexandre St-Jean <pierrealexandre.stjean@gmail.com>
Reid Burke <me@reidburke.com>
Vicente Jimenez Aguilar <googuy@gmail.com>
Tadashi SAWADA <cesare@mayverse.jp>
Jeroen Janssen <jeroen.janssen@gmail.com>
Daniel Pihlström <sciolist.se@gmail.com>
Stefan Bühler <stbuehler@web.de>
Alexander Uvarov <alexander.uvarov@gmail.com>
Aku Kotkavuo <aku@hibana.net>
Peter Bright <drpizza@quiscalusmexicanus.org>
Logan Smyth <loganfsmyth@gmail.com>
Christopher Wright <christopherwright@gmail.com>
Glen Low <glen.low@pixelglow.com>
Thomas Shinnick <tshinnic@gmail.com>
Mickaël Delahaye <mickael.delahaye@gmail.com>
Antranig Basman <antranig.basman@colorado.edu>
Maciej Małecki <maciej.malecki@notimplemented.org>
Evan Martin <martine@danga.com>
Peter Lyons <pete@peterlyons.com>
Jann Horn <jannhorn@googlemail.com>
Abimanyu Raja <abimanyuraja@gmail.com>
Karl Skomski <karl@skomski.com>
Niclas Hoyer <niclas@verbugt.de>
Michael Jackson <mjijackson@gmail.com>
Ashok Mudukutore <ashok@lineratesystems.com>
Sean Cunningham <sean.cunningham@mandiant.com>
Vitor Balocco <vitorbal@gmail.com>
Ben Leslie <benno@benno.id.au>
Eric Lovett <etlovett@gmail.com>
Christian Tellnes <christian@tellnes.no>
Colton Baker <github@netrefuge.net>
Tyler Larson <talltyler@gmail.com>
Tomasz Janczuk <tomasz@janczuk.org>
Ilya Dmitrichenko <errordeveloper@gmail.com>
Simen Brekken <simen.brekken@gmail.com>
Guglielmo Ferri <44gatti@gmail.com>
Thomas Parslow <tom@almostobsolete.net>
Ryan Emery <seebees@gmail.com>
Jordan Sissel <jls@semicomplete.com>
Matt Robenolt <matt@ydekproductions.com>
Jacob H.C. Kragh <jhckragh@gmail.com>
Benjamin Pasero <benjamin.pasero@gmail.com>
Scott Anderson <sanderson7@gmail.com>
Yoji SHIDARA <dara@shidara.net>
Mathias Bynens <mathias@qiwi.be>
Łukasz Walukiewicz <lukasz@walukiewicz.eu>
Artur Adib <arturadib@gmail.com>
E. Azer Koçulu <azer@kodfabrik.com>
Paddy Byers <paddy.byers@gmail.com>
Roman Shtylman <shtylman@gmail.com>
Kyle Robinson Young <kyle@dontkry.com>
Tim Oxley <secoif@gmail.com>
Eduard Burtescu <eddy_me08@yahoo.com>
Ingmar Runge <ingmar@irsoft.de>
Russ Bradberry <rbradberry@gmail.com>
Andreas Madsen <amwebdk@gmail.com>
Adam Malcontenti-Wilson <adman.com@gmail.com>
Avi Flax <avi@aviflax.com>
Pedro Teixeira <pedro.teixeira@gmail.com>
Johan Bergström <bugs@bergstroem.nu>
James Hartig <james.hartig@grooveshark.com>
Shannen Saez <shannenlaptop@gmail.com>
Seong-Rak Choi <ragiragi@hanmail.net>
Dave Irvine <davman99@gmail.com>
Ju-yeong Park <interruptz@gmail.com>
Phil Sung <psung@dnanexus.com>
Damon Oehlman <damon.oehlman@sidelab.com>
Mikael Bourges-Sevenier <mikeseven@gmail.com>
Emerson Macedo <emerleite@gmail.com>
Ryunosuke SATO <tricknotes.rs@gmail.com>
Michael Bernstein <michaelrbernstein@gmail.com>
Guillermo Rauch <rauchg@gmail.com>
Dan Williams <dan@igniter.com>
Brandon Benvie <brandon@bbenvie.com>
Nicolas LaCasse <nlacasse@borderstylo.com>
Dan VerWeire <dverweire@gmail.com>
Matthew Fitzsimmons <matt@joyent.com>
Philip Tellis <philip.tellis@gmail.com>
Christopher Jeffrey <chjjeffrey@gmail.com>
Seth Fitzsimmons <seth@mojodna.net>
Einar Otto Stangvik <einaros@gmail.com>
Paul Vorbach <paul@vorb.de>
Luke Gallagher <notfornoone@gmail.com>
Tomasz Buchert <tomek.buchert@gmail.com>
Myles Byrne <myles@myles.id.au>
T.C. Hollingsworth <tchollingsworth@gmail.com>
Cam Pedersen <diffference@gmail.com>
Roly Fentanes <roly426@gmail.com>
Ted Young <ted@radicaldesigns.org>
Joshua Holbrook <josh.holbrook@gmail.com>
Blake Miner <miner.blake@gmail.com>
Vincent Ollivier <contact@vincentollivier.com>
Jimb Esser <jimb@railgun3d.com>
Sambasiva Suda <sambasivarao@gmail.com>
Sadique Ali <sadiqalikm@gmail.com>
Dmitry Nizovtsev <dmitry@ukrteam.com>
Alex Kocharin <rlidwka@kocharin.ru>
Ming Liu <vmliu1@gmail.com>
Shea Levy <shea@shealevy.com>
Nao Iizuka <iizuka@kyu-mu.net>
Christian Ress <christian@ressonline.de>
Rod Vagg <rod@vagg.org>
Matt Ezell <ezell.matt@gmail.com>
Charlie McConnell <charlie@charlieistheman.com>
Farid Neshat <FaridN_SOAD@yahoo.com>
Johannes Wüller <johanneswueller@gmail.com>
Erik Lundin <mjor.himself@gmail.com>
Bryan Cantrill <bryan@joyent.com>
Yosef Dinerstein <yosefd@microsoft.com>
Nathan Friedly <nathan@nfriedly.com>
Aaron Jacobs <jacobsa@google.com>
Mustansir Golawala <mgolawala@gmail.com>
Atsuo Fukaya <fukayatsu@gmail.com>
Domenic Denicola <domenic@domenicdenicola.com>
Joshua S. Weinstein <josher19@users.sf.net>
Dane Springmeyer <dane@dbsgeo.com>
Erik Dubbelboer <erik@dubbelboer.com>
Malte-Thorben Bruns <skenqbx@googlemail.com>
Michael Thomas <aelmalinka@gmail.com>
Garen Torikian <gjtorikian@gmail.com>
EungJun Yi <semtlenori@gmail.com>
Vincent Voyer <v@fasterize.com>
Takahiro ANDO <takahiro.ando@gmail.com>
Erwin van der Koogh <github@koogh.com>
Brian Schroeder <bts@gmail.com>
J. Lee Coltrane <lee@projectmastermind.com>
Javier Hernández <jhernandez@emergya.com>
James Koval <james.ross.koval@gmail.com>
Kevin Gadd <kevin.gadd@gmail.com>
Ray Solomon <raybsolomon@gmail.com>
Kevin Bowman <github@magicmonkey.org>
Matt Gollob <mattgollob@gmail.com>
Simon Sturmer <sstur@me.com>
Joel Brandt <joelrbrandt@gmail.com>
Marc Harter <wavded@gmail.com>
Nuno Job <nunojobpinto@gmail.com>
Ben Kelly <ben@wanderview.com>
Felix Böhm <felixboehm55@googlemail.com>
Gabriel de Perthuis <g2p.code@gmail.com>
Tim Macfarlane <timmacfarlane@gmail.com>
Jonas Westerlund <jonas.westerlund@me.com>
Dominic Tarr <dominic.tarr@gmail.com>
Justin Plock <jplock@gmail.com>
Toshihiro Nakamura <toshihiro.nakamura@gmail.com>
Ivan Torres <mexpolk@gmail.com>
Philipp Hagemeister <phihag@phihag.de>
George Shank <shankga@gmail.com>
Mike Morearty <mike@morearty.com>
Peter Rybin <peter.rybin@gmail.com>
Eugen Dueck <eugen@dueck.org>
Gil Pedersen <git@gpost.dk>
Tyler Neylon <tylerneylon@gmail.com>
Golo Roden <webmaster@goloroden.de>
Ron Korving <rkorving@wizcorp.jp>

2
BSDmakefile Normal file
View File

@@ -0,0 +1,2 @@
all:
@echo "I need GNU make. Please run \`gmake\` instead."

2780
ChangeLog

File diff suppressed because it is too large Load Diff

610
LICENSE
View File

@@ -1,29 +1,8 @@
This license applies to all parts of Node that are not externally
maintained libraries. The externally maintained libraries used by Node
are:
- v8, located under deps/v8, which is copyrighted by the Google, Inc.
v8 has an MIT license.
- libev, located under deps/libev, and libeio, located at deps/libeio.
This code is copyrighted by Marc Alexander Lehmann. Both are dually
licensed under MIT and GPL2.
- WAF build system, located at tools/waf. Copyrighted Thomas Nagy.
Released under an MIT license.
- The SCONS build system, located at tools/scons. Copyrighted by the SCONS
Foundation. Released under an MIT license.
- UDNS, an asynchronous DNS client, located at deps/udns. Copyrighted by
Michael Tokarev <mjt@corpit.ru>. Released under the GNU Lesser General
Public License version 2.1.
Other external libraries are my own and all use the same license as Node.
Node's license follows:
Copyright 2009, 2010 Ryan Lienhart Dahl. All rights reserved.
====
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
@@ -40,4 +19,585 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
IN THE SOFTWARE.
====
This license applies to all parts of Node that are not externally
maintained libraries. The externally maintained libraries used by Node are:
- V8, located at deps/v8. V8's license follows:
"""
This license applies to all parts of V8 that are not externally
maintained libraries. The externally maintained libraries used by V8
are:
- PCRE test suite, located in
test/mjsunit/third_party/regexp-pcre.js. This is based on the
test suite from PCRE-7.3, which is copyrighted by the University
of Cambridge and Google, Inc. The copyright notice and license
are embedded in regexp-pcre.js.
- Layout tests, located in test/mjsunit/third_party. These are
based on layout tests from webkit.org which are copyrighted by
Apple Computer, Inc. and released under a 3-clause BSD license.
- Strongtalk assembler, the basis of the files assembler-arm-inl.h,
assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h,
assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h,
assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h,
assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h.
This code is copyrighted by Sun Microsystems Inc. and released
under a 3-clause BSD license.
- Valgrind client API header, located at third_party/valgrind/valgrind.h
This is release under the BSD license.
These libraries have their own licenses; we recommend you read them,
as their terms may differ from the terms below.
Copyright 2006-2012, the V8 project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- libev, located at deps/uv/src/unix/ev. libev's license follows:
"""
All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Alternatively, the contents of this package may be used under the terms
of the GNU General Public License ("GPL") version 2 or any later version,
in which case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this package only
under the terms of the GPL and not to allow others to use your version of
this file under the BSD license, indicate your decision by deleting the
provisions above and replace them with the notice and other provisions
required by the GPL in this and the other files of this package. If you do
not delete the provisions above, a recipient may use your version of this
file under either the BSD or the GPL.
"""
- libeio, located at deps/uv/src/unix/eio. libeio's license follows:
"""
All files in libeio are Copyright (C)2007,2008 Marc Alexander Lehmann.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Alternatively, the contents of this package may be used under the terms
of the GNU General Public License ("GPL") version 2 or any later version,
in which case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this package only
under the terms of the GPL and not to allow others to use your version of
this file under the BSD license, indicate your decision by deleting the
provisions above and replace them with the notice and other provisions
required by the GPL in this and the other files of this package. If you do
not delete the provisions above, a recipient may use your version of this
file under either the BSD or the GPL.
"""
- WAF build system, located at tools/waf*. WAF's license follows:
"""
Copyright Thomas Nagy, 2005-2011
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
- C-Ares, an asynchronous DNS client, located at deps/uv/src/ares. C-Ares license
follows:
"""
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
"""
- OpenSSL located at deps/openssl. OpenSSL is cryptographic software written
by Eric Young (eay@cryptsoft.com) to provide SSL/TLS encryption. OpenSSL's
license follows:
"""
/* ====================================================================
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
"""
- HTTP Parser, located at deps/http_parser. HTTP Parser's license follows:
"""
http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
Igor Sysoev.
Additional changes are licensed under the same terms as NGINX and
copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""
- Closure Linter is located at tools/closure_linter. Closure's license
follows:
"""
# Copyright (c) 2007, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- tools/cpplint.py is a C++ linter. Its license follows:
"""
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- lib/buffer_ieee754.js. Its license follows:
"""
// Copyright (c) 2008, Fair Oaks Labs, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
"""
- lib/punycode.js is copyright 2011 Mathias Bynens <http://mathiasbynens.be/>
and released under the MIT license.
"""
* Punycode.js <http://mths.be/punycode>
* Copyright 2011 Mathias Bynens <http://mathiasbynens.be/>
* Available under MIT license <http://mths.be/mit>
"""
- tools/gyp. GYP is a meta-build system. GYP's license follows:
"""
Copyright (c) 2009 Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- Zlib at deps/zlib. zlib's license follows:
"""
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.4, March 14th, 2010
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly
Mark Adler
*/
"""
- npm is a package manager program located at deps/npm.
npm's license follows:
"""
Copyright 2009-2012, Isaac Z. Schlueter (the "Original Author")
All rights reserved.
MIT +no-false-attribs License
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Distributions of all or part of the Software intended to be used
by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
modified such that the Original Author's bug reporting email
addresses and urls are either replaced with the contact information
of the parties responsible for the changes, or removed entirely.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except where noted, this license applies to any and all software
programs and associated documentation files created by the
Original Author, when distributed with the Software.
"Node.js" and "node" trademark Joyent, Inc. npm is not officially
part of the Node.js project, and is neither owned by nor
officially affiliated with Joyent, Inc.
Packages published in the npm registry are not part of npm
itself, are the sole property of their respective maintainers,
and are not covered by this license.
"npm Logo" created by Mathias Pettersson and Brian Hammond,
used with permission.
"Gubblebum Blocky" font
Copyright (c) 2007 by Tjarda Koster, http://jelloween.deviantart.com
included for use in the npm website and documentation,
used with permission.
This program uses "node-uuid", Copyright (c) 2010 Robert Kieffer,
according to the terms of the MIT license.
This program uses "request", Copyright (c) 2011 Mikeal Rogers,
according to the terms of the Apache license.
This program uses "mkdirp", Copyright (c) 2010 James Halliday,
according to the terms of the MIT/X11 license.
"""
- tools/doc/node_modules/marked. Marked is a Markdown parser. Marked's
license follows:
"""
Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
- test/gc/node_modules/weak. Node-weak is a node.js addon that provides garbage
collector notifications. Node-weak's license follows:
"""
Copyright (c) 2011, Ben Noordhuis <info@bnoordhuis.nl>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
- src/ngx-queue.h. ngx-queue.h is taken from the nginx source tree. nginx's
license follows:
"""
Copyright (C) 2002-2012 Igor Sysoev
Copyright (C) 2011,2012 Nginx, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
"""

339
Makefile
View File

@@ -1,75 +1,316 @@
WAF=python tools/waf-light --jobs=1
-include config.mk
all:
@$(WAF) build
BUILDTYPE ?= Release
PYTHON ?= python
DESTDIR ?=
SIGN ?=
all-debug:
@$(WAF) -v build
# Default to verbose builds.
# To do quiet/pretty builds, run `make V=` to set V to an empty string,
# or set the V environment variable to an empty string.
V ?= 1
all-progress:
@$(WAF) -p build
# BUILDTYPE=Debug builds both release and debug builds. If you want to compile
# just the debug build, run `make -C out BUILDTYPE=Debug` instead.
ifeq ($(BUILDTYPE),Release)
all: out/Makefile node
else
all: out/Makefile node node_g
endif
install:
@$(WAF) install
# The .PHONY is needed to ensure that we recursively use the out/Makefile
# to check for changes.
.PHONY: node node_g
node: config.gypi
$(MAKE) -C out BUILDTYPE=Release V=$(V)
ln -fs out/Release/node node
node_g: config.gypi
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
ln -fs out/Debug/node node_g
config.gypi: configure
./configure
out/Debug/node:
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
$(PYTHON) tools/gyp_node -f make
install: all
$(PYTHON) tools/install.py $@ $(DESTDIR)
uninstall:
@$(WAF) uninstall
$(PYTHON) tools/install.py $@ $(DESTDIR)
clean:
-rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
-find out/ -name '*.o' -o -name '*.a' | xargs rm -rf
-rm -rf node_modules
distclean:
-rm -rf out
-rm -f config.gypi
-rm -f config.mk
-rm -rf node node_g blog.html email.md
-rm -rf node_modules
test: all
python tools/test.py --mode=release
$(PYTHON) tools/test.py --mode=release simple message
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
test-all: all
python tools/test.py --mode=debug,release
test-http1: all
$(PYTHON) tools/test.py --mode=release --use-http1 simple message
test-valgrind: all
$(PYTHON) tools/test.py --mode=release --valgrind simple message
test/gc/node_modules/weak/build:
@if [ ! -f node ]; then make all; fi
./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
--directory="$(shell pwd)/test/gc/node_modules/weak" \
--nodedir="$(shell pwd)"
test-gc: all test/gc/node_modules/weak/build
$(PYTHON) tools/test.py --mode=release gc
test-all: all test/gc/node_modules/weak/build
$(PYTHON) tools/test.py --mode=debug,release
make test-npm
test-all-http1: all
$(PYTHON) tools/test.py --mode=debug,release --use-http1
test-all-valgrind: all
$(PYTHON) tools/test.py --mode=debug,release --valgrind
test-release: all
$(PYTHON) tools/test.py --mode=release
test-debug: all
python tools/test.py --mode=debug
$(PYTHON) tools/test.py --mode=debug
benchmark: all
build/default/node benchmark/run.js
test-message: all
$(PYTHON) tools/test.py message
doc: doc/node.1 doc/api.html doc/index.html
test-simple: all
$(PYTHON) tools/test.py simple
doc/api.html: doc/api.txt
asciidoc --unsafe \
-a theme=pipe \
-a toc \
-a linkcss \
-o doc/api.html doc/api.txt
test-pummel: all
$(PYTHON) tools/test.py pummel
doc/api.xml: doc/api.txt
asciidoc -b docbook -d manpage -o doc/api.xml doc/api.txt
test-internet: all
$(PYTHON) tools/test.py internet
doc/node.1: doc/api.xml
xsltproc --output doc/node.1 --nonet doc/manpage.xsl doc/api.xml
test-npm: node
./node deps/npm/test/run.js
test-npm-publish: node
npm_package_config_publishtest=true ./node deps/npm/test/run.js
apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json))
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/download out/doc/logos out/doc/images
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
website_files = \
out/doc/index.html \
out/doc/v0.4_announcement.html \
out/doc/cla.html \
out/doc/sh_main.js \
out/doc/sh_javascript.min.js \
out/doc/sh_vim-dark.css \
out/doc/sh.css \
out/doc/favicon.ico \
out/doc/pipe.css \
out/doc/about/index.html \
out/doc/community/index.html \
out/doc/download/index.html \
out/doc/logos/index.html \
out/doc/changelog.html \
$(doc_images)
doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ blog node
blogclean:
rm -rf out/blog
blog: doc/blog out/Release/node tools/blog
out/Release/node tools/blog/generate.js doc/blog/ out/blog/ doc/blog.html doc/rss.xml
$(apidoc_dirs):
mkdir -p $@
out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
cp $< $@
out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh node
bash tools/build-changelog.sh
out/doc/%.html: doc/%.html node
cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
out/doc/%: doc/%
cp -r $< $@
out/doc/api/%.json: doc/api/%.markdown node
out/Release/node tools/doc/generate.js --format=json $< > $@
out/doc/api/%.html: doc/api/%.markdown node
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 | sed 's|^\* #|* \\#|g' > $@
cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
blog.html: email.md
cat $< | ./node tools/doc/node_modules/.bin/marked > $@
blog-upload: blog
rsync -r out/blog/ node@nodejs.org:~/web/nodejs.org/blog/
website-upload: doc
scp doc/* linode:~/tinyclouds/node/
rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
ssh node@nodejs.org '\
rm -f ~/web/nodejs.org/dist/latest &&\
ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
rm -f ~/web/nodejs.org/docs/latest &&\
ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
docopen: out/doc/api/all.html
-google-chrome out/doc/api/all.html
docclean:
@-rm -f doc/node.1 doc/api.xml doc/api.html
-rm -rf out/doc
clean: docclean
@$(WAF) clean
distclean: docclean
@-rm -rf build/
@-find tools/ -name "*.pyc" -delete
check:
@tools/waf-light check
VERSION=$(shell git-describe)
VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py)
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
DESTCPU ?= x64
else
DESTCPU ?= ia32
endif
ifeq ($(DESTCPU),x64)
ARCH=x64
else
ARCH=x86
endif
TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
BINARYTAR=$(BINARYNAME).tar.gz
PKG=out/$(TARNAME).pkg
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
dist: doc/node.1 doc/api.html
git-archive --prefix=$(TARNAME)/ HEAD > $(TARNAME).tar
mkdir -p $(TARNAME)/doc
dist: doc $(TARBALL) $(PKG)
PKGDIR=out/dist-osx
release-only:
@if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
exit 0 ; \
else \
echo "" >&2 ; \
echo "The git repository is not clean." >&2 ; \
echo "Please commit changes before building release tarball." >&2 ; \
echo "" >&2 ; \
git status --porcelain | egrep -v '^\?\?' >&2 ; \
echo "" >&2 ; \
exit 1 ; \
fi
@if [ "$(RELEASE)" = "1" ]; then \
exit 0; \
else \
echo "" >&2 ; \
echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE)." >&2 ; \
echo "Did you remember to update src/node_version.cc?" >&2 ; \
echo "" >&2 ; \
exit 1 ; \
fi
pkg: $(PKG)
$(PKG): release-only
rm -rf $(PKGDIR)
rm -rf out/deps out/Release
./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32
$(MAKE) install V=$(V)
rm -rf out/deps out/Release
./configure --prefix=$(PKGDIR)/usr/local --without-snapshot --dest-cpu=x64
$(MAKE) install V=$(V)
SIGN="$(SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
lipo $(PKGDIR)/32/usr/local/bin/node \
$(PKGDIR)/usr/local/bin/node \
-output $(PKGDIR)/usr/local/bin/node-universal \
-create
mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
rm -rf $(PKGDIR)/32
$(packagemaker) \
--id "org.nodejs.Node" \
--doc tools/osx-pkg.pmdoc \
--out $(PKG)
SIGN="$(SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh
$(TARBALL): release-only node doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
mkdir -p $(TARNAME)/doc/api
cp doc/node.1 $(TARNAME)/doc/node.1
cp doc/api.html $(TARNAME)/doc/api.html
tar rf $(TARNAME).tar \
$(TARNAME)/doc/node.1 \
$(TARNAME)/doc/api.html
rm -r $(TARNAME)
cp -r out/doc/api/* $(TARNAME)/doc/api/
rm -rf $(TARNAME)/deps/v8/test # too big
rm -rf $(TARNAME)/doc/images # too big
find $(TARNAME)/ -type l | xargs rm # annoying on windows
tar -cf $(TARNAME).tar $(TARNAME)
rm -rf $(TARNAME)
gzip -f -9 $(TARNAME).tar
.PHONY: benchmark clean docclean dist distclean check uninstall install all test test-all website-upload
tar: $(TARBALL)
$(BINARYTAR): release-only
rm -rf $(BINARYNAME)
rm -rf out/deps out/Release
./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU)
$(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
cp README.md $(BINARYNAME)
cp LICENSE $(BINARYNAME)
cp ChangeLog $(BINARYNAME)
tar -cf $(BINARYNAME).tar $(BINARYNAME)
rm -rf $(BINARYNAME)
gzip -f -9 $(BINARYNAME).tar
binary: $(BINARYTAR)
dist-upload: $(TARBALL) $(PKG)
ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
bench:
benchmark/http_simple_bench.sh
bench-idle:
./node benchmark/idle_server.js &
sleep 1
./node benchmark/idle_clients.js &
jslintfix:
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
jslint:
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
cpplint:
@$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
lint: jslint cpplint
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean tar binary release-only

25
README
View File

@@ -1,25 +0,0 @@
Evented I/O for V8 javascript.
To build:
./configure
make
make install
To run the tests:
make test
To build the documentation and install it, you will need asciidoc and
xsltproc:
make doc install
To read the documentation:
man doc/node.1
See http://nodejs.org/ for more information. For help and discussion
subscribe to the mailing list by visiting
http://groups.google.com/group/nodejs or by sending an email to
nodejs+subscribe@googlegroups.com.

46
README.md Normal file
View File

@@ -0,0 +1,46 @@
Evented I/O for V8 javascript. [![Build Status](https://secure.travis-ci.org/joyent/node.png)](http://travis-ci.org/joyent/node)
===
### To build:
Unix/Macintosh. Requires python 2.6 or 2.7 and GNU make 3.81 or newer:
./configure
make
make install
Windows:
vcbuild.bat
### To run the tests:
Unix/Macintosh:
make test
Windows:
vcbuild.bat test
### To build the documentation:
make doc
### To read the documentation:
man doc/node.1
Resources for Newcomers
---
- [The Wiki](https://github.com/joyent/node/wiki)
- [nodejs.org](http://nodejs.org/)
- [how to install node.js and npm (node package manager)](http://joyeur.com/2010/12/10/installing-node-and-npm/)
- [list of modules](https://github.com/joyent/node/wiki/modules)
- [searching the npm registry](http://search.npmjs.org/)
- [list of companies and projects using node](https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node)
- [node.js mailing list](http://groups.google.com/group/nodejs)
- irc chatroom, [#node.js on freenode.net](http://webchat.freenode.net?channels=node.js&uio=d4)
- [community](https://github.com/joyent/node/wiki/Community)
- [contributing](https://github.com/joyent/node/wiki/Contributing)
- [big list of all the helpful wiki pages](https://github.com/joyent/node/wiki/_pages)

View File

@@ -0,0 +1,15 @@
var types = 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
var type = types[types.indexOf(process.argv[2])];
if (!type)
type = types[0];
console.error('Benchmarking', type);
var clazz = global[type];
var arr = new clazz(25 * 10e5);
for (var i = 0; i < 10; ++i) {
for (var j = 0, k = arr.length; j < k; ++j) {
arr[j] = (j ^ k) & 127;
}
}

View File

@@ -0,0 +1,15 @@
var types = 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
var type = types[types.indexOf(process.argv[2])];
if (!type)
type = types[0];
console.error('Benchmarking', type);
var clazz = global[type];
var arr = new clazz(25 * 10e5);
for (var i = 0; i < 10; ++i) {
for (var j = 0, k = arr.length; j < k; ++j) {
arr[j] = 0.0;
}
}

View File

@@ -0,0 +1,15 @@
var types = 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
var type = types[types.indexOf(process.argv[2])];
if (!type)
type = types[0];
console.error('Benchmarking', type);
var clazz = global[type];
var arr = new clazz(25 * 10e5);
for (var i = 0; i < 10; ++i) {
for (var j = 0, k = arr.length; j < k; ++j) {
arr[j] = 0;
}
}

View File

@@ -0,0 +1,6 @@
SlowBuffer = require('buffer').SlowBuffer;
for (var i = 0; i < 1e6; i++) {
b = new SlowBuffer(10);
b[1] = 2
}

View File

@@ -0,0 +1,80 @@
// first start node http_simple.js
var http = require('http');
var latency = [];
var numRequests = parseInt(process.argv[2], 10) || 100;
var maxSockets = parseInt(process.argv[3], 10) || 100;
var runs = parseInt(process.argv[4], 10) || 100;
var prefix = process.argv[5] || '';
if (prefix) prefix += '_';
var r = 0;
var port = parseInt(process.env.PORT, 10) || 8000;
var host = process.env.HOST || '127.0.0.1';
http.globalAgent.maxSockets = maxSockets;
run();
function run() {
if (r++ === runs) {
return finish();
}
// make numRequests in parallel
// retain the order in which they are *made*. This requires trapping
// each one in a closure, since otherwise, we'll of course end
// up mostly sorting them in ascending order, since the cb from a
// fast request will almost always be called before the cb from a
// slow one.
var c = numRequests;
var lat = [];
latency.push(lat);
for (var i = 0; i < numRequests; i++) (function (i) {
makeRequest(function(l) {
lat[i] = l;
c--;
if (c === 0) run();
});
})(i);
}
function makeRequest(cb) {
var opts = { host: host,
port: port,
uri: 'http://'+host+':'+port+'/bytes/12',
forever: true,
path: '/bytes/12' };
var pre = Date.now();
var req = http.get(opts, function(res) {
return cb(Date.now() - pre);
});
}
function finish() {
var data = [];
latency.forEach(function(run, i) {
run.forEach(function(l, j) {
data[j] = data[j] || [];
data[j][i] = l;
});
});
data = data.map(function (l, i) {
return l.join('\t')
}).join('\n') + '\n';
var fname = prefix +
'client_latency_' +
numRequests + '_' +
maxSockets + '_' +
runs + '.tab';
var path = require('path');
fname = path.resolve(__dirname, '..', 'out', fname);
fname = path.relative(process.cwd(), fname);
require('fs').writeFile(fname, data, function(er) {
if (er) throw er;
console.log('written: %s', fname);
});
}

42
benchmark/fast_buffer2.js Normal file
View File

@@ -0,0 +1,42 @@
var SlowBuffer = require('buffer').SlowBuffer;
var POOLSIZE = 8*1024;
var pool;
function allocPool () {
pool = new SlowBuffer(POOLSIZE);
pool.used = 0;
}
function FastBuffer (length) {
this.length = length;
if (length > POOLSIZE) {
// Big buffer, just alloc one.
this.parent = new Buffer(length);
this.offset = 0;
} else {
// Small buffer.
if (!pool || pool.length - pool.used < length) allocPool();
this.parent = pool;
this.offset = pool.used;
pool.used += length;
}
// HERE HERE HERE
SlowBuffer.makeFastBuffer(this.parent, this, this.offset, this.length);
}
exports.FastBuffer = FastBuffer;
FastBuffer.prototype.get = function (i) {
if (i < 0 || i >= this.length) throw new Error("oob");
return this.parent[this.offset + i];
};
FastBuffer.prototype.set = function (i, v) {
if (i < 0 || i >= this.length) throw new Error("oob");
return this.parent[this.offset + i] = v;
};
// TODO define slice, toString, write, etc.
// slice should not use c++

View File

@@ -0,0 +1,6 @@
FastBuffer = require('./fast_buffer2').FastBuffer;
for (var i = 0; i < 1e6; i++) {
b = new FastBuffer(10);
b[1] = 2;
}

View File

@@ -0,0 +1,4 @@
for (var i = 0; i < 1e6; i++) {
b = new Buffer(10);
b[1] = 2;
}

72
benchmark/fs-readfile.js Normal file
View File

@@ -0,0 +1,72 @@
// Call fs.readFile over and over again really fast.
// Then see how many times it got called.
// Yes, this is a silly benchmark. Most benchmarks are silly.
var path = require('path');
var filename = path.resolve(__dirname, 'http.sh');
var fs = require('fs');
var count = 0;
var go = true;
var len = -1;
var assert = require('assert');
var concurrency = 1;
var encoding = null;
var time = 10;
for (var i = 2; i < process.argv.length; i++) {
var arg = process.argv[i];
if (arg.match(/^-e$/)) {
encoding = process.argv[++i] || null;
} else if (arg.match(/^-c$/)) {
concurrency = ~~process.argv[++i];
if (concurrency < 1) concurrency = 1;
} else if (arg === '-t') {
time = ~~process.argv[++i];
if (time < 1) time = 1;
}
}
setTimeout(function() {
go = false;
}, time * 1000);
function round(n) {
return Math.floor(n * 100) / 100;
}
var start = process.hrtime();
while (concurrency--) readFile();
function readFile() {
if (!go) {
process.stdout.write('\n');
console.log('read the file %d times (higher is better)', count);
var end = process.hrtime();
var elapsed = [end[0] - start[0], end[1] - start[1]];
var ns = elapsed[0] * 1E9 + elapsed[1];
var nsper = round(ns / count);
console.log('%d ns per read (lower is better)', nsper);
var readsper = round(count / (ns / 1E9));
console.log('%d reads per sec (higher is better)', readsper);
process.exit(0);
return;
}
if (!(count % 1000)) {
process.stdout.write('.');
}
if (encoding) fs.readFile(filename, encoding, then);
else fs.readFile(filename, then);
function then(er, data) {
assert.ifError(er);
count++;
// basic sanity test: we should get the same number of bytes each time.
if (count === 1) len = data.length;
else assert(len === data.length);
readFile();
}
}

View File

@@ -0,0 +1,43 @@
var binding = require('./build/default/binding');
c = 0
function js() {
return c++; //(new Date()).getTime();
}
var cxx = binding.hello;
var i, N = 100000000;
console.log(js());
console.log(cxx());
var start = new Date();
for (i = 0; i < N; i++) {
js();
}
var jsDiff = new Date() - start;
console.log(N +" JS function calls: " + jsDiff);
var start = new Date();
for (i = 0; i < N; i++) {
cxx();
}
var cxxDiff = new Date() - start;
console.log(N +" C++ function calls: " + cxxDiff);
function toMicro (diff) {
return (diff / N) * 1000000;
}
console.log("\nJS function call speed: %d microseconds", toMicro(jsDiff));
console.log("C++ function call speed: %d microseconds", toMicro(cxxDiff));
console.log("\nJS speedup " + (cxxDiff / jsDiff));

View File

@@ -0,0 +1,19 @@
#include <v8.h>
#include <node.h>
#include <time.h>
using namespace v8;
static int c = 0;
static Handle<Value> Hello(const Arguments& args) {
HandleScope scope;
//time_t tv = time(NULL);
return scope.Close(Integer::New(c++));
}
extern "C" void init (Handle<Object> target) {
HandleScope scope;
//target->Set(String::New("hello"), String::New("World"));
NODE_SET_METHOD(target, "hello", Hello);
}

View File

@@ -0,0 +1,15 @@
srcdir = '.'
blddir = 'build'
VERSION = '0.0.1'
def set_options(opt):
opt.tool_options('compiler_cxx')
def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')
def build(bld):
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.target = 'binding'
obj.source = 'binding.cc'

12
benchmark/http.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
cd "$(dirname "$(dirname $0)")"
sudo sysctl -w net.inet.ip.portrange.first=12000
sudo sysctl -w net.inet.tcp.msl=1000
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000
ulimit -n 100000
./node benchmark/http_simple.js || exit 1 &
sleep 1
ab -n 30000 -c 100 http://127.0.0.1:8000/${TYPE:-bytes}/${LENGTH:-1024} | grep Req
killall node

127
benchmark/http_bench.js Normal file
View File

@@ -0,0 +1,127 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var spawn = require('child_process').spawn;
var cluster = require('cluster');
var http = require('http');
var options = {
mode: 'master',
host: '127.0.0.1',
port: 22344,
path: '/',
servers: 1,
clients: 1
};
for (var i = 2; i < process.argv.length; ++i) {
var args = process.argv[i].split('=', 2);
var key = args[0];
var val = args[1];
options[key] = val;
}
switch (options.mode) {
case 'master': startMaster(); break;
case 'server': startServer(); break;
case 'client': startClient(); break;
default: throw new Error('Bad mode: ' + options.mode);
}
process.title = 'http_bench[' + options.mode + ']';
// monkey-patch the log functions so they include name + pid
console.log = patch(console.log);
console.trace = patch(console.trace);
console.error = patch(console.error);
function patch(fun) {
var prefix = process.title + '[' + process.pid + '] ';
return function() {
var args = Array.prototype.slice.call(arguments);
args[0] = prefix + args[0];
return fun.apply(console, args);
};
}
function startMaster() {
if (!cluster.isMaster) return startServer();
for (var i = ~~options.servers; i > 0; --i) cluster.fork();
for (var i = ~~options.clients; i > 0; --i) {
var cp = spawn(process.execPath, [__filename, 'mode=client']);
cp.stdout.pipe(process.stdout);
cp.stderr.pipe(process.stderr);
}
}
function startServer() {
http.createServer(onRequest).listen(options.port, options.host);
var body = Array(1024).join('x');
var headers = {'Content-Length': '' + body.length};
function onRequest(req, res) {
req.on('error', onError);
res.on('error', onError);
res.writeHead(200, headers);
res.end(body);
}
function onError(err) {
console.error(err.stack);
}
}
function startClient() {
// send off a bunch of concurrent requests
// TODO make configurable
sendRequest();
sendRequest();
function sendRequest() {
var req = http.request(options, onConnection);
req.on('error', onError);
req.end();
}
// add a little back-off to prevent EADDRNOTAVAIL errors, it's pretty easy
// to exhaust the available port range
function relaxedSendRequest() {
setTimeout(sendRequest, 1);
}
function onConnection(res) {
res.on('error', onError);
res.on('data', onData);
res.on('end', relaxedSendRequest);
}
function onError(err) {
console.error(err.stack);
relaxedSendRequest();
}
function onData(data) {
// this space intentionally left blank
}
}

View File

@@ -0,0 +1,13 @@
var http = require('http');
var port = parseInt(process.env.PORT, 10) || 8000;
var defaultLag = parseInt(process.argv[2], 10) || 100;
http.createServer(function(req, res) {
res.writeHead(200, { 'content-type': 'text/plain',
'content-length': '2' });
var lag = parseInt(req.url.split("/").pop(), 10) || defaultLag;
setTimeout(function() {
res.end('ok');
}, lag);
}).listen(port, 'localhost');

View File

@@ -1,58 +1,129 @@
path = require("path");
var path = require('path'),
exec = require('child_process').exec,
http = require('http');
libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir);
var port = parseInt(process.env.PORT || 8000);
process.mixin(require("sys"));
http = require("http");
console.log('pid ' + process.pid);
fixed = ""
for (var i = 0; i < 20*1024; i++) {
fixed += "C";
var fixed = makeString(20 * 1024, 'C'),
storedBytes = {},
storedBuffer = {},
storedUnicode = {};
var useDomains = process.env.NODE_USE_DOMAINS;
// set up one global domain.
if (useDomains) {
var domain = require('domain');
var gdom = domain.create();
gdom.on('error', function(er) {
console.log('Error on global domain', er);
throw er;
});
gdom.enter();
}
stored = {};
var server = http.createServer(function (req, res) {
if (useDomains) {
var dom = domain.create();
dom.add(req);
dom.add(res);
}
http.createServer(function (req, res) {
var commands = req.url.split("/");
var commands = req.url.split('/');
var command = commands[1];
var body = "";
var body = '';
var arg = commands[2];
var n_chunks = parseInt(commands[3], 10);
var status = 200;
if (command == "bytes") {
var n = parseInt(arg, 10)
if (command == 'bytes') {
var n = ~~arg;
if (n <= 0)
throw "bytes called with n <= 0"
if (stored[n] === undefined) {
puts("create stored[n]");
stored[n] = "";
throw new Error('bytes called with n <= 0')
if (storedBytes[n] === undefined) {
console.log('create storedBytes[n]');
storedBytes[n] = makeString(n, 'C');
}
body = storedBytes[n];
} else if (command == 'buffer') {
var n = ~~arg;
if (n <= 0)
throw new Error('buffer called with n <= 0');
if (storedBuffer[n] === undefined) {
console.log('create storedBuffer[n]');
storedBuffer[n] = new Buffer(n);
for (var i = 0; i < n; i++) {
stored[n] += "C"
storedBuffer[n][i] = 'C'.charCodeAt(0);
}
}
body = stored[n];
body = storedBuffer[n];
} else if (command == "quit") {
} else if (command == 'unicode') {
var n = ~~arg;
if (n <= 0)
throw new Error('unicode called with n <= 0');
if (storedUnicode[n] === undefined) {
console.log('create storedUnicode[n]');
storedUnicode[n] = makeString(n, '\u263A');
}
body = storedUnicode[n];
} else if (command == 'quit') {
res.connection.server.close();
body = "quitting";
body = 'quitting';
} else if (command == "fixed") {
} else if (command == 'fixed') {
body = fixed;
} else if (command == 'echo') {
res.writeHead(200, { 'Content-Type': 'text/plain',
'Transfer-Encoding': 'chunked' });
req.pipe(res);
return;
} else {
status = 404;
body = "not found\n";
body = 'not found\n';
}
var content_length = body.length.toString();
// example: http://localhost:port/bytes/512/4
// sends a 512 byte body in 4 chunks of 128 bytes
if (n_chunks > 0) {
res.writeHead(status, { 'Content-Type': 'text/plain',
'Transfer-Encoding': 'chunked' });
// send body in chunks
var len = body.length;
var step = ~~(len / n_chunks) || len;
res.sendHeader( status
, { "Content-Type": "text/plain"
, "Content-Length": content_length
}
);
res.sendBody(body);
res.finish();
}).listen(8000);
for (var i = 0; i < len; i += step) {
res.write(body.slice(i, i + step));
}
res.end();
} else {
var content_length = body.length.toString();
res.writeHead(status, { 'Content-Type': 'text/plain',
'Content-Length': content_length });
res.end(body);
}
});
function makeString(size, c) {
var s = '';
while (s.length < size) {
s += c;
}
return s;
}
server.listen(port, function () {
console.log('Listening at http://127.0.0.1:'+port+'/');
});
process.on('exit', function() {
console.error('libuv counters', process.uvCounters());
});

View File

@@ -7,45 +7,45 @@ end
def wait(seconds)
n = (seconds / 0.01).to_i
n.times do
n.times do
sleep(0.01)
#File.read(DIR + '/yahoo.html')
#File.read(DIR + '/yahoo.html')
end
end
class SimpleApp
@@responses = {}
def initialize
@count = 0
end
def deferred?(env)
false
end
def call(env)
path = env['PATH_INFO'] || env['REQUEST_URI']
commands = path.split('/')
@count += 1
if commands.include?('periodical_activity') and @count % 10 != 1
return [200, {'Content-Type'=>'text/plain'}, "quick response!\r\n"]
end
if commands.include?('fibonacci')
n = commands.last.to_i
raise "fibonacci called with n <= 0" if n <= 0
body = (1..n).to_a.map { |i| fib(i).to_s }.join(' ')
status = 200
elsif commands.include?('wait')
n = commands.last.to_f
raise "wait called with n <= 0" if n <= 0
wait(n)
body = "waited about #{n} seconds"
status = 200
elsif commands.include?('bytes')
n = commands.last.to_i
raise "bytes called with n <= 0" if n <= 0
@@ -56,17 +56,17 @@ class SimpleApp
n = 20 * 1024;
body = @@responses[n] || "C"*n
status = 200
elsif commands.include?('test_post_length')
input_body = ""
while chunk = env['rack.input'].read(512)
input_body << chunk
input_body << chunk
end
if env['CONTENT_LENGTH'].to_i == input_body.length
body = "Content-Length matches input length"
status = 200
else
body = "Content-Length doesn't matches input length!
body = "Content-Length doesn't matches input length!
content_length = #{env['CONTENT_LENGTH'].to_i}
input_body.length = #{input_body.length}"
status = 500
@@ -75,7 +75,7 @@ class SimpleApp
status = 404
body = "Undefined url"
end
body += "\r\n"
headers = {'Content-Type' => 'text/plain', 'Content-Length' => body.length.to_s }
[status, headers, [body]]
@@ -90,6 +90,6 @@ if $0 == __FILE__
require 'thin'
require 'ebb'
# Rack::Handler::Mongrel.run(SimpleApp.new, :Port => 8000)
Thin::Server.start("0.0.0.0", 8000, SimpleApp.new)
Thin::Server.start("0.0.0.0", 8000, SimpleApp.new)
# Ebb::start_server(SimpleApp.new, :port => 8000)
end

View File

@@ -0,0 +1,128 @@
//
// Usage:
// node benchmark/http_simple_auto.js <args> <target>
//
// Where:
// <args> Arguments to pass to `ab`.
// <target> Target to benchmark, e.g. `bytes/1024` or `buffer/8192`.
//
var path = require("path");
var http = require("http");
var spawn = require("child_process").spawn;
var port = parseInt(process.env.PORT || 8000);
var fixed = ""
for (var i = 0; i < 20*1024; i++) {
fixed += "C";
}
var stored = {};
var storedBuffer = {};
var server = http.createServer(function (req, res) {
var commands = req.url.split("/");
var command = commands[1];
var body = "";
var arg = commands[2];
var n_chunks = parseInt(commands[3], 10);
var status = 200;
if (command == "bytes") {
var n = parseInt(arg, 10)
if (n <= 0)
throw "bytes called with n <= 0"
if (stored[n] === undefined) {
stored[n] = "";
for (var i = 0; i < n; i++) {
stored[n] += "C"
}
}
body = stored[n];
} else if (command == "buffer") {
var n = parseInt(arg, 10)
if (n <= 0) throw new Error("bytes called with n <= 0");
if (storedBuffer[n] === undefined) {
storedBuffer[n] = new Buffer(n);
for (var i = 0; i < n; i++) {
storedBuffer[n][i] = "C".charCodeAt(0);
}
}
body = storedBuffer[n];
} else if (command == "quit") {
res.connection.server.close();
body = "quitting";
} else if (command == "fixed") {
body = fixed;
} else if (command == "echo") {
res.writeHead(200, { "Content-Type": "text/plain",
"Transfer-Encoding": "chunked" });
req.pipe(res);
return;
} else {
status = 404;
body = "not found\n";
}
// example: http://localhost:port/bytes/512/4
// sends a 512 byte body in 4 chunks of 128 bytes
if (n_chunks > 0) {
res.writeHead(status, { "Content-Type": "text/plain",
"Transfer-Encoding": "chunked" });
// send body in chunks
var len = body.length;
var step = ~~(len / n_chunks) || len;
for (var i = 0; i < len; i += step) {
res.write(body.slice(i, i + step));
}
res.end();
} else {
var content_length = body.length.toString();
res.writeHead(status, { "Content-Type": "text/plain",
"Content-Length": content_length });
res.end(body);
}
});
server.listen(port, function () {
var url = 'http://127.0.0.1:' + port + '/';
var n = process.argv.length - 1;
process.argv[n] = url + process.argv[n];
var cp = spawn('ab', process.argv.slice(2));
cp.stdout.pipe(process.stdout);
cp.stderr.pipe(process.stderr);
cp.on('exit', function() {
server.close();
process.nextTick(dump_mm_stats);
});
});
function dump_mm_stats() {
if (typeof gc != 'function') return;
var before = process.memoryUsage();
for (var i = 0; i < 10; ++i) gc();
var after = process.memoryUsage();
setTimeout(print_stats, 250); // give GC time to settle
function print_stats() {
console.log('\nBEFORE / AFTER GC');
['rss', 'heapTotal', 'heapUsed'].forEach(function(key) {
var a = before[key] / (1024 * 1024);
var b = after[key] / (1024 * 1024);
console.log('%sM / %sM %s', a.toFixed(2), b.toFixed(2), key);
});
}
}

77
benchmark/http_simple_bench.sh Executable file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
SERVER=127.0.0.1
PORT=8000
# You may want to configure your TCP settings to make many ports available
# to node and ab. On macintosh use:
# sudo sysctl -w net.inet.ip.portrange.first=32768
# sudo sysctl -w net.inet.tcp.msl=1000
if [ ! -d benchmark/ ]; then
echo "Run this script from the node root directory"
exit 1
fi
if [ $SERVER == "127.0.0.1" ]; then
./node benchmark/http_simple.js &
node_pid=$!
sleep 1
fi
info=`curl -s http://$SERVER:$PORT/info`
eval $info
date=`date "+%Y%m%d%H%M%S"`
ab_hello_world() {
local type="$1"
local ressize="$2"
if [ $type == "string" ]; then
local uri="bytes/$ressize"
else
local uri="buffer/$ressize"
fi
name="ab-hello-world-$type-$ressize"
dir=".benchmark_reports/$name/$rev/"
if [ ! -d $dir ]; then
mkdir -p $dir
fi
summary_fn="$dir/$date.summary"
data_fn="$dir/$date.data"
echo "Bench $name starts in 3 seconds..."
# let shit calm down
sleep 3
# hammer that as hard as it can for 10 seconds.
ab -g $data_fn -c 100 -t 10 http://$SERVER:$PORT/$uri > $summary_fn
# add our data about the server
echo >> $summary_fn
echo >> $summary_fn
echo "webserver-rev: $rev" >> $summary_fn
echo "webserver-uname: $uname" >> $summary_fn
grep Req $summary_fn
echo "Summary: $summary_fn"
echo
}
# 1k
ab_hello_world 'string' '1024'
ab_hello_world 'buffer' '1024'
# 100k
ab_hello_world 'string' '102400'
ab_hello_world 'buffer' '102400'
if [ ! -z $node_pid ]; then
kill -9 $node_pid
fi

View File

@@ -0,0 +1,9 @@
var cluster = require('cluster');
var os = require('os');
if (cluster.isMaster) {
console.log('master running on pid %d', process.pid);
for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork();
} else {
require(__dirname + '/http_simple.js');
}

49
benchmark/idle_clients.js Normal file
View File

@@ -0,0 +1,49 @@
net = require('net');
var errors = 0, connections = 0;
var lastClose = 0;
function connect () {
process.nextTick(function () {
var s = net.Stream();
var gotConnected = false;
s.connect(9000);
s.on('connect', function () {
gotConnected = true;
connections++;
connect();
});
s.on('close', function () {
if (gotConnected) connections--;
lastClose = new Date();
});
s.on('error', function () {
errors++;
});
});
}
connect();
var oldConnections, oldErrors;
// Try to start new connections every so often
setInterval(connect, 5000);
setInterval(function () {
if (oldConnections != connections) {
oldConnections = connections;
console.log("CLIENT %d connections: %d", process.pid, connections);
}
if (oldErrors != errors) {
oldErrors = errors;
console.log("CLIENT %d errors: %d", process.pid, errors);
}
}, 1000);

31
benchmark/idle_server.js Normal file
View File

@@ -0,0 +1,31 @@
net = require('net');
connections = 0;
var errors = 0;
server = net.Server(function (socket) {
socket.on('error', function () {
errors++;
});
});
//server.maxConnections = 128;
server.listen(9000);
var oldConnections, oldErrors;
setInterval(function () {
if (oldConnections != server.connections) {
oldConnections = server.connections;
console.log("SERVER %d connections: %d", process.pid, server.connections);
}
if (oldErrors != errors) {
oldErrors = errors;
console.log("SERVER %d errors: %d", process.pid, errors);
}
}, 1000);

122
benchmark/io.c Normal file
View File

@@ -0,0 +1,122 @@
/**
* gcc -o iotest io.c
*/
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/time.h>
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
static int c = 0;
static int tsize = 1000 * 1048576;
static const char path[] = "/tmp/wt.dat";
static char buf[65536];
static uint64_t now(void) {
struct timeval tv;
if (gettimeofday(&tv, NULL))
abort();
return tv.tv_sec * 1000000ULL + tv.tv_usec;
}
static void writetest(int size, size_t bsize)
{
int i;
uint64_t start, end;
double elapsed;
double mbps;
assert(bsize <= sizeof buf);
int fd = open(path, O_CREAT|O_WRONLY, 0644);
if (fd < 0) {
perror("open failed");
exit(254);
}
start = now();
for (i = 0; i < size; i += bsize) {
int rv = write(fd, buf, bsize);
if (c++ % 2000 == 0) fprintf(stderr, ".");
if (rv < 0) {
perror("write failed");
exit(254);
}
}
#ifndef NSYNC
# ifdef __linux__
fdatasync(fd);
# else
fsync(fd);
# endif
#endif /* SYNC */
close(fd);
end = now();
elapsed = (end - start) / 1e6;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "\nWrote %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
}
void readtest(int size, size_t bsize)
{
int i;
uint64_t start, end;
double elapsed;
double mbps;
assert(bsize <= sizeof buf);
int fd = open(path, O_RDONLY, 0644);
if (fd < 0) {
perror("open failed");
exit(254);
}
start = now();
for (i = 0; i < size; i += bsize) {
int rv = read(fd, buf, bsize);
if (rv < 0) {
perror("write failed");
exit(254);
}
}
close(fd);
end = now();
elapsed = (end - start) / 1e6;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "Read %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
}
void cleanup() {
unlink(path);
}
int main()
{
int i;
int bsizes[] = {1024, 4096, 8192, 16384, 32768, 65536, 0};
for (i = 0; bsizes[i] != 0; i++) {
writetest(tsize, bsizes[i]);
}
for (i = 0; bsizes[i] != 0; i++) {
readtest(tsize, bsizes[i]);
}
atexit(cleanup);
return 0;
}

109
benchmark/io.js Normal file
View File

@@ -0,0 +1,109 @@
var fs = require('fs');
var util = require('util');
var Buffer = require('buffer').Buffer;
var path = "/tmp/wt.dat";
var tsize = 1000 * 1048576;
var bsizes = [1024, 4096, 8192, 16384, 32768, 65536];
function bufit(size) {
var buf = new Buffer(size);
for (var i = 0; i <buf.length ; i += 1) {
buf[i] = 33;
}
return buf;
}
function once(emitter, name, cb) {
function incb() {
cb.apply(undefined, arguments);
emitter.removeListener(name, incb);
}
emitter.addListener(name, incb);
}
c = 0
function writetest(size, bsize) {
var s = fs.createWriteStream(path, {'flags': 'w', 'mode': 0644});
var remaining = size;
var buf = bufit(bsize);
function dowrite() {
var rv = s.write(buf);
remaining -= buf.length;
if (remaining > 0) {
//if (remaining % 90000 == 0) console.error("remaining: %d", remaining);
//process.nextTick(dowrite);
} else {
s.emit('done')
s.end();
}
}
s.on('drain', function () {
dowrite();
if (c++ % 2000 == 0) util.print(".");
});
dowrite();
return s;
}
function readtest(size, bsize) {
var s = fs.createReadStream(path, {'flags': 'r', 'encoding': 'binary', 'mode': 0644, 'bufferSize': bsize});
s.addListener("data", function (chunk) {
// got a chunk...
});
return s;
}
function wt(tsize, bsize, done) {
var start = Date.now();
s = writetest(tsize, bsize);
s.addListener('close', function() {
var end = Date.now();
var diff = end - start;
console.log('Wrote '+ tsize +' bytes in '+ diff/1000 +'s using '+ bsize +' byte buffers: '+ ((tsize/(diff/1000)) / 1048576) +' mB/s');
done();
});
}
function rt(tsize, bsize, done) {
var start = Date.now();
s = readtest(tsize, bsize);
s.addListener('close', function() {
var end = Date.now();
var diff = end - start;
console.log('Read '+ tsize +' bytes in '+ diff/1000 +'s using '+ bsize +' byte buffers: '+ ((tsize/(diff/1000)) / 1048576) +' mB/s');
done();
});
}
var bs= 0;
function nextwt() {
if (bsizes.length <= bs) {
bs = 0;
nextrt();
return;
}
wt(tsize, bsizes[bs], nextwt);
bs += 1;
}
function nextrt() {
if (bsizes.length <= bs) {
fs.unlink(path, function (err) {
if (err) throw err;
console.log('All done!');
});
return;
}
rt(tsize, bsizes[bs], nextrt);
bs += 1;
}
nextwt();

41
benchmark/next-tick-2.js Normal file
View File

@@ -0,0 +1,41 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var count = 2e6,
left = count,
start;
function onNextTick() {
if (--left) {
process.nextTick(onNextTick);
} else {
finalize();
}
}
function finalize() {
var duration = (new Date()).getTime() - start,
ticksPerSec = count / duration * 1000;
console.log("nextTick callbacks per second: " + Math.round(ticksPerSec));
}
start = (new Date()).getTime();
process.nextTick(onNextTick);

17
benchmark/next-tick.js Normal file
View File

@@ -0,0 +1,17 @@
// run with `time node benchmark/next-tick.js`
var assert = require('assert');
var N = 1e7;
var n = 0;
process.on('exit', function() {
assert.equal(n, N);
});
function cb() {
n++;
}
for (var i = 0; i < N; ++i) {
process.nextTick(cb);
}

86
benchmark/plot.R Executable file
View File

@@ -0,0 +1,86 @@
#!/usr/bin/env Rscript
# To use this script you'll need to install R: http://www.r-project.org/
# and a library for R called ggplot2
# Which can be done by starting R and typing install.packages("ggplot2")
# like this:
#
# shell% R
# R version 2.11.0 beta (2010-04-12 r51689)
# > install.packages("ggplot2")
# (follow prompt)
#
# Then you can try this script by providing a full path to .data file
# outputed from 'make bench'
#
# > cd ~/src/node
# > make bench
# ...
# > ./benchmark/plot.R .benchmark_reports/ab-hello-world-buffer-1024/ff456b38862de3fd0118c6ac6b3f46edb1fbb87f/20101013162056.data
#
# This will generate a PNG file which you can view
#
#
# Hopefully these steps will be automated in the future.
library(ggplot2)
args <- commandArgs(TRUE)
ab.load <- function (filename, name) {
raw <- data.frame(read.csv(filename, sep="\t", header=T), server=name)
raw <- data.frame(raw, time=raw$seconds-min(raw$seconds))
raw <- data.frame(raw, time_s=raw$time/1000000)
raw
}
#ab.tsPoint <- function (d) {
# qplot(time_s, ttime, data=d, facets=server~.,
# geom="point", alpha=I(1/15), ylab="response time (ms)",
# xlab="time (s)", main="c=30, res=26kb",
# ylim=c(0,100))
#}
#
#ab.tsLine <- function (d) {
# qplot(time_s, ttime, data=d, facets=server~.,
# geom="line", ylab="response time (ms)",
# xlab="time (s)", main="c=30, res=26kb",
# ylim=c(0,100))
#}
filename <- args[0:1]
data <- ab.load(filename, "node")
# histogram
#hist_png_filename <- gsub(".data", "_hist.png", filename)
hist_png_filename <- "hist.png"
png(filename = hist_png_filename, width = 480, height = 380, units = "px")
qplot(ttime, data=data, geom="histogram",
main="xxx",
binwidth=1, xlab="response time (ms)",
xlim=c(0,100))
print(hist_png_filename)
# time series
#ts_png_filename <- gsub(".data", "_ts.png", filename)
ts_png_filename = "ts.png"
png(filename = ts_png_filename, width = 480, height = 380, units = "px")
qplot(time, ttime, data=data, facets=server~.,
geom="point", alpha=I(1/15), ylab="response time (ms)",
xlab="time (s)", main="xxx",
ylim=c(0,100))
print(ts_png_filename)

View File

@@ -1,14 +1,13 @@
var path = require("path");
libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir);
process.mixin(require("sys"));
var util = require("util"),
childProcess = require("child_process");
function next (i) {
if (i <= 0) return;
var child = process.createChildProcess("echo", ["hello"]);
var child = childProcess.spawn("echo", ["hello"]);
child.addListener("output", function (chunk) {
if (chunk) print(chunk);
child.stdout.addListener("data", function (chunk) {
util.print(chunk);
});
child.addListener("exit", function (code) {

View File

@@ -0,0 +1 @@
console.log(process.memoryUsage().rss);

View File

@@ -1,17 +1,16 @@
var path = require("path");
libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir);
process.mixin(require("sys"));
var benchmarks = [ "static_http_server.js"
, "timers.js"
var util = require("util");
var childProcess = require("child_process");
var benchmarks = [ "timers.js"
, "process_loop.js"
, "static_http_server.js"
];
var benchmark_dir = path.dirname(__filename);
var benchmarkDir = path.dirname(__filename);
function exec (script, callback) {
var start = new Date();
var child = process.createChildProcess(process.ARGV[0], [path.join(benchmark_dir, script)]);
var child = childProcess.spawn(process.argv[0], [path.join(benchmarkDir, script)]);
child.addListener("exit", function (code) {
var elapsed = new Date() - start;
callback(elapsed, code);
@@ -20,12 +19,12 @@ function exec (script, callback) {
function runNext (i) {
if (i >= benchmarks.length) return;
print(benchmarks[i] + ": ");
util.print(benchmarks[i] + ": ");
exec(benchmarks[i], function (elapsed, code) {
if (code != 0) {
puts("ERROR ");
console.log("ERROR ");
}
puts(elapsed);
console.log(elapsed);
runNext(i+1);
});
};

15
benchmark/settimeout.js Normal file
View File

@@ -0,0 +1,15 @@
console.log("wait...");
var done = 0;
var N = 5000000;
var begin = new Date();
for (var i = 0; i < N; i++) {
setTimeout(function () {
if (++done == N) {
var end = new Date();
console.log("smaller is better");
console.log("startup: %d", start - begin);
console.log("done: %d", end - start);
}
}, 1000);
}
var start = new Date();

26
benchmark/startup.js Normal file
View File

@@ -0,0 +1,26 @@
var spawn = require('child_process').spawn,
path = require('path'),
emptyJsFile = path.join(__dirname, '../test/fixtures/semicolon.js'),
starts = 100,
i = 0,
start;
function startNode() {
var node = spawn(process.execPath || process.argv[0], [emptyJsFile]);
node.on('exit', function(exitCode) {
if (exitCode !== 0) {
throw new Error('Error during node startup');
}
i++;
if (i < starts) {
startNode();
} else{
var duration = +new Date - start;
console.log('Started node %d times in %s ms. %d ms / start.', starts, duration, duration / starts);
}
});
}
start = +new Date;
startNode();

View File

@@ -1,46 +1,43 @@
var path = require("path");
libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir);
http = require("http");
var http = require('http');
var concurrency = 30;
var port = 8000;
var port = 12346;
var n = 700;
var bytes = 1024*5;
var requests = 0;
var responses = 0;
var body = "";
var body = '';
for (var i = 0; i < bytes; i++) {
body += "C";
body += 'C';
}
var server = http.createServer(function (req, res) {
res.sendHeader(200, {
"Content-Type": "text/plain",
"Content-Length": body.length
var server = http.createServer(function(req, res) {
res.writeHead(200, {
'Content-Type': 'text/plain',
'Content-Length': body.length
});
res.sendBody(body);
res.finish();
res.end(body);
})
server.listen(port);
function responseListener (res) {
res.addListener("complete", function () {
if (requests < n) {
res.client.request("/").finish(responseListener);
requests++;
}
server.listen(port, function() {
var agent = new http.Agent();
agent.maxSockets = concurrency;
if (++responses == n) {
server.close();
}
});
}
for (var i = 0; i < concurrency; i++) {
var client = http.createClient(port);
client.id = i;
client.request("/").finish(responseListener);
requests++;
}
for (var i = 0; i < n; i++) {
var req = http.get({
port: port,
path: '/',
agent: agent
}, function(res) {
res.on('end', function() {
if (++responses === n) {
server.close();
}
});
});
req.id = i;
requests++;
}
});

View File

@@ -0,0 +1,6 @@
for (var i = 0; i < 9e7; i++) {
s = '01234567890';
s[1] = "a";
}

View File

@@ -0,0 +1,25 @@
var net = require('net');
var received = 0;
var start = new Date();
var socket = net.connect(8000);
socket.on('data', function(d) {
received += d.length;
});
var interval = setInterval(function() {
// After 1 gigabyte shutdown.
if (received > 10 * 1024 * 1024 * 1024) {
socket.destroy();
clearInterval(interval);
process.exit(0);
} else {
// Otherwise print some stats.
var now = new Date();
var gigabytes = received / (1024 * 1024 * 1024);
var gigabits = gigabytes * 8.0;
var millisec = now - start;
var sec = millisec / 1000;
console.log((gigabits / sec) + " gbit/sec")
}
}, 1000);

21
benchmark/throughput.js Normal file
View File

@@ -0,0 +1,21 @@
var fork = require('child_process').fork;
var net = require('net');
var buffer = new Buffer(1024 * 1024);
function write(socket) {
if (!socket.writable) return;
socket.write(buffer, function() {
write(socket);
});
}
var server = net.createServer(function(socket) {
server.close();
write(socket);
});
server.listen(8000, function() {
fork(__dirname + '/throughput-child.js');
});

86
benchmark/tls-connect.js Normal file
View File

@@ -0,0 +1,86 @@
var assert = require('assert'),
fs = require('fs'),
path = require('path'),
tls = require('tls');
var target_connections = 10000,
concurrency = 10;
for (var i = 2; i < process.argv.length; i++) {
switch (process.argv[i]) {
case '-c':
concurrency = ~~process.argv[++i];
break;
case '-n':
target_connections = ~~process.argv[++i];
break;
default:
throw new Error('Invalid flag: ' + process.argv[i]);
}
}
var cert_dir = path.resolve(__dirname, '../test/fixtures'),
options = { key: fs.readFileSync(cert_dir + '/test_key.pem'),
cert: fs.readFileSync(cert_dir + '/test_cert.pem'),
ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ] };
var server = tls.createServer(options, onConnection);
server.listen(8000);
var initiated_connections = 0,
server_connections = 0,
client_connections = 0,
start = Date.now();
for (var i = 0; i < concurrency; i++)
makeConnection();
process.on('exit', onExit);
function makeConnection() {
if (initiated_connections >= target_connections)
return;
initiated_connections++;
var conn = tls.connect(8000, function() {
client_connections++;
if (client_connections % 100 === 0)
console.log(client_connections + ' of ' + target_connections +
' connections made');
conn.end();
makeConnection();
});
}
function onConnection(conn) {
server_connections++;
if (server_connections === target_connections)
server.close();
}
function onExit() {
var end = Date.now(),
s = (end - start) / 1000,
persec = Math.round(target_connections / s);
assert.equal(initiated_connections, target_connections);
assert.equal(client_connections, target_connections);
assert.equal(server_connections, target_connections);
console.log('%d connections in %d s', target_connections, s);
console.log('%d connections per second', persec);
}

View File

@@ -0,0 +1,63 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
process.exit(0);
}
var common = require('../common');
var assert = require('assert');
var tls = require('tls');
var fs = require('fs');
var path = require('path');
var options = {
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')),
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))
};
var fragment = 'fr';
var dataSize = 1024 * 1024;
var sent = 0;
var received = 0;
var server = tls.createServer(options, function (stream) {
for (sent = 0; sent <= dataSize; sent += fragment.length) {
stream.write(fragment);
}
stream.end();
});
server.listen(common.PORT, function () {
var client = tls.connect(common.PORT, function () {
client.on('data', function (data) {
received += data.length;
});
client.on('end', function () {
server.close();
});
});
});
process.on('exit', function () {
assert.equal(sent, received);
});

15
benchmark/v8_bench.js Normal file
View File

@@ -0,0 +1,15 @@
// compare with "google-chrome deps/v8/benchmarks/run.html"
var fs = require('fs');
var path = require('path');
var vm = require('vm');
var dir = path.join(__dirname, '..', 'deps', 'v8', 'benchmarks');
global.print = console.log;
global.load = function (x) {
var source = fs.readFileSync(path.join(dir, x), 'utf8');
vm.runInThisContext(source, x);
}
load('run.js');

View File

@@ -1,12 +0,0 @@
#!/usr/bin/env node
process.mixin(require('sys'));
puts("Welcome to the Node.js REPL.");
puts("Enter ECMAScript at the prompt.");
puts("Tip 1: Use 'rlwrap node-repl' for a better interface");
puts("Tip 2: Type Control-D to exit.");
puts("Type '.help' for options.");
require('repl').start();
// vim:ft=javascript

222
common.gypi Normal file
View File

@@ -0,0 +1,222 @@
{
'variables': {
'visibility%': 'hidden', # V8's visibility setting
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
'want_separate_host_toolset': 0, # V8 should not build target and host
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'gcc_version%': 'unknown',
'clang%': 0,
# Turn on optimizations that may trigger compiler bugs.
# Use at your own risk. Do *NOT* report bugs if this option is enabled.
'node_unsafe_optimizations%': 0,
# Enable V8's post-mortem debugging only on unix flavors.
'conditions': [
['OS != "win"', {
'v8_postmortem_support': 'true'
}]
],
},
'target_defaults': {
'default_configuration': 'Release',
'configurations': {
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'cflags': [ '-g', '-O0' ],
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
}],
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
'Optimization': 0, # /Od, no optimization
'MinimalRebuild': 'false',
'OmitFramePointers': 'false',
'BasicRuntimeChecks': 3, # /RTC1
},
'VCLinkerTool': {
'LinkIncremental': 2, # enable incremental linking
},
},
},
'Release': {
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
}],
['node_unsafe_optimizations==1', {
'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
'ldflags': [ '-Wl,--gc-sections' ],
}, {
'cflags': [ '-O2', '-fno-strict-aliasing' ],
'cflags!': [ '-O3', '-fstrict-aliasing' ],
'conditions': [
# Required by the dtrace post-processor. Unfortunately,
# some gcc/binutils combos generate bad code when
# -ffunction-sections is enabled. Let's hope for the best.
['OS=="solaris"', {
'cflags': [ '-ffunction-sections', '-fdata-sections' ],
}, {
'cflags!': [ '-ffunction-sections', '-fdata-sections' ],
}],
['clang==1 or gcc_version >= 40', {
'cflags': [ '-fno-tree-vrp' ],
}],
],
}],
['OS=="solaris"', {
'cflags': [ '-fno-omit-frame-pointer' ],
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}],
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
'Optimization': 3, # /Ox, full optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
'OmitFramePointers': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'RuntimeTypeInfo': 'false',
'ExceptionHandling': '0',
'AdditionalOptions': [
'/MP', # compile across multiple CPUs
],
},
'VCLibrarianTool': {
'AdditionalOptions': [
'/LTCG', # link time code generation
],
},
'VCLinkerTool': {
'LinkTimeCodeGeneration': 1, # link-time code generation
'OptimizeReferences': 2, # /OPT:REF
'EnableCOMDATFolding': 2, # /OPT:ICF
'LinkIncremental': 1, # disable incremental linking
},
},
}
},
'msvs_settings': {
'VCCLCompilerTool': {
'StringPooling': 'true', # pool string literals
'DebugInformationFormat': 3, # Generate a PDB
'WarningLevel': 3,
'BufferSecurityCheck': 'true',
'ExceptionHandling': 1, # /EHsc
'SuppressStartupBanner': 'true',
'WarnAsError': 'false',
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'conditions': [
['target_arch=="x64"', {
'TargetMachine' : 17 # /MACHINE:X64
}],
],
'GenerateDebugInformation': 'true',
'RandomizedBaseAddress': 2, # enable ASLR
'DataExecutionPrevention': 2, # enable DEP
'AllowIsolation': 'true',
'SuppressStartupBanner': 'true',
'target_conditions': [
['_type=="executable"', {
'SubSystem': 1, # console executable
}],
],
},
},
'conditions': [
['OS == "win"', {
'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
'defines': [
'WIN32',
# we don't really want VC++ warning us about
# how dangerous C functions are...
'_CRT_SECURE_NO_DEPRECATE',
# ... or that C implementations shouldn't use
# POSIX names
'_CRT_NONSTDC_NO_DEPRECATE',
'BUILDING_V8_SHARED=1',
'BUILDING_UV_SHARED=1',
],
}, {
'defines': [
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'cflags': [ '-Wall', '-pthread', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', '-rdynamic' ],
'conditions': [
[ 'target_arch=="ia32"', {
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="x64"', {
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'OS=="solaris"', {
'cflags': [ '-pthreads' ],
'ldflags': [ '-pthreads' ],
'cflags!': [ '-pthread' ],
'ldflags!': [ '-pthread' ],
}],
],
}],
['OS=="mac"', {
'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
'xcode_settings': {
'ALWAYS_SEARCH_USER_PATHS': 'NO',
'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
# (Equivalent to -fPIC)
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'GCC_VERSION': '4.2',
'PREBINDING': 'NO', # No -Wl,-prebind
'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
'-Wendif-labels',
'-W',
'-Wno-unused-parameter',
],
},
'target_conditions': [
['_type!="static_library"', {
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
}],
],
'conditions': [
['target_arch=="ia32"', {
'xcode_settings': {'ARCHS': ['i386']},
}],
['target_arch=="x64"', {
'xcode_settings': {'ARCHS': ['x86_64']},
}],
],
}],
],
}
}

482
configure vendored
View File

@@ -1,21 +1,471 @@
#! /bin/sh
#!/usr/bin/env python
import optparse
import os
import pprint
import re
import subprocess
import sys
# v8 doesn't like ccache
if [ ! -z "`echo $CC | grep ccache`" ]; then
echo "Error: V8 doesn't like cache. Please set your CC env var to 'gcc'"
echo " (ba)sh: export CC=gcc"
exit 1
fi
CC = os.environ.get('CC', 'cc')
CUR_DIR=$PWD
root_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(root_dir, 'deps', 'v8', 'tools'))
#possible relative path
WORKINGDIR=`dirname $0`
cd $WORKINGDIR
#abs path
WORKINGDIR=`pwd`
cd $CUR_DIR
# parse our options
parser = optparse.OptionParser()
"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
parser.add_option("--debug",
action="store_true",
dest="debug",
help="Also build debug build")
exit $?
parser.add_option("--prefix",
action="store",
dest="prefix",
help="Select the install prefix (defaults to /usr/local)")
parser.add_option("--without-npm",
action="store_true",
dest="without_npm",
help="Don\'t install the bundled npm package manager")
parser.add_option("--without-waf",
action="store_true",
dest="without_waf",
help="Don\'t install node-waf")
parser.add_option("--without-ssl",
action="store_true",
dest="without_ssl",
help="Build without SSL")
parser.add_option("--without-snapshot",
action="store_true",
dest="without_snapshot",
help="Build without snapshotting V8 libraries. You might want to set"
" this for cross-compiling. [Default: False]")
parser.add_option("--shared-v8",
action="store_true",
dest="shared_v8",
help="Link to a shared V8 DLL instead of static linking")
parser.add_option("--shared-v8-includes",
action="store",
dest="shared_v8_includes",
help="Directory containing V8 header files")
parser.add_option("--shared-v8-libpath",
action="store",
dest="shared_v8_libpath",
help="A directory to search for the shared V8 DLL")
parser.add_option("--shared-v8-libname",
action="store",
dest="shared_v8_libname",
help="Alternative lib name to link to (default: 'v8')")
parser.add_option("--shared-openssl",
action="store_true",
dest="shared_openssl",
help="Link to a shared OpenSSl DLL instead of static linking")
parser.add_option("--shared-openssl-includes",
action="store",
dest="shared_openssl_includes",
help="Directory containing OpenSSL header files")
parser.add_option("--shared-openssl-libpath",
action="store",
dest="shared_openssl_libpath",
help="A directory to search for the shared OpenSSL DLLs")
parser.add_option("--shared-openssl-libname",
action="store",
dest="shared_openssl_libname",
help="Alternative lib name to link to (default: 'crypto,ssl')")
# deprecated
parser.add_option("--openssl-use-sys",
action="store_true",
dest="shared_openssl",
help=optparse.SUPPRESS_HELP)
# deprecated
parser.add_option("--openssl-includes",
action="store",
dest="shared_openssl_includes",
help=optparse.SUPPRESS_HELP)
# deprecated
parser.add_option("--openssl-libpath",
action="store",
dest="shared_openssl_libpath",
help=optparse.SUPPRESS_HELP)
parser.add_option("--no-ssl2",
action="store_true",
dest="no_ssl2",
help="Disable OpenSSL v2")
parser.add_option("--shared-zlib",
action="store_true",
dest="shared_zlib",
help="Link to a shared zlib DLL instead of static linking")
parser.add_option("--shared-zlib-includes",
action="store",
dest="shared_zlib_includes",
help="Directory containing zlib header files")
parser.add_option("--shared-zlib-libpath",
action="store",
dest="shared_zlib_libpath",
help="A directory to search for the shared zlib DLL")
parser.add_option("--shared-zlib-libname",
action="store",
dest="shared_zlib_libname",
help="Alternative lib name to link to (default: 'z')")
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
help="Build with DTrace (default is true on supported systems)")
parser.add_option("--without-dtrace",
action="store_true",
dest="without_dtrace",
help="Build without DTrace")
parser.add_option("--with-etw",
action="store_true",
dest="with_etw",
help="Build with ETW (default is true on Windows)")
parser.add_option("--without-etw",
action="store_true",
dest="without_etw",
help="Build without ETW")
# CHECKME does this still work with recent releases of V8?
parser.add_option("--gdb",
action="store_true",
dest="gdb",
help="add gdb support")
parser.add_option("--dest-cpu",
action="store",
dest="dest_cpu",
help="CPU architecture to build for. Valid values are: arm, ia32, x64")
parser.add_option("--no-ifaddrs",
action="store_true",
dest="no_ifaddrs",
help="Use on deprecated SunOS systems that do not support ifaddrs.h")
parser.add_option("--with-arm-float-abi",
action="store",
dest="arm_float_abi",
help="Specifies which floating-point ABI to use. Valid values are: "
"soft, softfp, hard")
(options, args) = parser.parse_args()
def b(value):
"""Returns the string 'true' if value is truthy, 'false' otherwise."""
if value:
return 'true'
else:
return 'false'
def pkg_config(pkg):
cmd = os.popen('pkg-config --libs %s' % pkg, 'r')
libs = cmd.readline().strip()
ret = cmd.close()
if (ret): return None
cmd = os.popen('pkg-config --cflags %s' % pkg, 'r')
cflags = cmd.readline().strip()
ret = cmd.close()
if (ret): return None
return (libs, cflags)
def cc_macros():
"""Checks predefined macros using the CC command."""
try:
p = subprocess.Popen(CC.split() + ['-dM', '-E', '-'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
except OSError:
print '''Node.js configure error: No acceptable C compiler found!
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.
'''
sys.exit()
p.stdin.write('\n')
out = p.communicate()[0]
out = str(out).split('\n')
k = {}
for line in out:
import shlex
lst = shlex.split(line)
if len(lst) > 2:
key = lst[1]
val = lst[2]
k[key] = val
return k
def is_arch_armv7():
"""Check for ARMv7 instructions"""
cc_macros_cache = cc_macros()
return ('__ARM_ARCH_7__' in cc_macros_cache or
'__ARM_ARCH_7A__' in cc_macros_cache or
'__ARM_ARCH_7R__' in cc_macros_cache or
'__ARM_ARCH_7M__' in cc_macros_cache)
def arm_hard_float_abi():
"""Check for hardfloat or softfloat eabi on ARM"""
# GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
# the Floating Point ABI used (PCS stands for Procedure Call Standard).
# We use these as well as a couple of other defines to statically determine
# what FP ABI used.
# GCC versions 4.4 and below don't support hard-fp.
# GCC versions 4.5 may support hard-fp without defining __ARM_PCS or
# __ARM_PCS_VFP.
if compiler_version() >= (4, 6, 0):
return '__ARM_PCS_VFP' in cc_macros()
elif compiler_version() < (4, 5, 0):
return False
elif '__ARM_PCS_VFP' in cc_macros():
return True
elif ('__ARM_PCS' in cc_macros() or
'__SOFTFP' in cc_macros() or
not '__VFP_FP__' in cc_macros()):
return False
else:
print '''Node.js configure error: Your version of GCC does not report
the Floating-Point ABI to compile for your hardware
Please manually specify which floating-point ABI to use with the
--with-arm-float-abi option.
'''
sys.exit()
def host_arch_cc():
"""Host architecture check using the CC command."""
k = cc_macros()
matchup = {
'__x86_64__' : 'x64',
'__i386__' : 'ia32',
'__arm__' : 'arm',
}
rtn = 'ia32' # default
for i in matchup:
if i in k and k[i] != '0':
rtn = matchup[i]
break
return rtn
def host_arch_win():
"""Host architecture check using environ vars (better way to do this?)"""
arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')
matchup = {
'AMD64' : 'x64',
'x86' : 'ia32',
'arm' : 'arm',
}
return matchup.get(arch, 'ia32')
def compiler_version():
try:
proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
except WindowsError:
return (0, False)
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)
version = tuple(map(int, proc.communicate()[0].split('.')))
return (version, is_clang)
def configure_node(o):
# TODO add gdb
o['variables']['v8_no_strict_aliasing'] = 1 # work around compiler bugs
o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '')
o['variables']['node_install_npm'] = b(not options.without_npm)
o['variables']['node_install_waf'] = b(not options.without_waf)
o['default_configuration'] = 'Debug' if options.debug else 'Release'
host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
target_arch = options.dest_cpu or host_arch
o['variables']['host_arch'] = host_arch
o['variables']['target_arch'] = target_arch
# V8 on ARM requires that armv7 is set. CPU Model detected by
# the presence of __ARM_ARCH_7__ and the like defines in compiler
if target_arch == 'arm':
if options.arm_float_abi:
hard_float = options.arm_float_abi == 'hard'
else:
hard_float = arm_hard_float_abi()
o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float)
o['variables']['armv7'] = 1 if is_arch_armv7() else 0
cc_version, is_clang = compiler_version()
o['variables']['clang'] = 1 if is_clang else 0
if not is_clang and cc_version != 0:
o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1]
# clang has always supported -fvisibility=hidden, right?
if not is_clang and cc_version < (4,0,0):
o['variables']['visibility'] = ''
# By default, enable DTrace on SunOS systems. Don't allow it on other
# systems, since it won't work. (The MacOS build process is different than
# SunOS, and we haven't implemented it.)
if sys.platform.startswith('sunos'):
o['variables']['node_use_dtrace'] = b(not options.without_dtrace)
elif b(options.with_dtrace) == 'true':
raise Exception('DTrace is currently only supported on SunOS systems.')
else:
o['variables']['node_use_dtrace'] = 'false'
if options.no_ifaddrs:
o['defines'] += ['SUNOS_NO_IFADDRS']
# By default, enable ETW on Windows.
if sys.platform.startswith('win32'):
o['variables']['node_use_etw'] = b(not options.without_etw);
elif b(options.with_etw) == 'true':
raise Exception('ETW is only supported on Windows.')
else:
o['variables']['node_use_etw'] = 'false'
def configure_libz(o):
o['variables']['node_shared_zlib'] = b(options.shared_zlib)
# assume shared_zlib if one of these is set?
if options.shared_zlib_libpath:
o['libraries'] += ['-L%s' % options.shared_zlib_libpath]
if options.shared_zlib_libname:
o['libraries'] += ['-l%s' % options.shared_zlib_libname]
elif options.shared_zlib:
o['libraries'] += ['-lz']
if options.shared_zlib_includes:
o['include_dirs'] += [options.shared_zlib_includes]
def configure_v8(o):
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['node_shared_v8'] = b(options.shared_v8)
# assume shared_v8 if one of these is set?
if options.shared_v8_libpath:
o['libraries'] += ['-L%s' % options.shared_v8_libpath]
if options.shared_v8_libname:
o['libraries'] += ['-l%s' % options.shared_v8_libname]
elif options.shared_v8:
o['libraries'] += ['-lv8']
if options.shared_v8_includes:
o['include_dirs'] += [options.shared_v8_includes]
def configure_openssl(o):
o['variables']['node_use_openssl'] = b(not options.without_ssl)
o['variables']['node_shared_openssl'] = b(options.shared_openssl)
if options.without_ssl:
return
if options.no_ssl2:
o['defines'] += ['OPENSSL_NO_SSL2=1']
if options.shared_openssl:
(libs, cflags) = pkg_config('openssl') or ('-lssl -lcrypto', '')
if options.shared_openssl_libpath:
o['libraries'] += ['-L%s' % options.shared_openssl_libpath]
if options.shared_openssl_libname:
libnames = options.shared_openssl_libname.split(',')
o['libraries'] += ['-l%s' % s for s in libnames]
else:
o['libraries'] += libs.split()
if options.shared_openssl_includes:
o['include_dirs'] += [options.shared_openssl_includes]
else:
o['cflags'] += cflags.split()
output = {
'variables': {},
'include_dirs': [],
'libraries': [],
'defines': [],
'cflags': [],
}
configure_node(output)
configure_libz(output)
configure_v8(output)
configure_openssl(output)
# variables should be a root level element,
# move everything else to target_defaults
variables = output['variables']
del output['variables']
output = {
'variables': variables,
'target_defaults': output
}
pprint.pprint(output, indent=2)
def write(filename, data):
filename = os.path.join(root_dir, filename)
print "creating ", filename
f = open(filename, 'w+')
f.write(data)
write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
pprint.pformat(output, indent=2) + "\n")
write('config.mk', "# Do not edit. Generated by the configure script.\n" +
("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release')))
if os.name == 'nt':
gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010']
else:
gyp_args = ['-f', 'make']
subprocess.call([sys.executable, 'tools/gyp_node'] + gyp_args)

View File

@@ -1,33 +0,0 @@
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -I. -Wall -Werror -Wextra #-DNDEBUG=1
LDFLAGS = -pthread
CC = gcc
AR = ar
RANLIB = ranlib
DEP = coupling.h
SRC = coupling.c
OBJ = ${SRC:.c=.o}
NAME=libcoupling
OUTPUT_A=$(NAME).a
all: $(OUTPUT_A)
$(OUTPUT_A): $(OBJ)
$(AR) cru $(OUTPUT_A) $(OBJ)
$(RANLIB) $(OUTPUT_A)
.c.o:
$(CC) -c ${CFLAGS} $<
${OBJ}: ${DEP}
test: test.c $(OUTPUT_A)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ test.c $(OUTPUT_A)
clean:
rm -f $(OUTPUT_A) *.o test
.PHONY: all clean

View File

@@ -1,419 +0,0 @@
/* Copyright (c) 2009 Ryan Dahl (ry@tinyclouds.org)
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "coupling.h"
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/select.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <assert.h>
#include <pthread.h>
#ifdef PIPE_BUF
# define BUFSIZE PIPE_BUF
#else
# define BUFSIZE 4096
#endif
#define MAX(a,b) ((a) > (b) ? (a) : (b))
// ring buffer
typedef struct {
int head;
int tail;
int size;
char buf[BUFSIZE];
} ring_buffer;
static inline void
ring_buffer_inspect (ring_buffer *ring)
{
printf("size %5d head %5d tail %5d\n", ring->size, ring->head, ring->tail);
}
static inline void
ring_buffer_init (ring_buffer *ring)
{
ring->head = 0;
ring->tail = 0;
ring->size = 0;
}
static inline int
ring_buffer_filled_p (ring_buffer *ring)
{
assert(BUFSIZE - (long)ring->size >= 0);
return (BUFSIZE == ring->size);
}
static inline int
ring_buffer_empty_p (ring_buffer *ring)
{
return 0 == ring->size;
}
static ssize_t
ring_buffer_pull (ring_buffer *ring, int fd)
{
// DO NOT CALL WHEN FILLED
assert(!ring_buffer_filled_p(ring));
struct iovec iov[2];
int iovcnt = 1;
// Very tough logic. Can you follow? Barely can I.
iov[0].iov_base = ring->buf + ring->tail;
if (ring->tail < ring->head) {
iov[0].iov_len = ring->head - ring->tail;
} else {
iov[0].iov_len = BUFSIZE - ring->tail;
if (ring->head != 0) {
iovcnt = 2;
iov[1].iov_base = ring->buf;
iov[1].iov_len = ring->head;
}
}
int r = readv(fd, iov, iovcnt);
if (r > 0) {
ring->size += r;
ring->tail = (ring->tail + r) % BUFSIZE;
}
assert(ring->size <= BUFSIZE);
return r;
}
static ssize_t
ring_buffer_push (ring_buffer *ring, int fd)
{
// DO NOT CALL WHEN EMPTY
assert(!ring_buffer_empty_p(ring));
struct iovec iov[2];
int iovcnt = 1;
iov[0].iov_base = ring->buf + ring->head;
if (ring->head < ring->tail) {
iov[0].iov_len = ring->tail - ring->head;
} else {
iov[0].iov_len = BUFSIZE - ring->head;
if (ring->tail != 0) {
iovcnt = 2;
iov[1].iov_base = ring->buf;
iov[1].iov_len = ring->tail;
}
}
int r = writev(fd, iov, iovcnt);
if (r > 0) {
ring->size -= r;
ring->head = (ring->head + r) % BUFSIZE;
}
assert(0 <= (long)ring->size);
return r;
}
/* PULL PUMP
*
* This is used to read data from a blocking file descriptor and pump it into
* a non-blocking pipe (or other non-blocking fd). The algorithm is this:
*
* while (true) {
* read(STDIN_FILENO) // blocking
*
* while (!ring.empty) {
* write(pipe) // non-blocking
* select(pipe, writable)
* }
* }
*
*/
static void
pull_pump (int pullfd, int pushfd)
{
int r;
ring_buffer ring;
fd_set writefds, exceptfds;
FD_ZERO(&exceptfds);
FD_ZERO(&writefds);
FD_SET(pushfd, &exceptfds);
FD_SET(pushfd, &writefds);
ring_buffer_init(&ring);
while (pullfd >= 0) {
/* Blocking read from STDIN_FILENO */
r = ring_buffer_pull(&ring, pullfd);
if (r == 0) {
/* eof */
close(pullfd);
pullfd = -1;
} else if (r < 0 && errno != EINTR && errno != EAGAIN) {
/* error */
perror("pull_pump read()");
close(pullfd);
pullfd = -1;
}
/* Push all of the data in the ring buffer out. */
while (!ring_buffer_empty_p(&ring)) {
/* non-blocking write() to the pipe */
r = ring_buffer_push(&ring, pushfd);
if (r < 0 && errno != EAGAIN && errno != EINTR) {
if (errno == EPIPE) {
/* This happens if someone closes the other end of the pipe. This
* is a normal forced close of STDIN. Hopefully there wasn't data
* in the ring buffer. Just close both ends and exit.
*/
close(pushfd);
close(pullfd);
pushfd = pullfd = -1;
} else {
perror("pull_pump write()");
close(pushfd);
close(pullfd);
}
return;
}
/* Select for writablity on the pipe end.
* Very rarely will this stick.
*/
r = select(pushfd+1, NULL, &writefds, &exceptfds, NULL);
if (r < 0 || FD_ISSET(pushfd, &exceptfds)) {
close(pushfd);
close(pullfd);
pushfd = pullfd = -1;
return;
}
}
}
assert(pullfd < 0);
assert(ring_buffer_empty_p(&ring));
close(pushfd);
}
/* PUSH PUMP
*
* This is used to push data out to a blocking file descriptor. It pulls
* data from a non-blocking pipe (pullfd) and pushes to STDOUT_FILENO
* (pushfd).
* When the pipe is closed, then the rest of the data is pushed out and then
* STDOUT_FILENO is closed.
*
* The algorithm looks roughly like this:
*
* while (true) {
* r = read(pipe) // nonblocking
*
* while (!ring.empty) {
* write(STDOUT_FILENO) // blocking
* }
*
* select(pipe, readable);
* }
*/
static void
push_pump (int pullfd, int pushfd)
{
int r;
ring_buffer ring;
fd_set readfds, exceptfds;
FD_ZERO(&exceptfds);
FD_ZERO(&readfds);
FD_SET(pullfd, &exceptfds);
FD_SET(pullfd, &readfds);
ring_buffer_init(&ring);
/* The pipe is open or there is data left to be pushed out
* NOTE: if pushfd (STDOUT_FILENO) ever errors out, then we just exit the
* loop.
*/
while (pullfd >= 0 || !ring_buffer_empty_p(&ring)) {
/* Pull from the non-blocking pipe */
r = ring_buffer_pull(&ring, pullfd);
if (r == 0) {
/* eof */
close(pullfd);
pullfd = -1;
} else if (r < 0 && errno != EINTR && errno != EAGAIN) {
perror("push_pump read()");
close(pullfd);
pullfd = -1;
return;
}
/* Push everything out to STDOUT */
while (!ring_buffer_empty_p(&ring)) {
/* Blocking write() to pushfd (STDOUT_FILENO) */
r = ring_buffer_push(&ring, pushfd);
/* If there was a problem, just exit the entire function */
if (r < 0 && errno != EINTR) {
close(pushfd);
close(pullfd);
pushfd = pullfd = -1;
return;
}
}
if (pullfd >= 0) {
/* select for readability on the pullfd */
r = select(pullfd+1, &readfds, NULL, &exceptfds, NULL);
if (r < 0 || FD_ISSET(pullfd, &exceptfds)) {
close(pushfd);
close(pullfd);
pushfd = pullfd = -1;
return;
}
}
}
/* If we got here then we got eof on pullfd and pushed all the data out.
* so now just close pushfd */
assert(pullfd < 0);
assert(ring_buffer_empty_p(&ring));
close(pushfd);
}
static inline int
set_nonblock (int fd)
{
int flags = fcntl(fd, F_GETFL, 0);
if (flags == -1) return -1;
int r = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
if (r == -1) return -1;
return 0;
}
struct coupling {
int is_pull;
int pullfd;
int pushfd;
int exposedfd;
pthread_t tid;
};
static void *
pump_thread (void *data)
{
struct coupling *c = (struct coupling*)data;
if (c->is_pull) {
pull_pump(c->pullfd, c->pushfd);
} else {
push_pump(c->pullfd, c->pushfd);
}
return NULL;
}
static struct coupling*
create_coupling (int fd, int is_pull)
{
int pipefd[2];
struct coupling *c = malloc(sizeof(struct coupling));
if (!c) return NULL;
int r = pipe(pipefd);
if (r < 0) return NULL;
r = set_nonblock(pipefd[0]);
if (r < 0) return NULL;
assert(pipefd[0] >= 0);
r = set_nonblock(pipefd[1]);
if (r < 0) return NULL;
assert(pipefd[1] >= 0);
if (is_pull) {
c->is_pull = 1;
c->pullfd = fd;
c->pushfd = pipefd[1];
c->exposedfd = pipefd[0];
} else {
c->is_pull = 0;
c->pushfd = fd;
c->pullfd = pipefd[0];
c->exposedfd = pipefd[1];
}
r = pthread_create(&c->tid, NULL, pump_thread, c);
if (r < 0) return NULL;
return c;
}
struct coupling*
coupling_new_pull (int fd)
{
return create_coupling(fd, 1);
}
struct coupling*
coupling_new_push (int fd)
{
return create_coupling(fd, 0);
}
int
coupling_nonblocking_fd (struct coupling *c)
{
return c->exposedfd;
}
void
coupling_join (struct coupling *c)
{
int r = pthread_join(c->tid, NULL);
assert(r == 0);
}
void
coupling_destroy (struct coupling *c)
{
close(c->is_pull ? c->pushfd : c->pullfd);
free(c);
}

View File

@@ -1,42 +0,0 @@
/* Copyright (c) 2009 Ryan Dahl (ry@tinyclouds.org)
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef coupling_h
#define coupling_h
#ifdef __cplusplus
extern "C" {
#endif
struct coupling;
struct coupling* coupling_new_pull (int fd);
struct coupling* coupling_new_push (int fd);
int coupling_nonblocking_fd (struct coupling*);
void coupling_join (struct coupling*);
void coupling_destroy (struct coupling*);
#ifdef __cplusplus
}
#endif
#endif

73
deps/coupling/test.c vendored
View File

@@ -1,73 +0,0 @@
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/select.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include "coupling.h"
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define CHUNKSIZE 44231
int
main (int argc, char *argv[])
{
struct coupling *c = coupling_new_push(STDERR_FILENO);
int stderr_fd = coupling_nonblocking_fd(c);
int size;
if (argc == 2) {
size = atoi(argv[1]);
printf("size = %d\n", size);
} else {
printf("usage: ./test 123 2> stderr; wc -c stderr\n");
exit(1);
}
char *msg = malloc(CHUNKSIZE);
int i, r;
for (i = 0; i < CHUNKSIZE; i++) {
msg[i] = 'A' + i % 26;
}
int written = 0;
fd_set writefds, exceptfds;
FD_ZERO(&exceptfds);
FD_SET(stderr_fd, &exceptfds);
FD_ZERO(&writefds);
FD_SET(stderr_fd, &writefds);
while (written < size) {
r = select(stderr_fd+1, NULL, &writefds, &exceptfds, NULL);
if (r < 0) {
printf("test.c select(): %s\n", strerror(errno));
exit(1);
}
if (FD_ISSET(stderr_fd, &exceptfds)) {
printf("exception on stderr fd\n");
exit(1);
}
if (FD_ISSET(stderr_fd, &writefds)) {
r = write(stderr_fd, msg, MIN(size - written, CHUNKSIZE));
if (r < 0 && errno != EAGAIN) {
printf("test.c write(): %s\n", strerror(errno));
exit(1);
} else {
written += r;
printf("%d\n", written);
}
}
}
close(stderr_fd);
coupling_join(c);
coupling_destroy(c);
return 0;
}

75
deps/evcom/Makefile vendored
View File

@@ -1,75 +0,0 @@
# Define EVDIR=/foo/bar if your libev header and library files are in
# /foo/bar/include and /foo/bar/lib directories.
EVDIR=$(HOME)/local/libev
# Define GNUTLSDIR=/foo/bar if your gnutls header and library files are in
# /foo/bar/include and /foo/bar/lib directories.
#
# Comment out the following line to disable TLS
GNUTLSDIR=/usr
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -I. -Wall -Werror -Wextra #-DNDEBUG=1
LDFLAGS =
CC = gcc
AR = ar
RANLIB = ranlib
ifdef EVDIR
CFLAGS += -I$(EVDIR)/include
LDFLAGS += -L$(EVDIR)/lib
endif
LDFLAGS += -lev
ifdef GNUTLSDIR
CFLAGS += -I$(GNUTLSDIR)/include -DEVCOM_HAVE_GNUTLS=1
LDFLAGS += -L$(GNUTLSDIR)/lib
LDFLAGS += -lgnutls
endif
DEP = evcom.h
SRC = evcom.c
OBJ = ${SRC:.c=.o}
NAME=libevcom
OUTPUT_A=$(NAME).a
all: $(OUTPUT_A) test/test test/echo
$(OUTPUT_A): $(OBJ)
$(AR) cru $(OUTPUT_A) $(OBJ)
$(RANLIB) $(OUTPUT_A)
.c.o:
$(CC) -c ${CFLAGS} $<
${OBJ}: ${DEP}
FAIL=ruby -e 'puts "\033[1;31m FAIL\033[m"'
PASS=ruby -e 'puts "\033[1;32m PASS\033[m"'
test: test/test test/echo test/timeout.rb
@echo test.c
@test/test > /dev/null && $(PASS) || $(FAIL)
@echo timeout.rb
@test/timeout.rb
test/test: test/test.c $(OUTPUT_A)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ test/test.c $(OUTPUT_A)
test/echo: test/echo.c $(OUTPUT_A)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ test/echo.c $(OUTPUT_A)
send_states.png: send_states.dot
dot -Tpng -o send_states.png send_states.dot
recv_states.png: recv_states.dot
dot -Tpng -o recv_states.png recv_states.dot
clean:
rm -rf test/test test/echo
rm -f $(OUTPUT_A) *.o
.PHONY: all clean test

1582
deps/evcom/evcom.c vendored

File diff suppressed because it is too large Load Diff

260
deps/evcom/evcom.h vendored
View File

@@ -1,260 +0,0 @@
/* Copyright (c) 2008,2009 Ryan Dahl
*
* evcom_queue comes from Nginx, ngx_queue.h
* Copyright (C) 2002-2009 Igor Sysoev
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <netdb.h>
#include <ev.h>
#include <stddef.h> /* offsetof() */
#ifndef evcom_h
#define evcom_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef EVCOM_HAVE_GNUTLS
# define EVCOM_HAVE_GNUTLS 0
#endif
#if EVCOM_HAVE_GNUTLS
# include <gnutls/gnutls.h>
#endif
/* The maximum evcom_stream will try to read in one callback */
#ifndef EVCOM_CHUNKSIZE
# define EVCOM_CHUNKSIZE (8*1024)
#endif
/* flags for stream and server */
#define EVCOM_ATTACHED 0x0001
#define EVCOM_LISTENING 0x0002
#define EVCOM_CONNECTED 0x0004
#define EVCOM_SECURE 0x0008
#define EVCOM_DUPLEX 0x0010
#define EVCOM_GOT_CLOSE 0x0020
#define EVCOM_PAUSED 0x0040
#define EVCOM_READABLE 0x0080
#define EVCOM_WRITABLE 0x0100
#define EVCOM_TOO_MANY_CONN 0x0200
enum evcom_stream_state { EVCOM_INITIALIZED
, EVCOM_CONNECTING
, EVCOM_CONNECTED_RW /* read write */
, EVCOM_CONNECTED_RO /* read only */
, EVCOM_CONNECTED_WO /* write only */
, EVCOM_CLOSING
, EVCOM_CLOSED
};
typedef struct evcom_queue {
struct evcom_queue *prev;
struct evcom_queue *next;
} evcom_queue;
typedef struct evcom_buf {
/* public */
char *base;
size_t len;
void (*release) (struct evcom_buf *); /* called when oi is done with the object */
void *data;
/* private */
size_t written;
evcom_queue queue;
} evcom_buf;
#if EV_MULTIPLICITY
# define EVCOM_LOOP struct ev_loop *loop;
#else
# define EVCOM_LOOP
#endif
#define EVCOM_DESCRIPTOR(type) \
/* private */ unsigned int flags; \
/* private */ int (*action) (struct evcom_descriptor*); \
/* read-only */ int errorno; \
/* read-only */ int fd; \
/* read-only */ EVCOM_LOOP \
/* public */ void *data; \
/* public */ void (*on_close) (struct type*);
/* abstract base class */
typedef struct evcom_descriptor {
EVCOM_DESCRIPTOR(evcom_descriptor)
} evcom_descriptor;
typedef struct evcom_reader {
EVCOM_DESCRIPTOR(evcom_reader)
ev_io read_watcher; /* private */
void (*on_read) (struct evcom_reader*, const void* buf, size_t len); /* public */
} evcom_reader;
typedef struct evcom_writer {
EVCOM_DESCRIPTOR(evcom_writer)
ev_io write_watcher; /* private */
evcom_queue out; /* private */
} evcom_writer;
typedef struct evcom_stream {
/* PRIVATE */
EVCOM_LOOP
int errorno;
unsigned int flags;
evcom_queue out;
ev_io read_watcher;
ev_io write_watcher;
int (*send_action) (struct evcom_stream*);
int (*recv_action) (struct evcom_stream*);
ev_timer timeout_watcher;
#if EVCOM_HAVE_GNUTLS
gnutls_session_t session;
#endif
/* READ-ONLY */
int recvfd;
int sendfd;
struct evcom_server *server;
#if EVCOM_HAVE_GNUTLS
int gnutls_errorno;
#endif
/* PUBLIC */
void (*on_connect) (struct evcom_stream *);
void (*on_timeout) (struct evcom_stream *);
void (*on_read) (struct evcom_stream *, const void* buf, size_t len);
void (*on_drain) (struct evcom_stream *);
void (*on_close) (struct evcom_stream *);
void *data;
} evcom_stream;
typedef struct evcom_server {
EVCOM_DESCRIPTOR(evcom_server)
/* PRIVATE */
ev_io watcher;
/* PUBLIC */
struct evcom_stream*
(*on_connection)(struct evcom_server *, struct sockaddr *remote_addr);
} evcom_server;
/* Highly recommended to ignore SIGPIPE! */
void evcom_ignore_sigpipe (void);
void evcom_reader_init (evcom_reader*);
void evcom_reader_set (evcom_reader*, int fd);
void evcom_reader_attach (EV_P_ evcom_reader*);
void evcom_reader_detach (evcom_reader*);
void evcom_reader_close (evcom_reader*);
void evcom_writer_init (evcom_writer*);
void evcom_writer_set (evcom_writer*, int fd);
void evcom_writer_attach (EV_P_ evcom_writer*);
void evcom_writer_detach (evcom_writer*);
void evcom_writer_write (evcom_writer*, const char *str, size_t len);
void evcom_writer_close (evcom_writer*);
void evcom_server_init (evcom_server *);
int evcom_server_listen (evcom_server *, struct sockaddr *address, int backlog);
void evcom_server_attach (EV_P_ evcom_server *);
void evcom_server_detach (evcom_server *);
void evcom_server_close (evcom_server *);
void evcom_stream_init (evcom_stream *);
int evcom_stream_pair (evcom_stream *a, evcom_stream *b);
int evcom_stream_connect (evcom_stream *, struct sockaddr *address);
void evcom_stream_assign_fds (evcom_stream *, int recvfd, int sendfd);
void evcom_stream_attach (EV_P_ evcom_stream *);
void evcom_stream_detach (evcom_stream *);
void evcom_stream_read_resume (evcom_stream *);
void evcom_stream_read_pause (evcom_stream *);
void evcom_stream_reset_timeout (evcom_stream *, float timeout);
void evcom_stream_set_no_delay (evcom_stream *, int no_delay);
void evcom_stream_write (evcom_stream *, const char *str, size_t len);
/* Once the write buffer is drained, evcom_stream_close will shutdown the
* writing end of the stream and will close the read end once the server
* replies with an EOF.
*/
void evcom_stream_close (evcom_stream *);
/* Will not wait for the write queue to complete. Closes both directions */
void evcom_stream_force_close (evcom_stream *);
#if EVCOM_HAVE_GNUTLS
/* Tells the stream to use transport layer security (SSL). evcom_stream does
* not want to make any decisions about security requirements, so the
* majoirty of GnuTLS configuration is left to the user. Only the transport
* layer of GnuTLS is controlled by evcom_stream. That is, do not use
* gnutls_transport_* functions. Do use the rest of GnuTLS's API.
*/
void evcom_stream_set_secure_session (evcom_stream *, gnutls_session_t);
#endif
enum evcom_stream_state evcom_stream_state (evcom_stream *stream);
evcom_buf* evcom_buf_new (const char* base, size_t len);
evcom_buf* evcom_buf_new2 (size_t len);
EV_INLINE void
evcom_queue_init (evcom_queue *q)
{
q->prev = q;
q->next = q;
}
EV_INLINE void
evcom_queue_insert_head (evcom_queue *h, evcom_queue *x)
{
(x)->next = (h)->next;
(x)->next->prev = x;
(x)->prev = h;
(h)->next = x;
}
EV_INLINE void
evcom_queue_remove (evcom_queue *x)
{
(x)->next->prev = (x)->prev;
(x)->prev->next = (x)->next;
#ifndef NDEBUG
(x)->prev = NULL;
(x)->next = NULL;
#endif
}
#define evcom_queue_empty(h) (h == (h)->prev)
#define evcom_queue_head(h) (h)->next
#define evcom_queue_last(h) (h)->prev
#define evcom_queue_data(q, type, link) \
(type *) ((unsigned char *) q - offsetof(type, link))
#ifdef __cplusplus
}
#endif
#endif /* evcom_h */

View File

@@ -1,37 +0,0 @@
strict digraph recv_states {
start [peripheries=2];
end [peripheries=2];
handshake;
recv_data;
wait_for_resume;
wait_for_close;
close_one;
close_both;
node [label="", shape="box", height=0.1, width=0.1];
close;
start -> handshake [label="tls"];
start -> recv_data;
handshake -> close [label="error"];
handshake -> recv_data;
recv_data -> handshake [label="rehandshake"];
recv_data -> wait_for_resume [label="pause"];
recv_data -> wait_for_close [label="eof"];
recv_data -> close [label="error"];
wait_for_resume -> recv_data;
wait_for_close -> close;
close -> close_one [label="duplex"];
close -> close_both;
close_one -> end;
close_both -> end;
}

View File

@@ -1,65 +0,0 @@
strict digraph send_states {
start [peripheries=2];
end [peripheries=2];
connection_established;
handshake;
send_data;
shutdown;
gnutls_bye;
close_one;
close_both;
wait_for_connect;
wait_for_buf;
wait_for_eof;
node [label="", shape="box", height=0.1, width=0.1];
close;
drain;
hangup;
hangup_unsecure;
start -> wait_for_connect [label="duplex"];
start -> connection_established;
wait_for_connect -> connection_established;
wait_for_connect -> close [label="error"];
connection_established -> handshake [label="tls"];
connection_established -> send_data;
handshake -> close [label="error"];
handshake -> send_data;
send_data -> close [label="error"];
send_data -> drain [label="drain"];
drain -> wait_for_buf;
drain -> hangup [label="got_close"];
wait_for_buf -> send_data;
wait_for_buf -> drain [label="empty_buf"];
hangup -> gnutls_bye [label="tls"];
hangup -> hangup_unsecure;
gnutls_bye -> wait_for_eof;
gnutls_bye -> close [label="error"];
hangup_unsecure -> shutdown [label="duplex"];
hangup_unsecure -> close_one;
shutdown -> wait_for_eof;
shutdown -> close [label="error"];
wait_for_eof -> close_one;
close_one -> wait_for_eof [label="readable"];
close -> close_both;
close -> close_one [label="duplex"];
close_both -> end;
close_one -> end;
}

100
deps/evcom/test/echo.c vendored
View File

@@ -1,100 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <ev.h>
#include <evcom.h>
#if EVCOM_HAVE_GNUTLS
# include <gnutls/gnutls.h>
#endif
#define HOST "127.0.0.1"
#define SOCKFILE "/tmp/oi.sock"
#define PORT 5000
static int nconnections;
static void
on_peer_close (evcom_stream *stream)
{
assert(stream->errorno == 0);
//printf("server connection closed\n");
free(stream);
}
static void
on_peer_timeout (evcom_stream *stream)
{
assert(stream);
fprintf(stderr, "peer connection timeout\n");
assert(0);
}
// timeout must match the timeout in timeout.rb
#define TIMEOUT 5.0
static void
on_peer_read (evcom_stream *stream, const void *base, size_t len)
{
if(len == 0) return;
evcom_stream_write(stream, base, len);
}
static evcom_stream*
on_server_connection (evcom_server *server, struct sockaddr *addr)
{
assert(server);
assert(addr);
evcom_stream *stream = malloc(sizeof(evcom_stream));
evcom_stream_init(stream);
stream->on_read = on_peer_read;
stream->on_close = on_peer_close;
stream->on_timeout = on_peer_timeout;
evcom_stream_reset_timeout(stream, TIMEOUT);
nconnections++;
//printf("on server connection\n");
return stream;
}
int
main (void)
{
int r;
evcom_server server;
//printf("sizeof(evcom_server): %d\n", sizeof(evcom_server));
//printf("sizeof(evcom_stream): %d\n", sizeof(evcom_stream));
evcom_server_init(&server);
server.on_connection = on_server_connection;
struct sockaddr_in address;
memset(&address, 0, sizeof(struct sockaddr_in));
address.sin_family = AF_INET;
address.sin_port = htons(PORT);
address.sin_addr.s_addr = INADDR_ANY;
r = evcom_server_listen(&server, (struct sockaddr*)&address, 10);
assert(r == 0);
evcom_server_attach(EV_DEFAULT_ &server);
ev_loop(EV_DEFAULT_ 0);
return 0;
}

892
deps/evcom/test/test.c vendored
View File

@@ -1,892 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <ev.h>
#include <evcom.h>
#if EVCOM_HAVE_GNUTLS
# include <gnutls/gnutls.h>
#endif
#undef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#undef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MARK_PROGRESS(c,cur,max) \
if (cur % (MAX(max,50)/50) == 0) write(STDERR_FILENO, c, 1)
#define SOCKFILE "/tmp/oi.sock"
#define PORT 5000
static evcom_server server;
static int nconnections;
static int use_tls;
static int got_server_close;
static void
common_on_server_close (evcom_server *s)
{
printf("server on_close\n");
assert(s == &server);
assert(s->errorno == 0);
got_server_close = 1;
evcom_server_detach(s);
}
static void
common_on_peer_close (evcom_stream *stream)
{
assert(EVCOM_CLOSED == evcom_stream_state(stream));
assert(stream->errorno == 0);
printf("server connection closed\n");
#if EVCOM_HAVE_GNUTLS
assert(stream->gnutls_errorno == 0);
if (use_tls) gnutls_deinit(stream->session);
#endif
evcom_stream_detach(stream);
free(stream);
}
static void
common_on_client_timeout (evcom_stream *stream)
{
assert(stream);
printf("client connection timeout\n");
}
static void
common_on_peer_timeout (evcom_stream *stream)
{
assert(stream);
fprintf(stderr, "peer connection timeout\n");
assert(0);
}
#if EVCOM_HAVE_GNUTLS
#define DH_BITS 768
static gnutls_anon_server_credentials_t server_credentials;
const int kx_prio[] = { GNUTLS_KX_ANON_DH, 0 };
static gnutls_dh_params_t dh_params;
void anon_tls_server (evcom_stream *stream)
{
gnutls_session_t session;
stream->data = session;
int r = gnutls_init(&session, GNUTLS_SERVER);
assert(r == 0);
gnutls_set_default_priority(session);
gnutls_kx_set_priority (session, kx_prio);
gnutls_credentials_set(session, GNUTLS_CRD_ANON, server_credentials);
gnutls_dh_set_prime_bits(session, DH_BITS);
evcom_stream_set_secure_session(stream, session);
}
void anon_tls_client (evcom_stream *stream)
{
gnutls_session_t client_session;
gnutls_anon_client_credentials_t client_credentials;
gnutls_anon_allocate_client_credentials (&client_credentials);
gnutls_init(&client_session, GNUTLS_CLIENT);
gnutls_set_default_priority(client_session);
gnutls_kx_set_priority(client_session, kx_prio);
/* Need to enable anonymous KX specifically. */
gnutls_credentials_set(client_session, GNUTLS_CRD_ANON, client_credentials);
evcom_stream_set_secure_session(stream, client_session);
assert(stream->flags & EVCOM_SECURE);
}
#endif // EVCOM_HAVE_GNUTLS
#define PING "PING"
#define PONG "PONG"
#define EXCHANGES 500
#define PINGPONG_TIMEOUT 5.0
static int successful_ping_count;
static void
pingpong_on_peer_read (evcom_stream *stream, const void *base, size_t len)
{
if (len == 0) {
evcom_stream_close(stream);
return;
}
char buf[2000];
strncpy(buf, base, len);
buf[len] = 0;
printf("server got message: %s\n", buf);
evcom_stream_write(stream, PONG, sizeof PONG);
}
static void
pingpong_on_client_close (evcom_stream *stream)
{
assert(EVCOM_CLOSED == evcom_stream_state(stream));
assert(stream);
printf("client connection closed\n");
evcom_server_close(&server);
evcom_stream_detach(stream);
}
static evcom_stream*
pingpong_on_server_connection (evcom_server *_server, struct sockaddr *addr)
{
assert(_server == &server);
assert(addr);
evcom_stream *stream = malloc(sizeof(evcom_stream));
evcom_stream_init(stream);
stream->on_read = pingpong_on_peer_read;
stream->on_close = common_on_peer_close;
stream->on_timeout = common_on_peer_timeout;
evcom_stream_reset_timeout(stream, PINGPONG_TIMEOUT);
assert(EVCOM_INITIALIZED == evcom_stream_state(stream));
nconnections++;
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_server(stream);
#endif
printf("on server connection\n");
return stream;
}
static void
pingpong_on_client_connect (evcom_stream *stream)
{
printf("client connected. sending ping\n");
evcom_stream_write(stream, PING, sizeof PING);
assert(EVCOM_CONNECTED_RW == evcom_stream_state(stream));
}
static void
pingpong_on_client_read (evcom_stream *stream, const void *base, size_t len)
{
if(len == 0) {
evcom_stream_close(stream);
return;
}
assert(len = strlen(PONG));
char buf[len+1];
strncpy(buf, base, len);
buf[len] = 0;
printf("client got message: %s\n", buf);
assert(strcmp(buf, PONG) == 0);
if (++successful_ping_count > EXCHANGES) {
evcom_stream_close(stream);
return;
}
MARK_PROGRESS(".", successful_ping_count, EXCHANGES);
evcom_stream_write(stream, PING, sizeof PING);
}
int
pingpong (struct sockaddr *address)
{
int r;
evcom_stream client;
successful_ping_count = 0;
nconnections = 0;
got_server_close = 0;
evcom_server_init(&server);
server.on_connection = pingpong_on_server_connection;
server.on_close = common_on_server_close;
r = evcom_server_listen(&server, address, 10);
assert(r == 0);
evcom_server_attach(EV_DEFAULT_ &server);
evcom_stream_init(&client);
client.on_read = pingpong_on_client_read;
client.on_connect = pingpong_on_client_connect;
client.on_close = pingpong_on_client_close;
client.on_timeout = common_on_client_timeout;
evcom_stream_reset_timeout(&client, PINGPONG_TIMEOUT);
assert(EVCOM_INITIALIZED == evcom_stream_state(&client));
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_client(&client);
#endif
r = evcom_stream_connect(&client, address);
assert(r == 0 && "problem connecting");
evcom_stream_attach(EV_DEFAULT_ &client);
ev_loop(EV_DEFAULT_ 0);
printf("successful_ping_count = %d\n", successful_ping_count);
assert(successful_ping_count == EXCHANGES + 1);
assert(nconnections == 1);
assert(got_server_close);
return 0;
}
#define NCONN 50
#define CONNINT_TIMEOUT 10.0
static void
send_bye_and_close(evcom_stream *stream, const void *base, size_t len)
{
assert(base);
assert(len == 0);
evcom_stream_write(stream, "BYE", 3);
printf("server wrote bye\n");
evcom_stream_close(stream);
}
static evcom_stream*
connint_on_connection(evcom_server *_server, struct sockaddr *addr)
{
assert(_server == &server);
assert(addr);
evcom_stream *stream = malloc(sizeof(evcom_stream));
evcom_stream_init(stream);
stream->on_read = send_bye_and_close;
stream->on_close = common_on_peer_close;
stream->on_timeout = common_on_peer_timeout;
evcom_stream_reset_timeout(stream, CONNINT_TIMEOUT);
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_server(stream);
#endif
printf("on server connection\n");
return stream;
}
static void
connint_on_client_connect (evcom_stream *stream)
{
printf("on client connection\n");
evcom_stream_close(stream);
}
static void
connint_on_client_close (evcom_stream *stream)
{
evcom_stream_close(stream); // already closed, but it shouldn't crash if we try to do it again
printf("client connection closed\n");
MARK_PROGRESS(".", nconnections, NCONN);
if(++nconnections == NCONN) {
evcom_server_close(&server);
printf("closing server\n");
}
evcom_stream_detach(stream);
}
static void
connint_on_client_read (evcom_stream *stream, const void *base, size_t len)
{
if (len == 0) {
evcom_stream_close(stream);
return;
}
char buf[200000];
strncpy(buf, base, len);
buf[len] = 0;
printf("client got message: %s\n", buf);
assert(strcmp(buf, "BYE") == 0);
evcom_stream_close(stream);
}
int
connint (struct sockaddr *address)
{
int r;
nconnections = 0;
got_server_close = 0;
evcom_server_init(&server);
server.on_connection = connint_on_connection;
server.on_close = common_on_server_close;
evcom_server_listen(&server, address, 1000);
evcom_server_attach(EV_DEFAULT_ &server);
evcom_stream clients[NCONN];
int i;
for (i = 0; i < NCONN; i++) {
evcom_stream *client = &clients[i];
evcom_stream_init(client);
client->on_read = connint_on_client_read;
client->on_connect = connint_on_client_connect;
client->on_close = connint_on_client_close;
client->on_timeout = common_on_client_timeout;
evcom_stream_reset_timeout(client, CONNINT_TIMEOUT);
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_client(client);
#endif
r = evcom_stream_connect(client, address);
assert(r == 0 && "problem connecting");
evcom_stream_attach(EV_DEFAULT_ client);
}
ev_loop(EV_DEFAULT_ 0);
assert(nconnections == NCONN);
assert(got_server_close);
return 0;
}
static evcom_reader reader;
static evcom_writer writer;
static int reader_got_close = 0;
static int reader_got_eof = 0;
static int reader_got_hello = 0;
static int reader_cnt = 0;
static int writer_got_close = 0;
#define PIPE_MSG "hello world"
#define PIPE_CNT 5000
static void
reader_read (evcom_reader *r, const void *str, size_t len)
{
assert(r == &reader);
if (len == 0) {
reader_got_eof = 1;
return;
}
assert(len == strlen(PIPE_MSG));
if (strncmp(str, PIPE_MSG, strlen(PIPE_MSG)) == 0) {
reader_got_hello = 1;
}
if (++reader_cnt < PIPE_CNT) {
MARK_PROGRESS(".", reader_cnt, PIPE_CNT);
evcom_writer_write(&writer, PIPE_MSG, strlen(PIPE_MSG));
} else {
evcom_writer_close(&writer);
}
}
static void
reader_close (evcom_reader *r)
{
assert(r == &reader);
reader_got_close = 1;
evcom_reader_detach(r);
}
static void
writer_close (evcom_writer *w)
{
assert(w == &writer);
writer_got_close = 1;
evcom_writer_detach(w);
}
int
pipe_stream (void)
{
reader_cnt = 0;
reader_got_close = 0;
reader_got_hello = 0;
reader_got_eof = 0;
writer_got_close = 0;
int pipefd[2];
int r = pipe(pipefd);
if (r < 0) {
perror("pipe()");
return -1;
}
evcom_reader_init(&reader);
reader.on_read = reader_read;
reader.on_close = reader_close;
evcom_reader_set(&reader, pipefd[0]);
evcom_reader_attach(EV_DEFAULT_ &reader);
evcom_writer_init(&writer);
writer.on_close = writer_close;
evcom_writer_set(&writer, pipefd[1]);
evcom_writer_attach(EV_DEFAULT_ &writer);
evcom_writer_write(&writer, PIPE_MSG, strlen(PIPE_MSG));
ev_loop(EV_DEFAULT_ 0);
assert(reader_got_close);
assert(reader_got_hello);
assert(reader_got_eof);
assert(writer_got_close);
assert(reader_cnt == PIPE_CNT);
return 0;
}
#define PAIR_PINGPONG_TIMEOUT 5000.0
#define PAIR_PINGPONG_EXCHANGES 50
static int a_got_close;
static int a_got_connect;
static int b_got_close;
static int b_got_connect;
static int pair_pingpong_cnt;
static evcom_stream a, b;
void a_connect (evcom_stream *stream)
{
assert(stream == &a);
a_got_connect = 1;
}
void a_close (evcom_stream *stream)
{
evcom_stream_detach(stream);
assert(stream == &a);
a_got_close = 1;
assert(stream->errorno == 0);
#if EVCOM_HAVE_GNUTLS
if (stream->gnutls_errorno) {
fprintf(stderr, "\nGNUTLS ERROR: %s\n", gnutls_strerror(stream->gnutls_errorno));
}
assert(stream->gnutls_errorno == 0);
if (use_tls) gnutls_deinit(stream->session);
#endif
}
void a_read (evcom_stream *stream, const void *buf, size_t len)
{
assert(stream == &a);
if (len == 0) return;
assert(len == strlen(PONG));
assert(strncmp(buf, PONG, strlen(PONG)) == 0);
if (++pair_pingpong_cnt < PAIR_PINGPONG_EXCHANGES) {
evcom_stream_write(&a, PING, strlen(PING));
} else if (pair_pingpong_cnt == PAIR_PINGPONG_EXCHANGES) {
evcom_stream_close(stream);
}
MARK_PROGRESS(".", pair_pingpong_cnt, PAIR_PINGPONG_EXCHANGES);
}
void b_connect (evcom_stream *stream)
{
assert(stream == &b);
b_got_connect = 1;
}
void b_close (evcom_stream *stream)
{
evcom_stream_detach(stream);
assert(stream == &b);
b_got_close = 1;
assert(stream->errorno == 0);
#if EVCOM_HAVE_GNUTLS
if (stream->gnutls_errorno) {
fprintf(stderr, "\nGNUTLS ERROR: %s\n", gnutls_strerror(stream->gnutls_errorno));
}
assert(stream->gnutls_errorno == 0);
if (use_tls) gnutls_deinit(stream->session);
#endif
}
void b_read (evcom_stream *stream, const void *buf, size_t len)
{
assert(stream == &b);
if (len == 0) {
evcom_stream_close(stream);
return;
}
assert(len == strlen(PING));
assert(strncmp(buf, PING, strlen(PING)) == 0);
evcom_stream_write(&b, PONG, strlen(PONG));
}
int
pair_pingpong (int use_pipe)
{
a_got_close = 0;
a_got_connect = 0;
b_got_close = 0;
b_got_connect = 0;
pair_pingpong_cnt = 0;
evcom_stream_init(&a);
a.on_close = a_close;
a.on_connect = a_connect;
a.on_read = a_read;
evcom_stream_reset_timeout(&a, PAIR_PINGPONG_TIMEOUT);
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_client(&a);
#endif
evcom_stream_init(&b);
b.on_close = b_close;
b.on_connect = b_connect;
b.on_read = b_read;
evcom_stream_reset_timeout(&b, PAIR_PINGPONG_TIMEOUT);
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_server(&b);
#endif
if (use_pipe) {
int pipeA[2], pipeB[2];
assert(0 == pipe(pipeA));
assert(0 == pipe(pipeB));
evcom_stream_assign_fds(&a, pipeA[0], pipeB[1]);
evcom_stream_assign_fds(&b, pipeB[0], pipeA[1]);
} else {
int r = evcom_stream_pair(&a, &b);
assert(r == 0);
}
evcom_stream_attach(EV_DEFAULT_ &a);
evcom_stream_attach(EV_DEFAULT_ &b);
evcom_stream_write(&a, PING, strlen(PING));
ev_loop(EV_DEFAULT_ 0);
assert(a_got_close);
assert(a_got_connect);
assert(b_got_close);
assert(b_got_connect);
assert(pair_pingpong_cnt == PAIR_PINGPONG_EXCHANGES);
return 0;
}
static void
free_stream (evcom_stream *stream)
{
assert(stream->errorno == 0);
free(stream);
}
#define ZERO_TIMEOUT 50.0
static size_t zero_to_write = 0;
static size_t zero_written = 0;
static size_t zero_read = 0;
static size_t zero_client_closed = 0;
static void
error_out (evcom_stream *stream)
{
assert(stream);
fprintf(stderr, "peer connection timeout\n");
assert(0);
}
static void
echo (evcom_stream *stream, const void *base, size_t len)
{
if(len == 0) {
fprintf(stderr, "close");
evcom_stream_close(stream);
} else {
evcom_stream_write(stream, base, len);
}
}
static evcom_stream*
make_echo_connection (evcom_server *server, struct sockaddr *addr)
{
assert(server);
assert(addr);
evcom_stream *stream = malloc(sizeof(evcom_stream));
evcom_stream_init(stream);
stream->on_read = echo;
stream->on_close = free_stream;
stream->on_timeout = error_out;
evcom_stream_reset_timeout(stream, ZERO_TIMEOUT);
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_server(stream);
#endif
return stream;
}
static void
zero_start (evcom_stream *stream)
{
evcom_stream_write(stream, "0", 1);
zero_written++;
}
static void
zero_close (evcom_stream *stream)
{
assert(stream);
zero_client_closed = 1;
}
static void
zero_recv (evcom_stream *stream, const void *buf, size_t len)
{
MARK_PROGRESS("-", zero_read, zero_to_write);
zero_read += len;
size_t i;
for (i = 0; i < len; i++) {
assert(((char*)buf)[i] == '0');
}
for (i = 0; i < MIN(zero_to_write - zero_written, 90000); i++) {
evcom_stream_write(stream, "0", 1);
zero_written++;
MARK_PROGRESS(".", zero_written, zero_to_write);
if (zero_written == zero_to_write) {
fprintf(stderr, "CLOSE");
evcom_stream_close(stream);
}
}
if (len == 0) {
fprintf(stderr, "finish");
evcom_server_close(&server);
}
}
int
zero_stream (struct sockaddr *address, size_t to_write)
{
int r;
assert(to_write >= 1024); // should be kind of big at least.
zero_to_write = to_write;
got_server_close = 0;
zero_written = 0;
zero_read = 0;
zero_client_closed = 0;
evcom_server_init(&server);
server.on_connection = make_echo_connection;
server.on_close = common_on_server_close;
evcom_server_listen(&server, address, 1000);
evcom_server_attach(EV_DEFAULT_ &server);
evcom_stream client;
evcom_stream_init(&client);
client.on_read = zero_recv;
client.on_connect = zero_start;
client.on_close = zero_close;
client.on_timeout = error_out;
evcom_stream_reset_timeout(&client, ZERO_TIMEOUT);
#if EVCOM_HAVE_GNUTLS
if (use_tls) anon_tls_client(&client);
#endif
r = evcom_stream_connect(&client, address);
assert(r == 0 && "problem connecting");
evcom_stream_attach(EV_DEFAULT_ &client);
ev_loop(EV_DEFAULT_ 0);
assert(got_server_close);
assert(zero_written == zero_to_write);
assert(zero_read == zero_to_write);
assert(zero_client_closed) ;
return 0;
}
struct sockaddr *
create_unix_address (void)
{
struct stat tstat;
if (lstat(SOCKFILE, &tstat) == 0) {
assert(S_ISSOCK(tstat.st_mode));
unlink(SOCKFILE);
}
struct sockaddr_un *address = calloc(1, sizeof(struct sockaddr_un));
address->sun_family = AF_UNIX;
strcpy(address->sun_path, SOCKFILE);
return (struct sockaddr*)address;
}
void
free_unix_address (struct sockaddr *address)
{
struct stat tstat;
if (lstat(SOCKFILE, &tstat) == 0) {
assert(S_ISSOCK(tstat.st_mode));
unlink(SOCKFILE);
}
free(address);
}
int
main (void)
{
fprintf(stderr, "sizeof(evcom_server): %d\n", (int)sizeof(evcom_server));
fprintf(stderr, "sizeof(evcom_stream): %d\n", (int)sizeof(evcom_stream));
fprintf(stderr, "sizeof(evcom_reader): %d\n", (int)sizeof(evcom_reader));
fprintf(stderr, "sizeof(evcom_writer): %d\n", (int)sizeof(evcom_writer));
evcom_ignore_sigpipe();
#if EVCOM_HAVE_GNUTLS
gnutls_global_init();
gnutls_dh_params_init (&dh_params);
fsync((int)stderr);
gnutls_dh_params_generate2 (dh_params, DH_BITS);
gnutls_anon_allocate_server_credentials (&server_credentials);
gnutls_anon_set_server_dh_params (server_credentials, dh_params);
#endif
struct sockaddr_in tcp_address;
memset(&tcp_address, 0, sizeof(struct sockaddr_in));
tcp_address.sin_family = AF_INET;
tcp_address.sin_port = htons(PORT);
tcp_address.sin_addr.s_addr = INADDR_ANY;
use_tls = 0;
fprintf(stderr, "pair_pingpong use_pipe=1: ");
assert(pair_pingpong(1) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "pair_pingpong use_pipe=0: ");
assert(pair_pingpong(0) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "zero_stream tcp: ");
assert(zero_stream((struct sockaddr*)&tcp_address, 5*1024*1024) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "pipe_stream: ");
assert(pipe_stream() == 0);
fprintf(stderr, "\n");
fprintf(stderr, "pingpong tcp: ");
assert(pingpong((struct sockaddr*)&tcp_address) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "connint tcp: ");
assert(connint((struct sockaddr*)&tcp_address) == 0);
fprintf(stderr, "\n");
#if EVCOM_HAVE_GNUTLS
use_tls = 1;
fprintf(stderr, "zero_stream ssl: ");
assert(zero_stream((struct sockaddr*)&tcp_address, 50*1024) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "pair_pingpong ssl use_pipe=1: ");
assert(pair_pingpong(1) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "pair_pingpong ssl use_pipe=0: ");
assert(pair_pingpong(0) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "pingpong ssl: ");
assert(pingpong((struct sockaddr*)&tcp_address) == 0);
fprintf(stderr, "\n");
fprintf(stderr, "connint ssl: ");
assert(connint((struct sockaddr*)&tcp_address) == 0);
fprintf(stderr, "\n");
#endif
struct sockaddr *unix_address;
use_tls = 0;
fprintf(stderr, "pingpong unix: ");
unix_address = create_unix_address();
assert(pingpong(unix_address) == 0);
free_unix_address(unix_address);
fprintf(stderr, "\n");
fprintf(stderr, "connint unix: ");
unix_address = create_unix_address();
assert(connint(unix_address) == 0);
free_unix_address(unix_address);
fprintf(stderr, "\n");
#if EVCOM_HAVE_GNUTLS
use_tls = 1;
fprintf(stderr, "pingpong unix ssl: ");
unix_address = create_unix_address();
assert(pingpong(unix_address) == 0);
free_unix_address(unix_address);
fprintf(stderr, "\n");
fprintf(stderr, "connint unix ssl: ");
unix_address = create_unix_address();
assert(connint(unix_address) == 0);
free_unix_address(unix_address);
fprintf(stderr, "\n");
#endif
return 0;
}

View File

@@ -1,98 +0,0 @@
#!/usr/bin/env ruby
require 'socket'
def test(description)
pid = fork do
exec(File.dirname(__FILE__) + "/echo")
end
puts "#{description}: "
begin
sleep 0.5 # give time for the server to start
yield(pid)
rescue
puts "\033[1;31mFAIL\033[m"
raise $!
ensure
`kill -9 #{pid}`
end
puts "\033[1;32mPASS\033[m"
end
test("make sure echo server works") do
socket = TCPSocket.open("localhost", 5000)
w = socket.write("hello");
raise "error" unless w == 5
got = socket.recv(5);
raise "error" unless got == "hello"
socket.close
end
test("doing nothing should not timeout the server") do |pid|
10.times do
print "."
STDOUT.flush
if Process.waitpid(pid, Process::WNOHANG)
raise "server died when it shouldn't have"
end
sleep 1
end
puts ""
end
test("connecting and doing nothing to should timeout in 5 seconds") do |pid|
socket = TCPSocket.open("localhost", 5000)
i = 0
10.times do
print "."
STDOUT.flush
break if Process.waitpid(pid, Process::WNOHANG)
sleep 1
i+=1
end
puts ""
raise "died too soon (after #{i} seconds)" if i < 5
raise "died too late (after #{i} seconds)" if i > 6
end
test("connecting and writing once to should timeout in 5 seconds") do |pid|
socket = TCPSocket.open("localhost", 5000)
w = socket.write("hello");
raise "error" unless w == 5
i = 0
10.times do
print "."
STDOUT.flush
break if Process.waitpid(pid, Process::WNOHANG)
sleep 1
i+=1
end
puts ""
raise "died too soon (after #{i} seconds)" if i < 5
raise "died too late (after #{i} seconds)" if i > 6
end
test("connecting waiting 3, writing once to should timeout in 8 seconds") do |pid|
socket = TCPSocket.open("localhost", 5000)
sleep 3
w = socket.write("hello");
raise "error" unless w == 5
i = 0
10.times do
print "."
STDOUT.flush
break if Process.waitpid(pid, Process::WNOHANG)
sleep 1
i+=1
end
puts ""
raise "died too soon (after #{i} seconds)" if i < 5
raise "died too late (after #{i} seconds)" if i > 6
end

8
deps/http_parser/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
core
tags
*.o
test
test_g
test_fast
*.mk
*.Makefile

4
deps/http_parser/.mailmap vendored Normal file
View File

@@ -0,0 +1,4 @@
# update AUTHORS with:
# git log --all --reverse --format='%aN <%aE>' | perl -ne 'BEGIN{print "# Authors ordered by first contribution.\n"} print unless $h{$_}; $h{$_} = 1' > AUTHORS
Ryan Dahl <ry@tinyclouds.org>
Salman Haq <salman.haq@asti-usa.com>

32
deps/http_parser/AUTHORS vendored Normal file
View File

@@ -0,0 +1,32 @@
# Authors ordered by first contribution.
Ryan Dahl <ry@tinyclouds.org>
Jeremy Hinegardner <jeremy@hinegardner.org>
Sergey Shepelev <temotor@gmail.com>
Joe Damato <ice799@gmail.com>
tomika <tomika_nospam@freemail.hu>
Phoenix Sol <phoenix@burninglabs.com>
Cliff Frey <cliff@meraki.com>
Ewen Cheslack-Postava <ewencp@cs.stanford.edu>
Santiago Gala <sgala@apache.org>
Tim Becker <tim.becker@syngenio.de>
Jeff Terrace <jterrace@gmail.com>
Ben Noordhuis <info@bnoordhuis.nl>
Nathan Rajlich <nathan@tootallnate.net>
Mark Nottingham <mnot@mnot.net>
Aman Gupta <aman@tmm1.net>
Tim Becker <tim.becker@kuriositaet.de>
Sean Cunningham <sean.cunningham@mandiant.com>
Peter Griess <pg@std.in>
Salman Haq <salman.haq@asti-usa.com>
Cliff Frey <clifffrey@gmail.com>
Jon Kolb <jon@b0g.us>
Fouad Mardini <f.mardini@gmail.com>
Paul Querna <pquerna@apache.org>
Felix Geisendörfer <felix@debuggable.com>
koichik <koichik@improvement.jp>
Andre Caron <andre.l.caron@gmail.com>
Ivo Raisr <ivosh@ivosh.net>
James McLaughlin <jamie@lacewing-project.org>
David Gwynne <loki@animata.net>
LE ROUX Thomas <thomas@procheo.fr>
Randy Rizun <rrizun@ortivawireless.com>

4
deps/http_parser/CONTRIBUTIONS vendored Normal file
View File

@@ -0,0 +1,4 @@
Contributors must agree to the Contributor License Agreement before patches
can be accepted.
http://spreadsheets2.google.com/viewform?hl=en&formkey=dDJXOGUwbzlYaWM4cHN1MERwQS1CSnc6MQ

View File

@@ -1,4 +1,8 @@
Copyright 2009,2010 Ryan Dahl <ry@tinyclouds.org>
http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
Igor Sysoev.
Additional changes are licensed under the same terms as NGINX and
copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to

View File

@@ -1,33 +1,58 @@
OPT_DEBUG=-O0 -g -Wall -Wextra -Werror -I.
OPT_FAST=-O3 -DHTTP_PARSER_STRICT=0 -I.
CC?=gcc
AR?=ar
CPPFLAGS += -I.
CPPFLAGS_DEBUG = $(CPPFLAGS) -DHTTP_PARSER_STRICT=1 -DHTTP_PARSER_DEBUG=1
CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA)
CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0 -DHTTP_PARSER_DEBUG=0
CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)
test: test_debug
./test_debug
CFLAGS += -Wall -Wextra -Werror
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
test_debug: http_parser_debug.o test.c
gcc $(OPT_DEBUG) http_parser.o test.c -o $@
test: test_g test_fast
./test_g
./test_fast
http_parser_debug.o: http_parser.c http_parser.h Makefile
gcc $(OPT_DEBUG) -c http_parser.c
test_g: http_parser_g.o test_g.o
$(CC) $(CFLAGS_DEBUG) $(LDFLAGS) http_parser_g.o test_g.o -o $@
test-valgrind: test_debug
valgrind ./test_debug
test_g.o: test.c http_parser.h Makefile
$(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c test.c -o $@
http_parser_g.o: http_parser.c http_parser.h Makefile
$(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c http_parser.c -o $@
test_fast: http_parser.o test.o http_parser.h
$(CC) $(CFLAGS_FAST) $(LDFLAGS) http_parser.o test.o -o $@
test.o: test.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c test.c -o $@
http_parser.o: http_parser.c http_parser.h Makefile
gcc $(OPT_FAST) -c http_parser.c
test_fast: http_parser.o test.c
gcc $(OPT_FAST) http_parser.o test.c -o $@
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c http_parser.c
test-run-timed: test_fast
while(true) do time ./test_fast > /dev/null; done
test-valgrind: test_g
valgrind ./test_g
libhttp_parser.o: http_parser.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
library: libhttp_parser.o
$(CC) -shared -o libhttp_parser.so libhttp_parser.o
package: http_parser.o
$(AR) rcs libhttp_parser.a http_parser.o
tags: http_parser.c http_parser.h test.c
ctags $^
clean:
rm -f *.o test test_fast test_debug http_parser.tar tags
rm -f *.o *.a test test_fast test_g http_parser.tar tags libhttp_parser.so libhttp_parser.o
.PHONY: clean package test-run test-run-timed test-valgrind

View File

@@ -1,29 +1,33 @@
HTTP Parser
===========
This is a parser for HTTP messages written in C. It parses both requests
and responses. The parser is designed to be used in performance HTTP
applications. It does not make any allocations, it does not buffer data, and
it can be interrupted at anytime. It only requires about 136 bytes of data
per message stream (in a web server that is per connection).
This is a parser for HTTP messages written in C. It parses both requests and
responses. The parser is designed to be used in performance HTTP
applications. It does not make any syscalls nor allocations, it does not
buffer data, it can be interrupted at anytime. Depending on your
architecture, it only requires about 40 bytes of data per message
stream (in a web server that is per connection).
Features:
* No dependencies
* Parses both requests and responses.
* Handles persistent streams.
* Handles persistent streams (keep-alive).
* Decodes chunked encoding.
* Extracts the following data from a message
* header fields and values
* content-length
* request method
* response status code
* transfer-encoding
* http version
* request path, query string, fragment
* message body
* Upgrade support
* Defends against buffer overflow attacks.
The parser extracts the following information from HTTP messages:
* Header fields and values
* Content-Length
* Request method
* Response status code
* Transfer-Encoding
* HTTP version
* Request URL
* Message body
Usage
-----
@@ -31,11 +35,13 @@ One `http_parser` object is used per TCP connection. Initialize the struct
using `http_parser_init()` and set the callbacks. That might look something
like this for a request parser:
http_parser_settings settings;
settings.on_path = my_path_callback;
settings.on_header_field = my_header_field_callback;
/* ... */
http_parser *parser = malloc(sizeof(http_parser));
http_parser_init(parser, HTTP_REQUEST);
parser->on_path = my_path_callback;
parser->on_header_field = my_header_field_callback;
/* ... */
parser->data = my_socket;
When data is received on the socket execute the parser and check for errors.
@@ -51,25 +57,26 @@ When data is received on the socket execute the parser and check for errors.
}
/* Start up / continue the parser.
* Note we pass the recved==0 to http_parse_requests to signal
* that EOF has been recieved.
* Note we pass recved==0 to signal that EOF has been recieved.
*/
nparsed = http_parser_execute(parser, buf, recved);
nparsed = http_parser_execute(parser, &settings, buf, recved);
if (nparsed != recved) {
if (parser->upgrade) {
/* handle new protocol */
} else if (nparsed != recved) {
/* Handle error. Usually just close the connection. */
}
HTTP needs to know where the end of the stream is. For example, sometimes
servers send responses without Content-Length and expect the client to
consume input (for the body) until EOF. To tell http_parser about EOF, give
`0` as the third parameter to `http_parser_execute()`. Callbacks and errors
`0` as the forth parameter to `http_parser_execute()`. Callbacks and errors
can still be encountered during an EOF, so one must still be prepared
to receive them.
Scalar valued message information such as `status_code`, `method`, and the
HTTP version are stored in the parser structure. This data is only
temporarlly stored in `http_parser` and gets reset on each new message. If
temporally stored in `http_parser` and gets reset on each new message. If
this information is needed later, copy it out of the structure during the
`headers_complete` callback.
@@ -77,27 +84,54 @@ The parser decodes the transfer-encoding for both requests and responses
transparently. That is, a chunked encoding is decoded before being sent to
the on_body callback.
It does not decode the content-encoding (gzip). Not all HTTP applications
need to inspect the body. Decoding gzip is non-neglagable amount of
processing (and requires making allocations). HTTP proxies using this
parser, for example, would not want such a feature.
The Special Problem of Upgrade
------------------------------
HTTP supports upgrading the connection to a different protocol. An
increasingly common example of this is the Web Socket protocol which sends
a request like
GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: example.com
Origin: http://example.com
WebSocket-Protocol: sample
followed by non-HTTP data.
(See http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 for more
information the Web Socket protocol.)
To support this, the parser will treat this as a normal HTTP message without a
body. Issuing both on_headers_complete and on_message_complete callbacks. However
http_parser_execute() will stop parsing at the end of the headers and return.
The user is expected to check if `parser->upgrade` has been set to 1 after
`http_parser_execute()` returns. Non-HTTP data begins at the buffer supplied
offset by the return value of `http_parser_execute()`.
Callbacks
---------
During the `http_parser_execute()` call, the callbacks set in `http_parser`
will be executed. The parser maintains state and never looks behind, so
buffering the data is not necessary. If you need to save certain data for
later usage, you can do that from the callbacks.
During the `http_parser_execute()` call, the callbacks set in
`http_parser_settings` will be executed. The parser maintains state and
never looks behind, so buffering the data is not necessary. If you need to
save certain data for later usage, you can do that from the callbacks.
There are two types of callbacks:
* notification `typedef int (*http_cb) (http_parser*);`
Callbacks: on_message_begin, on_headers_complete, on_message_complete.
* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);`
Callbacks: (requests only) on_path, on_query_string, on_uri, on_fragment,
Callbacks: (requests only) on_uri,
(common) on_header_field, on_header_value, on_body;
Callbacks must return 0 on success. Returning a non-zero value indicates
error to the parser, making it exit immediately.
In case you parse HTTP message in chunks (i.e. `read()` request line
from socket, parse, read half headers, parse, etc) your data callbacks
may be called more than once. Http-parser guarantees that data pointer is only
@@ -129,8 +163,16 @@ and apply following logic:
| | | and append callback data to it |
------------------------ ------------ --------------------------------------------
Parsing URLs
------------
A simplistic zero-copy URL parser is provided as `http_parser_parse_url()`.
Users of this library may wish to use it to parse URLs constructed from
consecutive `on_url` callbacks.
See examples of reading in headers:
* [partial example](http://gist.github.com/155877) in C
* [from http-parser tests](http://github.com/ry/http-parser/blob/37a0ff8928fb0d83cec0d0d8909c5a4abcd221af/test.c#L403) in C
* [from Node library](http://github.com/ry/node/blob/842eaf446d2fdcb33b296c67c911c32a0dabc747/src/http.js#L284) in Javascript
* [from http-parser tests](http://github.com/joyent/http-parser/blob/37a0ff8/test.c#L403) in C
* [from Node library](http://github.com/joyent/node/blob/842eaf4/src/http.js#L284) in Javascript

File diff suppressed because it is too large Load Diff

79
deps/http_parser/http_parser.gyp vendored Normal file
View File

@@ -0,0 +1,79 @@
# This file is used with the GYP meta build system.
# http://code.google.com/p/gyp/
# To build try this:
# svn co http://gyp.googlecode.com/svn/trunk gyp
# ./gyp/gyp -f make --depth=`pwd` http_parser.gyp
# ./out/Debug/test
{
'target_defaults': {
'default_configuration': 'Debug',
'configurations': {
# TODO: hoist these out and put them somewhere common, because
# RuntimeLibrary MUST MATCH across the entire project
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
},
},
},
'Release': {
'defines': [ 'NDEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
},
},
}
},
'msvs_settings': {
'VCCLCompilerTool': {
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
},
},
'conditions': [
['OS == "win"', {
'defines': [
'WIN32'
],
}]
],
},
'targets': [
{
'target_name': 'http_parser',
'type': 'static_library',
'include_dirs': [ '.' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
},
'defines': [ 'HTTP_PARSER_STRICT=0' ],
'sources': [ './http_parser.c', ],
'conditions': [
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
# Compile as C++. http_parser.c is actually C99, but C++ is
# close enough in this case.
'CompileAs': 2,
},
},
}]
],
},
{
'target_name': 'test',
'type': 'executable',
'dependencies': [ 'http_parser' ],
'sources': [ 'test.c' ]
}
]
}

View File

@@ -1,4 +1,4 @@
/* Copyright 2009,2010 Ryan Dahl <ry@tinyclouds.org>
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -24,28 +24,58 @@
extern "C" {
#endif
#ifdef _MSC_VER
# include <stddef.h>
#endif
#define HTTP_PARSER_VERSION_MAJOR 1
#define HTTP_PARSER_VERSION_MINOR 0
#include <sys/types.h>
#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
typedef unsigned int size_t;
typedef int ssize_t;
#else
#include <stdint.h>
#endif
/* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run
* faster
*/
#ifndef HTTP_PARSER_STRICT
# define HTTP_PARSER_STRICT 1
#else
# define HTTP_PARSER_STRICT 0
#endif
/* Compile with -DHTTP_PARSER_DEBUG=1 to add extra debugging information to
* the error reporting facility.
*/
#ifndef HTTP_PARSER_DEBUG
# define HTTP_PARSER_DEBUG 0
#endif
/* Maximium header size allowed */
#define HTTP_MAX_HEADER_SIZE (80*1024)
typedef struct http_parser http_parser;
/* Callbacks should return non-zero to indicate an error. The parse will
typedef struct http_parser http_parser;
typedef struct http_parser_settings http_parser_settings;
/* Callbacks should return non-zero to indicate an error. The parser will
* then halt execution.
*
* The one exception is on_headers_complete. In a HTTP_RESPONSE parser
* returning '1' from on_headers_complete will tell the parser that it
* should not expect a body. This is used when receiving a response to a
* HEAD request which may contain 'Content-Length' or 'Transfer-Encoding:
* chunked' headers that indicate the presence of a body.
*
* http_data_cb does not return data chunks. It will be call arbitrarally
* many times for each string. E.G. you might get 10 callbacks for "on_path"
* each providing just a few characters more data.
@@ -53,78 +83,164 @@ typedef struct http_parser http_parser;
typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);
typedef int (*http_cb) (http_parser*);
/* Should be at least one longer than the longest request method */
#define HTTP_PARSER_MAX_METHOD_LEN 10
/* Request Methods */
#define HTTP_METHOD_MAP(XX) \
XX(0, DELETE, DELETE) \
XX(1, GET, GET) \
XX(2, HEAD, HEAD) \
XX(3, POST, POST) \
XX(4, PUT, PUT) \
/* pathological */ \
XX(5, CONNECT, CONNECT) \
XX(6, OPTIONS, OPTIONS) \
XX(7, TRACE, TRACE) \
/* webdav */ \
XX(8, COPY, COPY) \
XX(9, LOCK, LOCK) \
XX(10, MKCOL, MKCOL) \
XX(11, MOVE, MOVE) \
XX(12, PROPFIND, PROPFIND) \
XX(13, PROPPATCH, PROPPATCH) \
XX(14, SEARCH, SEARCH) \
XX(15, UNLOCK, UNLOCK) \
/* subversion */ \
XX(16, REPORT, REPORT) \
XX(17, MKACTIVITY, MKACTIVITY) \
XX(18, CHECKOUT, CHECKOUT) \
XX(19, MERGE, MERGE) \
/* upnp */ \
XX(20, MSEARCH, M-SEARCH) \
XX(21, NOTIFY, NOTIFY) \
XX(22, SUBSCRIBE, SUBSCRIBE) \
XX(23, UNSUBSCRIBE, UNSUBSCRIBE) \
/* RFC-5789 */ \
XX(24, PATCH, PATCH) \
XX(25, PURGE, PURGE) \
enum http_method
{ HTTP_DELETE = 0x0001
, HTTP_GET = 0x0002
, HTTP_HEAD = 0x0004
, HTTP_POST = 0x0008
, HTTP_PUT = 0x0010
/* pathological */
, HTTP_CONNECT = 0x0020
, HTTP_OPTIONS = 0x0040
, HTTP_TRACE = 0x0080
/* webdav */
, HTTP_COPY = 0x0100
, HTTP_LOCK = 0x0200
, HTTP_MKCOL = 0x0400
, HTTP_MOVE = 0x0800
, HTTP_PROPFIND = 0x1000
, HTTP_PROPPATCH = 0x2000
, HTTP_UNLOCK = 0x4000
{
#define XX(num, name, string) HTTP_##name = num,
HTTP_METHOD_MAP(XX)
#undef XX
};
enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE };
enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH };
/* Flag values for http_parser.flags field */
enum flags
{ F_CHUNKED = 1 << 0
, F_CONNECTION_KEEP_ALIVE = 1 << 1
, F_CONNECTION_CLOSE = 1 << 2
, F_TRAILING = 1 << 3
, F_UPGRADE = 1 << 4
, F_SKIPBODY = 1 << 5
};
/* Map for errno-related constants
*
* The provided argument should be a macro that takes 2 arguments.
*/
#define HTTP_ERRNO_MAP(XX) \
/* No error */ \
XX(OK, "success") \
\
/* Callback-related errors */ \
XX(CB_message_begin, "the on_message_begin callback failed") \
XX(CB_url, "the on_url callback failed") \
XX(CB_header_field, "the on_header_field callback failed") \
XX(CB_header_value, "the on_header_value callback failed") \
XX(CB_headers_complete, "the on_headers_complete callback failed") \
XX(CB_body, "the on_body callback failed") \
XX(CB_message_complete, "the on_message_complete callback failed") \
\
/* Parsing-related errors */ \
XX(INVALID_EOF_STATE, "stream ended at an unexpected time") \
XX(HEADER_OVERFLOW, \
"too many header bytes seen; overflow detected") \
XX(CLOSED_CONNECTION, \
"data received after completed connection: close message") \
XX(INVALID_VERSION, "invalid HTTP version") \
XX(INVALID_STATUS, "invalid HTTP status code") \
XX(INVALID_METHOD, "invalid HTTP method") \
XX(INVALID_URL, "invalid URL") \
XX(INVALID_HOST, "invalid host") \
XX(INVALID_PORT, "invalid port") \
XX(INVALID_PATH, "invalid path") \
XX(INVALID_QUERY_STRING, "invalid query string") \
XX(INVALID_FRAGMENT, "invalid fragment") \
XX(LF_EXPECTED, "LF character expected") \
XX(INVALID_HEADER_TOKEN, "invalid character in header") \
XX(INVALID_CONTENT_LENGTH, \
"invalid character in content-length header") \
XX(INVALID_CHUNK_SIZE, \
"invalid character in chunk size header") \
XX(INVALID_CONSTANT, "invalid constant string") \
XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\
XX(STRICT, "strict mode assertion failed") \
XX(PAUSED, "parser is paused") \
XX(UNKNOWN, "an unknown error occurred")
/* Define HPE_* values for each errno value above */
#define HTTP_ERRNO_GEN(n, s) HPE_##n,
enum http_errno {
HTTP_ERRNO_MAP(HTTP_ERRNO_GEN)
};
#undef HTTP_ERRNO_GEN
/* Get an http_errno value from an http_parser */
#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno)
/* Get the line number that generated the current error */
#if HTTP_PARSER_DEBUG
#define HTTP_PARSER_ERRNO_LINE(p) ((p)->error_lineno)
#else
#define HTTP_PARSER_ERRNO_LINE(p) 0
#endif
struct http_parser {
/** PRIVATE **/
enum http_parser_type type;
unsigned short state;
unsigned short header_state;
size_t index;
unsigned char type : 2; /* enum http_parser_type */
unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */
unsigned char state; /* enum state from http_parser.c */
unsigned char header_state; /* enum header_state from http_parser.c */
unsigned char index; /* index into current matcher */
char flags;
size_t nread;
ssize_t body_read;
ssize_t content_length;
const char *header_field_mark;
size_t header_field_size;
const char *header_value_mark;
size_t header_value_size;
const char *query_string_mark;
size_t query_string_size;
const char *path_mark;
size_t path_size;
const char *url_mark;
size_t url_size;
const char *fragment_mark;
size_t fragment_size;
uint32_t nread; /* # bytes read in various scenarios */
uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */
/** READ-ONLY **/
unsigned short status_code; /* responses only */
enum http_method method; /* requests only */
unsigned short http_major;
unsigned short http_minor;
char buffer[HTTP_PARSER_MAX_METHOD_LEN];
unsigned short status_code; /* responses only */
unsigned char method; /* requests only */
unsigned char http_errno : 7;
/* 1 = Upgrade header was present and the parser has exited because of that.
* 0 = No upgrade header present.
* Should be checked when http_parser_execute() returns in addition to
* error checking.
*/
unsigned char upgrade : 1;
#if HTTP_PARSER_DEBUG
uint32_t error_lineno;
#endif
/** PUBLIC **/
void *data; /* A pointer to get hook to the "connection" or "socket" object */
};
/* an ordered list of callbacks */
struct http_parser_settings {
http_cb on_message_begin;
/* requests only */
http_data_cb on_path;
http_data_cb on_query_string;
http_data_cb on_url;
http_data_cb on_fragment;
http_data_cb on_header_field;
http_data_cb on_header_value;
http_cb on_headers_complete;
@@ -132,15 +248,70 @@ struct http_parser {
http_cb on_message_complete;
};
enum http_parser_url_fields
{ UF_SCHEMA = 0
, UF_HOST = 1
, UF_PORT = 2
, UF_PATH = 3
, UF_QUERY = 4
, UF_FRAGMENT = 5
, UF_MAX = 6
};
/* Result structure for http_parser_parse_url().
*
* Callers should index into field_data[] with UF_* values iff field_set
* has the relevant (1 << UF_*) bit set. As a courtesy to clients (and
* because we probably have padding left over), we convert any port to
* a uint16_t.
*/
struct http_parser_url {
uint16_t field_set; /* Bitmask of (1 << UF_*) values */
uint16_t port; /* Converted UF_PORT string */
struct {
uint16_t off; /* Offset into buffer in which field starts */
uint16_t len; /* Length of run in buffer */
} field_data[UF_MAX];
};
void http_parser_init(http_parser *parser, enum http_parser_type type);
size_t http_parser_execute(http_parser *parser, const char *data, size_t len);
/* Call this in the on_headers_complete or on_message_complete callback to
* determine if this will be the last message on the connection.
* If you are the server, respond with the "Connection: close" header
* if you are the client, close the connection.
size_t http_parser_execute(http_parser *parser,
const http_parser_settings *settings,
const char *data,
size_t len);
/* If http_should_keep_alive() in the on_headers_complete or
* on_message_complete callback returns true, then this will be should be
* the last message on the connection.
* If you are the server, respond with the "Connection: close" header.
* If you are the client, close the connection.
*/
int http_should_keep_alive(http_parser *parser);
/* Returns a string version of the HTTP method. */
const char *http_method_str(enum http_method m);
/* Return a string name of the given error */
const char *http_errno_name(enum http_errno err);
/* Return a string description of the given error */
const char *http_errno_description(enum http_errno err);
/* Parse a URL; return nonzero on failure */
int http_parser_parse_url(const char *buf, size_t buflen,
int is_connect,
struct http_parser_url *u);
/* Pause or un-pause the parser; a nonzero value pauses */
void http_parser_pause(http_parser *parser, int paused);
#ifdef __cplusplus
}
#endif

1170
deps/http_parser/test.c vendored

File diff suppressed because it is too large Load Diff

24
deps/libeio/Changes vendored
View File

@@ -1,24 +0,0 @@
Revision history for libeio
TODO: maybe add mincore support? available on at least darwin, solaris, linux, freebsd
1.0
- readdir: correctly handle malloc failures.
- readdir: new flags argument, can return inode
and possibly filetype, can sort in various ways.
- readdir: stop immediately when cancelled, do
not continue reading the directory.
- fix return value of eio_sendfile_sync.
- include sys/mman.h for msync.
- added EIO_STACKSIZE.
- added msync, mtouch support (untested).
- added sync_file_range (untested).
- fixed custom support.
- use a more robust feed-add detection method.
- "outbundled" from IO::AIO.
- eio_set_max_polltime did not properly convert time to ticks.
- tentatively support darwin in sendfile.
- also use sendfile emulation for ENOTSUP and EOPNOTSUPP
error codes.
- add OS-independent EIO_MT_* and EIO_MS_* flag enums.

View File

@@ -1,15 +0,0 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
VERSION_INFO = 1:0
EXTRA_DIST = LICENSE Changes autogen.sh
#man_MANS = ev.3
include_HEADERS = eio.h
lib_LTLIBRARIES = libeio.la
libeio_la_SOURCES = eio.c xthread.h config.h
libeio_la_LDFLAGS = -version-info $(VERSION_INFO)

7243
deps/libeio/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
libtoolize
aclocal
automake --add-missing
autoconf
autoheader

View File

@@ -1,73 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* fdatasync(2) is available */
#undef HAVE_FDATASYNC
/* futimes(2) is available */
#undef HAVE_FUTIMES
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* pread(2) and pwrite(2) are available */
#undef HAVE_PREADWRITE
/* readahead(2) is available (linux) */
#undef HAVE_READAHEAD
/* sendfile(2) is available and supported */
#undef HAVE_SENDFILE
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* sync_file_range(2) is available */
#undef HAVE_SYNC_FILE_RANGE
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

View File

@@ -1,22 +0,0 @@
AC_PREREQ(2.59)
AC_INIT
AC_CONFIG_SRCDIR([eio.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE(libeio,1.0)
AM_MAINTAINER_MODE
AC_PROG_LIBTOOL
AC_PROG_CC
if test "x$GCC" = xyes ; then
CFLAGS="$CFLAGS -O3"
fi
dnl somebody will forgive me
CFLAGS="-D_GNU_SOURCE"
m4_include([libeio.m4])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

1939
deps/libeio/eio.c vendored

File diff suppressed because it is too large Load Diff

305
deps/libeio/eio.h vendored
View File

@@ -1,305 +0,0 @@
/*
* libeio API header
*
* Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libeio@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU General Public License ("GPL") version 2 or any later version,
* in which case the provisions of the GPL are applicable instead of
* the above. If you wish to allow the use of your version of this file
* only under the terms of the GPL and not to allow others to use your
* version of this file under the BSD license, indicate your decision
* by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete the
* provisions above, a recipient may use your version of this file under
* either the BSD or the GPL.
*/
#ifndef EIO_H_
#define EIO_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <sys/types.h>
typedef struct eio_req eio_req;
typedef struct eio_dirent eio_dirent;
typedef int (*eio_cb)(eio_req *req);
#ifndef EIO_REQ_MEMBERS
# define EIO_REQ_MEMBERS
#endif
#ifndef EIO_STRUCT_STAT
# define EIO_STRUCT_STAT struct stat
#endif
/* for readdir */
/* eio_readdir flags */
enum {
EIO_READDIR_DENTS = 0x01, /* ptr2 contains eio_dirents, not just the (unsorted) names */
EIO_READDIR_DIRS_FIRST = 0x02, /* dirents gets sorted into a good stat() ing order to find directories first */
EIO_READDIR_STAT_ORDER = 0x04, /* dirents gets sorted into a good stat() ing order to quickly stat all files */
EIO_READDIR_FOUND_UNKNOWN = 0x80, /* set by eio_readdir when *_ARRAY was set and any TYPE=UNKNOWN's were found */
EIO_READDIR_CUSTOM1 = 0x100, /* for use by apps */
EIO_READDIR_CUSTOM2 = 0x200 /* for use by apps */
};
/* using "typical" values in the hope that the compiler will do something sensible */
enum eio_dtype {
EIO_DT_UNKNOWN = 0,
EIO_DT_FIFO = 1,
EIO_DT_CHR = 2,
EIO_DT_MPC = 3, /* multiplexed char device (v7+coherent) */
EIO_DT_DIR = 4,
EIO_DT_NAM = 5, /* xenix special named file */
EIO_DT_BLK = 6,
EIO_DT_MPB = 7, /* multiplexed block device (v7+coherent) */
EIO_DT_REG = 8,
EIO_DT_NWK = 9, /* HP-UX network special */
EIO_DT_CMP = 9, /* VxFS compressed */
EIO_DT_LNK = 10,
/* DT_SHAD = 11,*/
EIO_DT_SOCK = 12,
EIO_DT_DOOR = 13, /* solaris door */
EIO_DT_WHT = 14,
EIO_DT_MAX = 15 /* highest DT_VALUE ever, hopefully */
};
struct eio_dirent {
int nameofs; /* offset of null-terminated name string in (char *)req->ptr2 */
unsigned short namelen; /* size of filename without trailing 0 */
unsigned char type; /* one of EIO_DT_* */
signed char score; /* internal use */
ino_t inode; /* the inode number, if available, otherwise unspecified */
};
/* eio_msync flags */
enum {
EIO_MS_ASYNC = 1,
EIO_MS_INVALIDATE = 2,
EIO_MS_SYNC = 4
};
/* eio_mtouch flags */
enum {
EIO_MT_MODIFY = 1
};
/* eio_sync_file_range flags */
enum {
EIO_SYNC_FILE_RANGE_WAIT_BEFORE = 1,
EIO_SYNC_FILE_RANGE_WRITE = 2,
EIO_SYNC_FILE_RANGE_WAIT_AFTER = 4
};
typedef double eio_tstamp; /* feel free to use double in your code directly */
/* the eio request structure */
enum {
EIO_CUSTOM,
EIO_OPEN, EIO_CLOSE, EIO_DUP2,
EIO_READ, EIO_WRITE,
EIO_READAHEAD, EIO_SENDFILE,
EIO_STAT, EIO_LSTAT, EIO_FSTAT,
EIO_TRUNCATE, EIO_FTRUNCATE,
EIO_UTIME, EIO_FUTIME,
EIO_CHMOD, EIO_FCHMOD,
EIO_CHOWN, EIO_FCHOWN,
EIO_SYNC, EIO_FSYNC, EIO_FDATASYNC,
EIO_MSYNC, EIO_MTOUCH, EIO_SYNC_FILE_RANGE,
EIO_UNLINK, EIO_RMDIR, EIO_MKDIR, EIO_RENAME,
EIO_MKNOD, EIO_READDIR,
EIO_LINK, EIO_SYMLINK, EIO_READLINK,
EIO_GROUP, EIO_NOP,
EIO_BUSY
};
/* eio request structure */
/* this structure is mostly read-only */
/* when initialising it, all members must be zero-initialised */
struct eio_req
{
eio_req volatile *next; /* private ETP */
ssize_t result; /* result of syscall, e.g. result = read (... */
off_t offs; /* read, write, truncate, readahead, sync_file_range: file offset */
size_t size; /* read, write, readahead, sendfile, msync, sync_file_range: length */
void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */
void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */
eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */
eio_tstamp nv2; /* utime, futime: mtime */
int type; /* EIO_xxx constant ETP */
int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, readdir: flags */
long int2; /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, sync_file_range: flags */
long int3; /* chown, fchown: gid; mknod: dev_t */
int errorno; /* errno value on syscall return */
unsigned char flags; /* private */
signed char pri; /* the priority */
void *data;
eio_cb finish;
void (*destroy)(eio_req *req); /* called when requets no longer needed */
void (*feed)(eio_req *req); /* only used for group requests */
EIO_REQ_MEMBERS
eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */
};
/* _private_ flags */
enum {
EIO_FLAG_CANCELLED = 0x01, /* request was cancelled */
EIO_FLAG_PTR1_FREE = 0x02, /* need to free(ptr1) */
EIO_FLAG_PTR2_FREE = 0x04, /* need to free(ptr2) */
EIO_FLAG_GROUPADD = 0x08 /* some request was added to the group */
};
enum {
EIO_PRI_MIN = -4,
EIO_PRI_MAX = 4,
EIO_PRI_DEFAULT = 0,
};
/* returns < 0 on error, errno set
* need_poll, if non-zero, will be called when results are available
* and eio_poll_cb needs to be invoked (it MUST NOT call eio_poll_cb itself).
* done_poll is called when the need to poll is gone.
*/
int eio_init (void (*want_poll)(void), void (*done_poll)(void));
/* must be called regularly to handle pending requests */
/* returns 0 if all requests were handled, -1 if not, or the value of EIO_FINISH if != 0 */
int eio_poll (void);
/* stop polling if poll took longer than duration seconds */
void eio_set_max_poll_time (eio_tstamp nseconds);
/* do not handle more then count requests in one call to eio_poll_cb */
void eio_set_max_poll_reqs (unsigned int nreqs);
/* set minimum required number
* maximum wanted number
* or maximum idle number of threads */
void eio_set_min_parallel (unsigned int nthreads);
void eio_set_max_parallel (unsigned int nthreads);
void eio_set_max_idle (unsigned int nthreads);
unsigned int eio_nreqs (void); /* number of requests in-flight */
unsigned int eio_nready (void); /* number of not-yet handled requests */
unsigned int eio_npending (void); /* numbe rof finished but unhandled requests */
unsigned int eio_nthreads (void); /* number of worker threads in use currently */
/*****************************************************************************/
/* convinience wrappers */
#ifndef EIO_NO_WRAPPERS
eio_req *eio_nop (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */
eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */
eio_req *eio_sync (int pri, eio_cb cb, void *data);
eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data);
eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data);
eio_req *eio_msync (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data);
eio_req *eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data);
eio_req *eio_sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags, int pri, eio_cb cb, void *data);
eio_req *eio_close (int fd, int pri, eio_cb cb, void *data);
eio_req *eio_readahead (int fd, off_t offset, size_t length, int pri, eio_cb cb, void *data);
eio_req *eio_read (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data);
eio_req *eio_write (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data);
eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
eio_req *eio_futime (int fd, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data);
eio_req *eio_ftruncate (int fd, off_t offset, int pri, eio_cb cb, void *data);
eio_req *eio_fchmod (int fd, mode_t mode, int pri, eio_cb cb, void *data);
eio_req *eio_fchown (int fd, uid_t uid, gid_t gid, int pri, eio_cb cb, void *data);
eio_req *eio_dup2 (int fd, int fd2, int pri, eio_cb cb, void *data);
eio_req *eio_sendfile (int out_fd, int in_fd, off_t in_offset, size_t length, int pri, eio_cb cb, void *data);
eio_req *eio_open (const char *path, int flags, mode_t mode, int pri, eio_cb cb, void *data);
eio_req *eio_utime (const char *path, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data);
eio_req *eio_truncate (const char *path, off_t offset, int pri, eio_cb cb, void *data);
eio_req *eio_chown (const char *path, uid_t uid, gid_t gid, int pri, eio_cb cb, void *data);
eio_req *eio_chmod (const char *path, mode_t mode, int pri, eio_cb cb, void *data);
eio_req *eio_mkdir (const char *path, mode_t mode, int pri, eio_cb cb, void *data);
eio_req *eio_readdir (const char *path, int flags, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */
eio_req *eio_rmdir (const char *path, int pri, eio_cb cb, void *data);
eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data);
eio_req *eio_readlink (const char *path, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */
eio_req *eio_stat (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data);
eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
eio_req *eio_custom (eio_cb execute, int pri, eio_cb cb, void *data);
#endif
/*****************************************************************************/
/* groups */
eio_req *eio_grp (eio_cb cb, void *data);
void eio_grp_feed (eio_req *grp, void (*feed)(eio_req *req), int limit);
void eio_grp_limit (eio_req *grp, int limit);
void eio_grp_add (eio_req *grp, eio_req *req);
void eio_grp_cancel (eio_req *grp); /* cancels all sub requests but not the group */
/*****************************************************************************/
/* request api */
/* true if the request was cancelled, useful in the invoke callback */
#define EIO_CANCELLED(req) ((req)->flags & EIO_FLAG_CANCELLED)
#define EIO_RESULT(req) ((req)->result)
/* returns a pointer to the result buffer allocated by eio */
#define EIO_BUF(req) ((req)->ptr2)
#define EIO_STAT_BUF(req) ((EIO_STRUCT_STAT *)EIO_BUF(req))
#define EIO_PATH(req) ((char *)(req)->ptr1)
/* submit a request for execution */
void eio_submit (eio_req *req);
/* cancel a request as soon fast as possible, if possible */
void eio_cancel (eio_req *req);
/* destroy a request that has never been submitted */
void eio_destroy (eio_req *req);
/*****************************************************************************/
/* convinience functions */
ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count);
#ifdef __cplusplus
}
#endif
#endif

303
deps/libeio/eio.pod vendored
View File

@@ -1,303 +0,0 @@
=head1 NAME
libeio - truly asynchronous POSIX I/O
=head1 SYNOPSIS
#include <eio.h>
=head1 DESCRIPTION
The newest version of this document is also available as an html-formatted
web page you might find easier to navigate when reading it for the first
time: L<http://pod.tst.eu/http://cvs.schmorp.de/libeio/eio.pod>.
Note that this library is a by-product of the C<IO::AIO> perl
module, and many of the subtler points regarding requets lifetime
and so on are only documented in its documentation at the
moment: L<http://pod.tst.eu/http://cvs.schmorp.de/IO-AIO/AIO.pm>.
=head2 FEATURES
This library provides fully asynchronous versions of most POSIX functions
dealign with I/O. Unlike most asynchronous libraries, this not only
includes C<read> and C<write>, but also C<open>, C<stat>, C<unlink> and
similar functions, as well as less rarely ones such as C<mknod>, C<futime>
or C<readlink>.
It also offers wrappers around C<sendfile> (Solaris, Linux, HP-UX and
FreeBSD, with emulation on other platforms) and C<readahead> (Linux, with
emulation elsewhere>).
The goal is to enable you to write fully non-blocking programs. For
example, in a game server, you would not want to freeze for a few seconds
just because the server is running a backup and you happen to call
C<readdir>.
=head2 TIME REPRESENTATION
Libeio represents time as a single floating point number, representing the
(fractional) number of seconds since the (POSIX) epoch (somewhere near
the beginning of 1970, details are complicated, don't ask). This type is
called C<eio_tstamp>, but it is guarenteed to be of type C<double> (or
better), so you can freely use C<double> yourself.
Unlike the name component C<stamp> might indicate, it is also used for
time differences throughout libeio.
=head2 FORK SUPPORT
Calling C<fork ()> is fully supported by this module. It is implemented in these steps:
1. wait till all requests in "execute" state have been handled
(basically requests that are already handed over to the kernel).
2. fork
3. in the parent, continue business as usual, done
4. in the child, destroy all ready and pending requests and free the
memory used by the worker threads. This gives you a fully empty
libeio queue.
=head1 INITIALISATION/INTEGRATION
Before you can call any eio functions you first have to initialise the
library. The library integrates into any event loop, but can also be used
without one, including in polling mode.
You have to provide the necessary glue yourself, however.
=over 4
=item int eio_init (void (*want_poll)(void), void (*done_poll)(void))
This function initialises the library. On success it returns C<0>, on
failure it returns C<-1> and sets C<errno> appropriately.
It accepts two function pointers specifying callbacks as argument, both of
which can be C<0>, in which case the callback isn't called.
=item want_poll callback
The C<want_poll> callback is invoked whenever libeio wants attention (i.e.
it wants to be polled by calling C<eio_poll>). It is "edge-triggered",
that is, it will only be called once when eio wants attention, until all
pending requests have been handled.
This callback is called while locks are being held, so I<you must
not call any libeio functions inside this callback>. That includes
C<eio_poll>. What you should do is notify some other thread, or wake up
your event loop, and then call C<eio_poll>.
=item done_poll callback
This callback is invoked when libeio detects that all pending requests
have been handled. It is "edge-triggered", that is, it will only be
called once after C<want_poll>. To put it differently, C<want_poll> and
C<done_poll> are invoked in pairs: after C<want_poll> you have to call
C<eio_poll ()> until either C<eio_poll> indicates that everything has been
handled or C<done_poll> has been called, which signals the same.
Note that C<eio_poll> might return after C<done_poll> and C<want_poll>
have been called again, so watch out for races in your code.
As with C<want_poll>, this callback is called while lcoks are being held,
so you I<must not call any libeio functions form within this callback>.
=item int eio_poll ()
This function has to be called whenever there are pending requests that
need finishing. You usually call this after C<want_poll> has indicated
that you should do so, but you can also call this function regularly to
poll for new results.
If any request invocation returns a non-zero value, then C<eio_poll ()>
immediately returns with that value as return value.
Otherwise, if all requests could be handled, it returns C<0>. If for some
reason not all requests have been handled, i.e. some are still pending, it
returns C<-1>.
=back
For libev, you would typically use an C<ev_async> watcher: the
C<want_poll> callback would invoke C<ev_async_send> to wake up the event
loop. Inside the callback set for the watcher, one would call C<eio_poll
()> (followed by C<ev_async_send> again if C<eio_poll> indicates that not
all requests have been handled yet). The race is taken care of because
libev resets/rearms the async watcher before calling your callback,
and therefore, before calling C<eio_poll>. This might result in (some)
spurious wake-ups, but is generally harmless.
For most other event loops, you would typically use a pipe - the event
loop should be told to wait for read readyness on the read end. In
C<want_poll> you would write a single byte, in C<done_poll> you would try
to read that byte, and in the callback for the read end, you would call
C<eio_poll>. The race is avoided here because the event loop should invoke
your callback again and again until the byte has been read (as the pipe
read callback does not read it, only C<done_poll>).
=head2 CONFIGURATION
The functions in this section can sometimes be useful, but the default
configuration will do in most case, so you should skip this section on
first reading.
=over 4
=item eio_set_max_poll_time (eio_tstamp nseconds)
This causes C<eio_poll ()> to return after it has detected that it was
running for C<nsecond> seconds or longer (this number can be fractional).
This can be used to limit the amount of time spent handling eio requests,
for example, in interactive programs, you might want to limit this time to
C<0.01> seconds or so.
Note that:
a) libeio doesn't know how long your request callbacks take, so the time
spent in C<eio_poll> is up to one callback invocation longer then this
interval.
b) this is implemented by calling C<gettimeofday> after each request,
which can be costly.
c) at least one request will be handled.
=item eio_set_max_poll_reqs (unsigned int nreqs)
When C<nreqs> is non-zero, then C<eio_poll> will not handle more than
C<nreqs> requests per invocation. This is a less costly way to limit the
amount of work done by C<eio_poll> then setting a time limit.
If you know your callbacks are generally fast, you could use this to
encourage interactiveness in your programs by setting it to C<10>, C<100>
or even C<1000>.
=item eio_set_min_parallel (unsigned int nthreads)
Make sure libeio can handle at least this many requests in parallel. It
might be able handle more.
=item eio_set_max_parallel (unsigned int nthreads)
Set the maximum number of threads that libeio will spawn.
=item eio_set_max_idle (unsigned int nthreads)
Libeio uses threads internally to handle most requests, and will start and stop threads on demand.
This call can be used to limit the number of idle threads (threads without
work to do): libeio will keep some threads idle in preperation for more
requests, but never longer than C<nthreads> threads.
In addition to this, libeio will also stop threads when they are idle for
a few seconds, regardless of this setting.
=item unsigned int eio_nthreads ()
Return the number of worker threads currently running.
=item unsigned int eio_nreqs ()
Return the number of requests currently handled by libeio. This is the
total number of requests that have been submitted to libeio, but not yet
destroyed.
=item unsigned int eio_nready ()
Returns the number of ready requests, i.e. requests that have been
submitted but have not yet entered the execution phase.
=item unsigned int eio_npending ()
Returns the number of pending requests, i.e. requests that have been
executed and have results, but have not been finished yet by a call to
C<eio_poll>).
=back
=head1 ANATOMY OF AN EIO REQUEST
#TODO
=head1 HIGH LEVEL REQUEST API
#TODO
=back
=head1 LOW LEVEL REQUEST API
#TODO
=head1 EMBEDDING
Libeio can be embedded directly into programs. This functionality is not
documented and not (yet) officially supported.
Note that, when including C<libeio.m4>, you are responsible for defining
the compilation environment (C<_LARGEFILE_SOURCE>, C<_GNU_SOURCE> etc.).
If you need to know how, check the C<IO::AIO> perl module, which does
exactly that.
=head1 COMPILETIME CONFIGURATION
These symbols, if used, must be defined when compiling F<eio.c>.
=over 4
=item EIO_STACKSIZE
This symbol governs the stack size for each eio thread. Libeio itself
was written to use very little stackspace, but when using C<EIO_CUSTOM>
requests, you might want to increase this.
If this symbol is undefined (the default) then libeio will use its default
stack size (C<sizeof (long) * 4096> currently). If it is defined, but
C<0>, then the default operating system stack size will be used. In all
other cases, the value must be an expression that evaluates to the desired
stack size.
=back
=head1 PORTABILITY REQUIREMENTS
In addition to a working ISO-C implementation, libeio relies on a few
additional extensions:
=over 4
=item POSIX threads
To be portable, this module uses threads, specifically, the POSIX threads
library must be available (and working, which partially excludes many xBSD
systems, where C<fork ()> is buggy).
=item POSIX-compatible filesystem API
This is actually a harder portability requirement: The libeio API is quite
demanding regarding POSIX API calls (symlinks, user/group management
etc.).
=item C<double> must hold a time value in seconds with enough accuracy
The type C<double> is used to represent timestamps. It is required to
have at least 51 bits of mantissa (and 9 bits of exponent), which is good
enough for at least into the year 4000. This requirement is fulfilled by
implementations implementing IEEE 754 (basically all existing ones).
=back
If you know of other additional requirements drop me a note.
=head1 AUTHOR
Marc Lehmann <libeio@schmorp.de>.

107
deps/libeio/libeio.m4 vendored
View File

@@ -1,107 +0,0 @@
AC_SEARCH_LIBS(
pthread_create,
[pthread pthreads pthreadVC2],
,
[AC_MSG_ERROR(pthread functions not found)]
)
AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[
#include <sys/types.h>
#include <sys/time.h>
#include <utime.h>
struct timeval tv[2];
int res;
int fd;
int main(void)
{
res = futimes (fd, tv);
return 0;
}
]],ac_cv_futimes=yes,ac_cv_futimes=no)])
test $ac_cv_futimes = yes && AC_DEFINE(HAVE_FUTIMES, 1, futimes(2) is available)
AC_CACHE_CHECK(for readahead, ac_cv_readahead, [AC_LINK_IFELSE([
#include <fcntl.h>
int main(void)
{
int fd = 0;
size_t count = 2;
ssize_t res;
res = readahead (fd, 0, count);
return 0;
}
],ac_cv_readahead=yes,ac_cv_readahead=no)])
test $ac_cv_readahead = yes && AC_DEFINE(HAVE_READAHEAD, 1, readahead(2) is available (linux))
AC_CACHE_CHECK(for fdatasync, ac_cv_fdatasync, [AC_LINK_IFELSE([
#include <unistd.h>
int main(void)
{
int fd = 0;
fdatasync (fd);
return 0;
}
],ac_cv_fdatasync=yes,ac_cv_fdatasync=no)])
test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is available)
AC_CACHE_CHECK(for pread and pwrite, ac_cv_preadwrite, [AC_LINK_IFELSE([
#include <unistd.h>
int main(void)
{
int fd = 0;
size_t count = 1;
char buf;
off_t offset = 1;
ssize_t res;
res = pread (fd, &buf, count, offset);
res = pwrite (fd, &buf, count, offset);
return 0;
}
],ac_cv_preadwrite=yes,ac_cv_preadwrite=no)])
test $ac_cv_preadwrite = yes && AC_DEFINE(HAVE_PREADWRITE, 1, pread(2) and pwrite(2) are available)
AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([
# include <sys/types.h>
#if __linux
# include <sys/sendfile.h>
#elif __freebsd || defined __APPLE__
# include <sys/socket.h>
# include <sys/uio.h>
#elif __hpux
# include <sys/socket.h>
#else
# error unsupported architecture
#endif
int main(void)
{
int fd = 0;
off_t offset = 1;
size_t count = 2;
ssize_t res;
#if __linux
res = sendfile (fd, fd, offset, count);
#elif __freebsd
res = sendfile (fd, fd, offset, count, 0, &offset, 0);
#elif __hpux
res = sendfile (fd, fd, offset, count, 0, 0);
#endif
return 0;
}
],ac_cv_sendfile=yes,ac_cv_sendfile=no)])
test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is available and supported)
AC_CACHE_CHECK(for sync_file_range, ac_cv_sync_file_range, [AC_LINK_IFELSE([
#include <fcntl.h>
int main(void)
{
int fd = 0;
off64_t offset = 1;
off64_t nbytes = 1;
unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER;
ssize_t res;
res = sync_file_range (fd, offset, nbytes, flags);
return 0;
}
],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)])
test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available)

121
deps/libeio/wscript vendored
View File

@@ -1,121 +0,0 @@
import Options
def set_options(opt):
pass
#opt.tool_options('compiler_cc')
def configure(conf):
print "--- libeio ---"
#conf.check_tool('compiler_cc')
conf.check(lib='pthread', uselib_store='PTHREAD')
conf.check_cc(lib="pthread", header_name="pthread.h", function_name="pthread_create", mandatory=True)
conf.check_cc(lib="pthread", header_name="pthread.h", function_name="pthread_atfork", mandatory=True)
conf.check_cc(msg="Checking for futimes(2)", define_name="HAVE_FUTIMES", fragment="""
#include <sys/types.h>
#include <sys/time.h>
#include <utime.h>
struct timeval tv[2];
int res;
int fd;
int main(void)
{
res = futimes (fd, tv);
return 0;
}
""")
conf.check_cc(msg="Checking for readahead(2)", define_name="HAVE_READAHEAD", fragment="""
#include <fcntl.h>
int main(void)
{
int fd = 0;
size_t count = 2;
ssize_t res;
res = readahead (fd, 0, count);
return 0;
}
""")
conf.check_cc(msg="Checking for fdatasync(2)", define_name="HAVE_FDATASYNC", fragment="""
#include <unistd.h>
int main(void)
{
int fd = 0;
fdatasync (fd);
return 0;
}
""")
conf.check_cc(msg="Checking for pread(2) and pwrite(2)", define_name="HAVE_PREADWRITE", fragment="""
#include <unistd.h>
int main(void)
{
int fd = 0;
size_t count = 1;
char buf;
off_t offset = 1;
ssize_t res;
res = pread (fd, &buf, count, offset);
res = pwrite (fd, &buf, count, offset);
return 0;
}
""")
conf.check_cc(msg="Checking for sendfile(2)" , define_name="HAVE_SENDFILE" , fragment="""
# include <sys/types.h>
#if __linux
# include <sys/sendfile.h>
#elif __freebsd
# include <sys/socket.h>
# include <sys/uio.h>
#elif __hpux
# include <sys/socket.h>
#else
# error unsupported architecture
#endif
int main(void)
{
int fd = 0;
off_t offset = 1;
size_t count = 2;
ssize_t res;
#if __linux
res = sendfile (fd, fd, offset, count);
#elif __freebsd
res = sendfile (fd, fd, offset, count, 0, &offset, 0);
#elif __hpux
res = sendfile (fd, fd, offset, count, 0, 0);
#endif
return 0;
}
""")
conf.env.append_value("CCFLAGS", "-D_GNU_SOURCE")
conf.check_cc(msg="Checking for sync_file_range(2) ", fragment="""
#include <fcntl.h>
int main(void)
{
int fd = 0;
off64_t offset = 1;
off64_t nbytes = 1;
unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER;
ssize_t res;
res = sync_file_range (fd, offset, nbytes, flags);
return 0;
}
""", define_name="HAVE_SYNC_FILE_RANGE")
def build(bld):
libeio = bld.new_task_gen("cc")
libeio.source = "eio.c"
libeio.target = 'eio'
libeio.name = 'eio'
libeio.includes = '. ../..'
libeio.uselib = "PTHREAD"
libeio.install_path = None
if bld.env["USE_DEBUG"]:
libeio.clone("debug");
bld.install_files('${PREFIX}/include/node/', 'eio.h');

157
deps/libeio/xthread.h vendored
View File

@@ -1,157 +0,0 @@
#ifndef XTHREAD_H_
#define XTHREAD_H_
/* whether word reads are potentially non-atomic.
* this is conservatice, likely most arches this runs
* on have atomic word read/writes.
*/
#ifndef WORDACCESS_UNSAFE
# if __i386 || __x86_64
# define WORDACCESS_UNSAFE 0
# else
# define WORDACCESS_UNSAFE 1
# endif
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef _WIN32
typedef int ssize_t;
#define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls
#define _WIN32_WINNT 0x400
#include <stdio.h>//D
#include <fcntl.h>
#include <io.h>
#include <time.h>
#include <winsock2.h>
#include <process.h>
#include <windows.h>
#include <pthread.h>
#define sigset_t int
#define sigfillset(a)
#define pthread_sigmask(a,b,c)
#define sigaddset(a,b)
#define sigemptyset(s)
#define sigfillset(s)
typedef pthread_mutex_t mutex_t;
#define X_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
#define X_LOCK(mutex) pthread_mutex_lock (&(mutex))
#define X_UNLOCK(mutex) pthread_mutex_unlock (&(mutex))
typedef pthread_cond_t cond_t;
#define X_COND_INIT PTHREAD_COND_INITIALIZER
#define X_COND_SIGNAL(cond) pthread_cond_signal (&(cond))
#define X_COND_WAIT(cond,mutex) pthread_cond_wait (&(cond), &(mutex))
#define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to))
typedef pthread_t thread_t;
#define X_THREAD_PROC(name) void *name (void *thr_arg)
#define X_THREAD_ATFORK(a,b,c)
static int
thread_create (thread_t *tid, void *(*proc)(void *), void *arg)
{
int retval;
pthread_attr_t attr;
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
retval = pthread_create (tid, &attr, proc, arg) == 0;
pthread_attr_destroy (&attr);
return retval;
}
#define respipe_read(a,b,c) PerlSock_recv ((a), (b), (c), 0)
#define respipe_write(a,b,c) send ((a), (b), (c), 0)
#define respipe_close(a) PerlSock_closesocket ((a))
#else
/////////////////////////////////////////////////////////////////////////////
#if __linux && !defined(_GNU_SOURCE)
# define _GNU_SOURCE
#endif
/* just in case */
#define _REENTRANT 1
#if __solaris
# define _POSIX_PTHREAD_SEMANTICS 1
/* try to bribe solaris headers into providing a current pthread API
* despite environment being configured for an older version.
*/
# define __EXTENSIONS__ 1
#endif
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <limits.h>
#include <pthread.h>
typedef pthread_mutex_t mutex_t;
#if __linux && defined (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP)
# define X_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
#else
# define X_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
#endif
#define X_LOCK(mutex) pthread_mutex_lock (&(mutex))
#define X_UNLOCK(mutex) pthread_mutex_unlock (&(mutex))
typedef pthread_cond_t cond_t;
#define X_COND_INIT PTHREAD_COND_INITIALIZER
#define X_COND_SIGNAL(cond) pthread_cond_signal (&(cond))
#define X_COND_WAIT(cond,mutex) pthread_cond_wait (&(cond), &(mutex))
#define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to))
typedef pthread_t thread_t;
#define X_THREAD_PROC(name) static void *name (void *thr_arg)
#define X_THREAD_ATFORK(prepare,parent,child) pthread_atfork (prepare, parent, child)
// the broken bsd's once more
#ifndef PTHREAD_STACK_MIN
# define PTHREAD_STACK_MIN 0
#endif
#ifndef X_STACKSIZE
# define X_STACKSIZE sizeof (long) * 4096
#endif
static int
thread_create (thread_t *tid, void *(*proc)(void *), void *arg)
{
int retval;
sigset_t fullsigset, oldsigset;
pthread_attr_t attr;
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN < X_STACKSIZE ? X_STACKSIZE : PTHREAD_STACK_MIN);
#ifdef PTHREAD_SCOPE_PROCESS
pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS);
#endif
sigfillset (&fullsigset);
pthread_sigmask (SIG_SETMASK, &fullsigset, &oldsigset);
retval = pthread_create (tid, &attr, proc, arg) == 0;
pthread_sigmask (SIG_SETMASK, &oldsigset, 0);
pthread_attr_destroy (&attr);
return retval;
}
#define respipe_read(a,b,c) read ((a), (b), (c))
#define respipe_write(a,b,c) write ((a), (b), (c))
#define respipe_close(a) close ((a))
#endif
#endif

302
deps/libev/Changes vendored
View File

@@ -1,302 +0,0 @@
Revision history for libev, a high-performance and full-featured event loop.
3.9 Thu Dec 31 07:59:59 CET 2009
- signalfd is no longer used by default and has to be requested
explicitly - this means that easy to catch bugs become hard to
catch race conditions, but the users have spoken.
- point out the unspecified signal mask in the documentation, and
that this is a race condition regardless of EV_SIGNALFD.
- backport inotify code to C89.
- inotify file descriptors could leak into child processes.
- ev_stat watchers could keep an errornous extra ref on the loop,
preventing exit when unregistering all watchers (testcases
provided by ry@tinyclouds.org).
- implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
symbols to make it easier for apps to do their own fd management.
- support EV_IDLE_ENABLE being disabled in ev++.h
(patch by Didier Spezia).
- take advantage of inotify_init1, if available, to set cloexec/nonblock
on fd creation, to avoid races.
- the signal handling pipe wasn't always initialised under windows
(analysed by lekma).
- changed minimum glibc requirement from glibc 2.9 to 2.7, for
signalfd.
- add missing string.h include (Denis F. Latypoff).
- only replace ev_stat.prev when we detect an actual difference,
so prev is (almost) always different to attr. this might
have caused the probems with 04_stat.t.
- add ev::timer->remaining () method to C++ API.
3.8 Sun Aug 9 14:30:45 CEST 2009
- incompatible change: do not necessarily reset signal handler
to SIG_DFL when a sighandler is stopped.
- ev_default_destroy did not properly free or zero some members,
potentially causing crashes and memory corruption on repated
ev_default_destroy/ev_default_loop calls.
- take advantage of signalfd on GNU/Linux systems.
- document that the signal mask might be in an unspecified
state when using libev's signal handling.
- take advantage of some GNU/Linux calls to set cloexec/nonblock
on fd creation, to avoid race conditions.
3.7 Fri Jul 17 16:36:32 CEST 2009
- ev_unloop and ev_loop wrongly used a global variable to exit loops,
instead of using a per-loop variable (bug caught by accident...).
- the ev_set_io_collect_interval interpretation has changed.
- add new functionality: ev_set_userdata, ev_userdata,
ev_set_invoke_pending_cb, ev_set_loop_release_cb,
ev_invoke_pending, ev_pending_count, together with a long example
about thread locking.
- add ev_timer_remaining (as requested by Denis F. Latypoff).
- add ev_loop_depth.
- calling ev_unloop in fork/prepare watchers will no longer poll
for new events.
- Denis F. Latypoff corrected many typos in example code snippets.
- honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double-
check that the syscall number is available before trying to
use it (reported by ry@tinyclouds).
- use GetSystemTimeAsFileTime instead of _timeb on windows, for
slightly higher accuracy.
- properly declare ev_loop_verify and ev_now_update even when
!EV_MULTIPLICITY.
- do not compile in any priority code when EV_MAXPRI == EV_MINPRI.
- support EV_MINIMAL==2 for a reduced API.
- actually 0-initialise struct sigaction when installing signals.
- add section on hibernate and stopped processes to ev_timer docs.
3.6 Tue Apr 28 02:49:30 CEST 2009
- multiple timers becoming ready within an event loop iteration
will be invoked in the "correct" order now.
- do not leave the event loop early just because we have no active
watchers, fixing a problem when embedding a kqueue loop
that has active kernel events but no registered watchers
(reported by blacksand blacksand).
- correctly zero the idx values for arrays, so destroying and
reinitialising the default loop actually works (patch by
Malek Hadj-Ali).
- implement ev_suspend and ev_resume.
- new EV_CUSTOM revents flag for use by applications.
- add documentation section about priorites.
- add a glossary to the dcoumentation.
- extend the ev_fork description slightly.
- optimize a jump out of call_pending.
3.53 Sun Feb 15 02:38:20 CET 2009
- fix a bug in event pipe creation on win32 that would cause a
failed assertion on event loop creation (patch by Malek Hadj-Ali).
- probe for CLOCK_REALTIME support at runtime as well and fall
back to gettimeofday if there is an error, to support older
operating systems with newer header files/libraries.
- prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL
(default most everywhere), otherwise not.
3.52 Wed Jan 7 21:43:02 CET 2009
- fix compilation of select backend in fd_set mode when NFDBITS is
missing (to get it to compile on QNX, reported by Rodrigo Campos).
- better select-nfds handling when select backend is in fd_set mode.
- diagnose fd_set overruns when select backend is in fd_set mode.
- due to a thinko, instead of disabling everything but
select on the borked OS X platform, everything but select was
allowed (reported by Emanuele Giaquinta).
- actually verify that local and remote port are matching in
libev's socketpair emulation, which makes denial-of-service
attacks harder (but not impossible - it's windows). Make sure
it even works under vista, which thinks that getpeer/sockname
should return fantasy port numbers.
- include "libev" in all assertion messages for potentially
clearer diagnostics.
- event_get_version (libevent compatibility) returned
a useless string instead of the expected version string
(patch by W.C.A. Wijngaards).
3.51 Wed Dec 24 23:00:11 CET 2008
- fix a bug where an inotify watcher was added twice, causing
freezes on hash collisions (reported and analysed by Graham Leggett).
- new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use
a direct syscall - slower, but no dependency on librt et al.
- assume negative return values != -1 signals success of port_getn
(http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52)
(no known failure reports, but it doesn't hurt).
- fork detection in ev_embed now stops and restarts the watcher
automatically.
- EXPERIMENTAL: default the method to operator () in ev++.h,
to make it nicer to use functors (requested by Benedek László).
- fixed const object callbacks in ev++.h.
- replaced loop_ref argument of watcher.set (loop) by a direct
ev_loop * in ev++.h, to avoid clashes with functor patch.
- do not try to watch the empty string via inotify.
- inotify watchers could be leaked under certain circumstances.
- OS X 10.5 is actually even more broken than earlier versions,
so fall back to select on that piece of garbage.
- fixed some weirdness in the ev_embed documentation.
3.49 Wed Nov 19 11:26:53 CET 2008
- ev_stat watchers will now use inotify as a mere hint on
kernels <2.6.25, or if the filesystem is not in the
"known to be good" list.
- better mingw32 compatibility (it's not as borked as native win32)
(analysed by Roger Pack).
- include stdio.h in the example program, as too many people are
confused by the weird C language otherwise. I guess the next thing
I get told is that the "..." ellipses in the examples don't compile
with their C compiler.
3.48 Thu Oct 30 09:02:37 CET 2008
- further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll
backend by assuming the kernel event mask hasn't changed if
ADD fails with EEXIST.
- work around spurious event notification bugs in epoll by using
a 32-bit generation counter. recreate kernel state if we receive
spurious notifications or unwanted events. this is very costly,
but I didn't come up with this horrible design.
- use memset to initialise most arrays now and do away with the
init functions.
- expand time-out strategies into a "Be smart about timeouts" section.
- drop the "struct" from all ev_watcher declarations in the
documentation and did other clarifications (yeah, it was a mistake
to have a struct AND a function called ev_loop).
- fix a bug where ev_default would not initialise the default
loop again after it was destroyed with ev_default_destroy.
- rename syserr to ev_syserr to avoid name clashes when embedding,
do similar changes for event.c.
3.45 Tue Oct 21 21:59:26 CEST 2008
- disable inotify usage on linux <2.6.25, as it is broken
(reported by Yoann Vandoorselaere).
- ev_stat errornously would try to add inotify watchers
even when inotify wasn't available (this should only
have a performance impact).
- ev_once now passes both timeout and io to the callback if both
occur concurrently, instead of giving timeouts precedence.
- disable EV_USE_INOTIFY when sys/inotify.h is too old.
3.44 Mon Sep 29 05:18:39 CEST 2008
- embed watchers now automatically invoke ev_loop_fork on the
embedded loop when the parent loop forks.
- new function: ev_now_update (loop).
- verify_watcher was not marked static.
- improve the "associating..." manpage section.
- documentation tweaks here and there.
3.43 Sun Jul 6 05:34:41 CEST 2008
- include more include files on windows to get struct _stati64
(reported by Chris Hulbert, but doesn't quite fix his issue).
- add missing #include <io.h> in ev.c on windows (reported by
Matt Tolton).
3.42 Tue Jun 17 12:12:07 CEST 2008
- work around yet another windows bug: FD_SET actually adds fd's
multiple times to the fd_*SET*, despite official MSN docs claiming
otherwise. Reported and well-analysed by Matt Tolton.
- define NFDBITS to 0 when EV_SELECT_IS_WINSOCKET to make it compile
(reported any analysed by Chris Hulbert).
- fix a bug in ev_ebadf (this function is only used to catch
programming errors in the libev user). reported by Matt Tolton.
- fix a bug in fd_intern on win32 (could lead to compile errors
under some circumstances, but would work correctly if it compiles).
reported by Matt Tolton.
- (try to) work around missing lstat on windows.
- pass in the write fd set as except fd set under windows. windows
is so uncontrollably lame that it requires this. this means that
switching off oobinline is not supported (but tcp/ip doesn't
have oob, so that would be stupid anyways.
- use posix module symbol to auto-detect monotonic clock presence
and some other default values.
3.41 Fri May 23 18:42:54 CEST 2008
- work around an obscure bug in winsocket select: if you
provide only empty fd sets then select returns WSAEINVAL. how sucky.
- improve timer scheduling stability and reduce use of time_epsilon.
- use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces
codesize and makes for better cache-efficiency.
- use 3-based 4-heap for !EV_MINIMAL. this makes better use
of cpu cache lines and gives better growth behaviour than
2-based heaps.
- cache timestamp within heap for !EV_MINIMAL, to avoid random
memory accesses.
- document/add EV_USE_4HEAP and EV_HEAP_CACHE_AT.
- fix a potential aliasing issue in ev_timer_again.
- add/document ev_periodic_at, retract direct access to ->at.
- improve ev_stat docs.
- add portability requirements section.
- fix manpage headers etc.
- normalise WSA error codes to lower range on windows.
- add consistency check code that can be called automatically
or on demand to check for internal structures (ev_loop_verify).
3.31 Wed Apr 16 20:45:04 CEST 2008
- added last minute fix for ev_poll.c by Brandon Black.
3.3 Wed Apr 16 19:04:10 CEST 2008
- event_base_loopexit should return 0 on success
(W.C.A. Wijngaards).
- added linux eventfd support.
- try to autodetect epoll and inotify support
by libc header version if not using autoconf.
- new symbols: EV_DEFAULT_UC and EV_DEFAULT_UC_.
- declare functions defined in ev.h as inline if
C99 or gcc are available.
- enable inlining with gcc versions 2 and 3.
- work around broken poll implementations potentially
not clearing revents field in ev_poll (Brandon Black)
(no such systems are known at this time).
- work around a bug in realloc on openbsd and darwin,
also makes the errornous valgrind complaints
go away (noted by various people).
- fix ev_async_pending, add c++ wrapper for ev_async
(based on patch sent by Johannes Deisenhofer.
- add sensible set method to ev::embed.
- made integer constants type int in ev.h.
3.2 Wed Apr 2 17:11:19 CEST 2008
- fix a 64 bit overflow issue in the select backend,
by using fd_mask instead of int for the mask.
- rename internal sighandler to avoid clash with very old perls.
- entering ev_loop will not clear the ONESHOT or NONBLOCKING
flags of any outer loops anymore.
- add ev_async_pending.
3.1 Thu Mar 13 13:45:22 CET 2008
- implement ev_async watchers.
- only initialise signal pipe on demand.
- make use of sig_atomic_t configurable.
- improved documentation.
3.0 Mon Jan 28 13:14:47 CET 2008
- API/ABI bump to version 3.0.
- ev++.h includes "ev.h" by default now, not <ev.h>.
- slightly improved documentation.
- speed up signal detection after a fork.
- only optionally return trace status changed in ev_child
watchers.
- experimental (and undocumented) loop wrappers for ev++.h.
2.01 Tue Dec 25 08:04:41 CET 2007
- separate Changes file.
- fix ev_path_set => ev_stat_set typo.
- remove event_compat.h from the libev tarball.
- change how include files are found.
- doc updates.
- update licenses, explicitly allow for GPL relicensing.
2.0 Sat Dec 22 17:47:03 CET 2007
- new ev_sleep, ev_set_(io|timeout)_collect_interval.
- removed epoll from embeddable fd set.
- fix embed watchers.
- renamed ev_embed.loop to other.
- added exported Symbol tables.
- undefine member wrapper macros at the end of ev.c.
- respect EV_H in ev++.h.
1.86 Tue Dec 18 02:36:57 CET 2007
- fix memleak on loop destroy (not relevant for perl).
1.85 Fri Dec 14 20:32:40 CET 2007
- fix some aliasing issues w.r.t. timers and periodics
(not relevant for perl).
(for historic versions refer to EV/Changes, found in the Perl interface)
0.1 Wed Oct 31 21:31:48 CET 2007
- original version; hacked together in <24h.

View File

@@ -1,18 +0,0 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
VERSION_INFO = 3:0
EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
ev_vars.h ev_wrap.h \
ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \
ev.3 ev.pod
man_MANS = ev.3
include_HEADERS = ev.h ev++.h event.h
lib_LTLIBRARIES = libev.la
libev_la_SOURCES = ev.c event.c
libev_la_LDFLAGS = -version-info $(VERSION_INFO)

View File

@@ -1,3 +0,0 @@
This file is now included in the main libev documentation, see
http://cvs.schmorp.de/libev/ev.html

72
deps/libev/Symbols.ev vendored
View File

@@ -1,72 +0,0 @@
ev_async_send
ev_async_start
ev_async_stop
ev_backend
ev_check_start
ev_check_stop
ev_child_start
ev_child_stop
ev_clear_pending
ev_default_destroy
ev_default_fork
ev_default_loop_init
ev_default_loop_ptr
ev_embed_start
ev_embed_stop
ev_embed_sweep
ev_embeddable_backends
ev_feed_event
ev_feed_fd_event
ev_feed_signal_event
ev_fork_start
ev_fork_stop
ev_idle_start
ev_idle_stop
ev_invoke
ev_invoke_pending
ev_io_start
ev_io_stop
ev_loop
ev_loop_count
ev_loop_depth
ev_loop_destroy
ev_loop_fork
ev_loop_new
ev_loop_verify
ev_now
ev_now_update
ev_once
ev_pending_count
ev_periodic_again
ev_periodic_start
ev_periodic_stop
ev_prepare_start
ev_prepare_stop
ev_recommended_backends
ev_ref
ev_resume
ev_set_allocator
ev_set_invoke_pending_cb
ev_set_io_collect_interval
ev_set_loop_release_cb
ev_set_syserr_cb
ev_set_timeout_collect_interval
ev_set_userdata
ev_signal_start
ev_signal_stop
ev_sleep
ev_stat_start
ev_stat_stat
ev_stat_stop
ev_supported_backends
ev_suspend
ev_time
ev_timer_again
ev_timer_remaining
ev_timer_start
ev_timer_stop
ev_unloop
ev_unref
ev_userdata
ev_version_major
ev_version_minor

View File

@@ -1,21 +0,0 @@
event_active
event_add
event_base_dispatch
event_base_free
event_base_loop
event_base_loopexit
event_base_once
event_base_priority_init
event_base_set
event_del
event_dispatch
event_get_method
event_get_version
event_init
event_loop
event_loopexit
event_once
event_pending
event_priority_init
event_priority_set
event_set

View File

@@ -1,6 +0,0 @@
#!/bin/sh
libtoolize --force
automake --add-missing
autoreconf

View File

@@ -1,18 +0,0 @@
AC_INIT
AC_CONFIG_SRCDIR([ev_epoll.c])
AM_INIT_AUTOMAKE(libev,3.9) dnl also update ev.h!
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
AC_PROG_INSTALL
AC_PROG_LIBTOOL
if test "x$GCC" = xyes ; then
CFLAGS="$CFLAGS -O3"
fi
m4_include([libev.m4])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

705
deps/libev/ev.h vendored
View File

@@ -1,705 +0,0 @@
/*
* libev native API header
*
* Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU General Public License ("GPL") version 2 or any later version,
* in which case the provisions of the GPL are applicable instead of
* the above. If you wish to allow the use of your version of this file
* only under the terms of the GPL and not to allow others to use your
* version of this file under the BSD license, indicate your decision
* by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete the
* provisions above, a recipient may use your version of this file under
* either the BSD or the GPL.
*/
#ifndef EV_H_
#define EV_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef double ev_tstamp;
/* these priorities are inclusive, higher priorities will be called earlier */
#ifndef EV_MINPRI
# define EV_MINPRI -2
#endif
#ifndef EV_MAXPRI
# define EV_MAXPRI +2
#endif
#ifndef EV_MULTIPLICITY
# define EV_MULTIPLICITY 1
#endif
#ifndef EV_PERIODIC_ENABLE
# define EV_PERIODIC_ENABLE 1
#endif
#ifndef EV_STAT_ENABLE
# define EV_STAT_ENABLE 1
#endif
#ifndef EV_IDLE_ENABLE
# define EV_IDLE_ENABLE 1
#endif
#ifndef EV_FORK_ENABLE
# define EV_FORK_ENABLE 1
#endif
#ifndef EV_EMBED_ENABLE
# define EV_EMBED_ENABLE 1
#endif
#ifndef EV_ASYNC_ENABLE
# define EV_ASYNC_ENABLE 1
#endif
#ifndef EV_WALK_ENABLE
# define EV_WALK_ENABLE 0 /* not yet */
#endif
#ifndef EV_ATOMIC_T
# include <signal.h>
# define EV_ATOMIC_T sig_atomic_t volatile
#endif
/*****************************************************************************/
#if EV_STAT_ENABLE
# ifdef _WIN32
# include <time.h>
# include <sys/types.h>
# endif
# include <sys/stat.h>
#endif
/* support multiple event loops? */
#if EV_MULTIPLICITY
struct ev_loop;
# define EV_P struct ev_loop *loop
# define EV_P_ EV_P,
# define EV_A loop
# define EV_A_ EV_A,
# define EV_DEFAULT_UC ev_default_loop_uc ()
# define EV_DEFAULT_UC_ EV_DEFAULT_UC,
# define EV_DEFAULT ev_default_loop (0)
# define EV_DEFAULT_ EV_DEFAULT,
#else
# define EV_P void
# define EV_P_
# define EV_A
# define EV_A_
# define EV_DEFAULT
# define EV_DEFAULT_
# define EV_DEFAULT_UC
# define EV_DEFAULT_UC_
# undef EV_EMBED_ENABLE
#endif
#if __STDC_VERSION__ >= 199901L || __GNUC__ >= 3
# define EV_INLINE static inline
#else
# define EV_INLINE static
#endif
/*****************************************************************************/
/* eventmask, revents, events... */
#define EV_UNDEF -1 /* guaranteed to be invalid */
#define EV_NONE 0x00 /* no events */
#define EV_READ 0x01 /* ev_io detected read will not block */
#define EV_WRITE 0x02 /* ev_io detected write will not block */
#define EV__IOFDSET 0x80 /* internal use only */
#define EV_IO EV_READ /* alias for type-detection */
#define EV_TIMEOUT 0x00000100 /* timer timed out */
#define EV_TIMER EV_TIMEOUT /* alias for type-detection */
#define EV_PERIODIC 0x00000200 /* periodic timer timed out */
#define EV_SIGNAL 0x00000400 /* signal was received */
#define EV_CHILD 0x00000800 /* child/pid had status change */
#define EV_STAT 0x00001000 /* stat data changed */
#define EV_IDLE 0x00002000 /* event loop is idling */
#define EV_PREPARE 0x00004000 /* event loop about to poll */
#define EV_CHECK 0x00008000 /* event loop finished poll */
#define EV_EMBED 0x00010000 /* embedded event loop needs sweep */
#define EV_FORK 0x00020000 /* event loop resumed in child */
#define EV_ASYNC 0x00040000 /* async intra-loop signal */
#define EV_CUSTOM 0x01000000 /* for use by user code */
#define EV_ERROR 0x80000000 /* sent when an error occurs */
/* can be used to add custom fields to all watchers, while losing binary compatibility */
#ifndef EV_COMMON
# define EV_COMMON void *data;
#endif
#ifndef EV_PROTOTYPES
# define EV_PROTOTYPES 1
#endif
#define EV_VERSION_MAJOR 3
#define EV_VERSION_MINOR 9
#ifndef EV_CB_DECLARE
# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents);
#endif
#ifndef EV_CB_INVOKE
# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents))
#endif
/*
* struct member types:
* private: you may look at them, but not change them,
* and they might not mean anything to you.
* ro: can be read anytime, but only changed when the watcher isn't active.
* rw: can be read and modified anytime, even when the watcher is active.
*
* some internal details that might be helpful for debugging:
*
* active is either 0, which means the watcher is not active,
* or the array index of the watcher (periodics, timers)
* or the array index + 1 (most other watchers)
* or simply 1 for watchers that aren't in some array.
* pending is either 0, in which case the watcher isn't,
* or the array index + 1 in the pendings array.
*/
#if EV_MINPRI == EV_MAXPRI
# define EV_DECL_PRIORITY
#else
# define EV_DECL_PRIORITY int priority;
#endif
/* shared by all watchers */
#define EV_WATCHER(type) \
int active; /* private */ \
int pending; /* private */ \
EV_DECL_PRIORITY /* private */ \
EV_COMMON /* rw */ \
EV_CB_DECLARE (type) /* private */
#define EV_WATCHER_LIST(type) \
EV_WATCHER (type) \
struct ev_watcher_list *next; /* private */
#define EV_WATCHER_TIME(type) \
EV_WATCHER (type) \
ev_tstamp at; /* private */
/* base class, nothing to see here unless you subclass */
typedef struct ev_watcher
{
EV_WATCHER (ev_watcher)
} ev_watcher;
/* base class, nothing to see here unless you subclass */
typedef struct ev_watcher_list
{
EV_WATCHER_LIST (ev_watcher_list)
} ev_watcher_list;
/* base class, nothing to see here unless you subclass */
typedef struct ev_watcher_time
{
EV_WATCHER_TIME (ev_watcher_time)
} ev_watcher_time;
/* invoked when fd is either EV_READable or EV_WRITEable */
/* revent EV_READ, EV_WRITE */
typedef struct ev_io
{
EV_WATCHER_LIST (ev_io)
int fd; /* ro */
int events; /* ro */
} ev_io;
/* invoked after a specific time, repeatable (based on monotonic clock) */
/* revent EV_TIMEOUT */
typedef struct ev_timer
{
EV_WATCHER_TIME (ev_timer)
ev_tstamp repeat; /* rw */
} ev_timer;
/* invoked at some specific time, possibly repeating at regular intervals (based on UTC) */
/* revent EV_PERIODIC */
typedef struct ev_periodic
{
EV_WATCHER_TIME (ev_periodic)
ev_tstamp offset; /* rw */
ev_tstamp interval; /* rw */
ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now); /* rw */
} ev_periodic;
/* invoked when the given signal has been received */
/* revent EV_SIGNAL */
typedef struct ev_signal
{
EV_WATCHER_LIST (ev_signal)
int signum; /* ro */
} ev_signal;
/* invoked when sigchld is received and waitpid indicates the given pid */
/* revent EV_CHILD */
/* does not support priorities */
typedef struct ev_child
{
EV_WATCHER_LIST (ev_child)
int flags; /* private */
int pid; /* ro */
int rpid; /* rw, holds the received pid */
int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */
} ev_child;
#if EV_STAT_ENABLE
/* st_nlink = 0 means missing file or other error */
# ifdef _WIN32
typedef struct _stati64 ev_statdata;
# else
typedef struct stat ev_statdata;
# endif
/* invoked each time the stat data changes for a given path */
/* revent EV_STAT */
typedef struct ev_stat
{
EV_WATCHER_LIST (ev_stat)
ev_timer timer; /* private */
ev_tstamp interval; /* ro */
const char *path; /* ro */
ev_statdata prev; /* ro */
ev_statdata attr; /* ro */
int wd; /* wd for inotify, fd for kqueue */
} ev_stat;
#endif
#if EV_IDLE_ENABLE
/* invoked when the nothing else needs to be done, keeps the process from blocking */
/* revent EV_IDLE */
typedef struct ev_idle
{
EV_WATCHER (ev_idle)
} ev_idle;
#endif
/* invoked for each run of the mainloop, just before the blocking call */
/* you can still change events in any way you like */
/* revent EV_PREPARE */
typedef struct ev_prepare
{
EV_WATCHER (ev_prepare)
} ev_prepare;
/* invoked for each run of the mainloop, just after the blocking call */
/* revent EV_CHECK */
typedef struct ev_check
{
EV_WATCHER (ev_check)
} ev_check;
#if EV_FORK_ENABLE
/* the callback gets invoked before check in the child process when a fork was detected */
typedef struct ev_fork
{
EV_WATCHER (ev_fork)
} ev_fork;
#endif
#if EV_EMBED_ENABLE
/* used to embed an event loop inside another */
/* the callback gets invoked when the event loop has handled events, and can be 0 */
typedef struct ev_embed
{
EV_WATCHER (ev_embed)
struct ev_loop *other; /* ro */
ev_io io; /* private */
ev_prepare prepare; /* private */
ev_check check; /* unused */
ev_timer timer; /* unused */
ev_periodic periodic; /* unused */
ev_idle idle; /* unused */
ev_fork fork; /* private */
} ev_embed;
#endif
#if EV_ASYNC_ENABLE
/* invoked when somebody calls ev_async_send on the watcher */
/* revent EV_ASYNC */
typedef struct ev_async
{
EV_WATCHER (ev_async)
EV_ATOMIC_T sent; /* private */
} ev_async;
# define ev_async_pending(w) (+(w)->sent)
#endif
/* the presence of this union forces similar struct layout */
union ev_any_watcher
{
struct ev_watcher w;
struct ev_watcher_list wl;
struct ev_io io;
struct ev_timer timer;
struct ev_periodic periodic;
struct ev_signal signal;
struct ev_child child;
#if EV_STAT_ENABLE
struct ev_stat stat;
#endif
#if EV_IDLE_ENABLE
struct ev_idle idle;
#endif
struct ev_prepare prepare;
struct ev_check check;
#if EV_FORK_ENABLE
struct ev_fork fork;
#endif
#if EV_EMBED_ENABLE
struct ev_embed embed;
#endif
#if EV_ASYNC_ENABLE
struct ev_async async;
#endif
};
/* bits for ev_default_loop and ev_loop_new */
/* the default */
#define EVFLAG_AUTO 0x00000000U /* not quite a mask */
/* flag bits */
#define EVFLAG_NOENV 0x01000000U /* do NOT consult environment */
#define EVFLAG_FORKCHECK 0x02000000U /* check for a fork in each iteration */
/* debugging/feature disable */
#define EVFLAG_NOINOTIFY 0x00100000U /* do not attempt to use inotify */
#define EVFLAG_NOSIGFD 0 /* compatibility to pre-3.9 */
#define EVFLAG_SIGNALFD 0x00200000U /* attempt to use signalfd */
/* method bits to be ored together */
#define EVBACKEND_SELECT 0x00000001U /* about anywhere */
#define EVBACKEND_POLL 0x00000002U /* !win */
#define EVBACKEND_EPOLL 0x00000004U /* linux */
#define EVBACKEND_KQUEUE 0x00000008U /* bsd */
#define EVBACKEND_DEVPOLL 0x00000010U /* solaris 8 */ /* NYI */
#define EVBACKEND_PORT 0x00000020U /* solaris 10 */
#define EVBACKEND_ALL 0x0000003FU
#if EV_PROTOTYPES
int ev_version_major (void);
int ev_version_minor (void);
unsigned int ev_supported_backends (void);
unsigned int ev_recommended_backends (void);
unsigned int ev_embeddable_backends (void);
ev_tstamp ev_time (void);
void ev_sleep (ev_tstamp delay); /* sleep for a while */
/* Sets the allocation function to use, works like realloc.
* It is used to allocate and free memory.
* If it returns zero when memory needs to be allocated, the library might abort
* or take some potentially destructive action.
* The default is your system realloc function.
*/
void ev_set_allocator (void *(*cb)(void *ptr, long size));
/* set the callback function to call on a
* retryable syscall error
* (such as failed select, poll, epoll_wait)
*/
void ev_set_syserr_cb (void (*cb)(const char *msg));
#if EV_MULTIPLICITY
EV_INLINE struct ev_loop *
ev_default_loop_uc (void)
{
extern struct ev_loop *ev_default_loop_ptr;
return ev_default_loop_ptr;
}
/* the default loop is the only one that handles signals and child watchers */
/* you can call this as often as you like */
EV_INLINE struct ev_loop *
ev_default_loop (unsigned int flags)
{
struct ev_loop *loop = ev_default_loop_uc ();
if (!loop)
{
extern struct ev_loop *ev_default_loop_init (unsigned int flags);
loop = ev_default_loop_init (flags);
}
return loop;
}
/* create and destroy alternative loops that don't handle signals */
struct ev_loop *ev_loop_new (unsigned int flags);
void ev_loop_destroy (EV_P);
void ev_loop_fork (EV_P);
ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
#else
int ev_default_loop (unsigned int flags); /* returns true when successful */
EV_INLINE ev_tstamp
ev_now (void)
{
extern ev_tstamp ev_rt_now;
return ev_rt_now;
}
#endif /* multiplicity */
EV_INLINE int
ev_is_default_loop (EV_P)
{
#if EV_MULTIPLICITY
extern struct ev_loop *ev_default_loop_ptr;
return !!(EV_A == ev_default_loop_ptr);
#else
return 1;
#endif
}
void ev_default_destroy (void); /* destroy the default loop */
/* this needs to be called after fork, to duplicate the default loop */
/* if you create alternative loops you have to call ev_loop_fork on them */
/* you can call it in either the parent or the child */
/* you can actually call it at any time, anywhere :) */
void ev_default_fork (void);
unsigned int ev_backend (EV_P); /* backend in use by loop */
void ev_now_update (EV_P); /* update event loop time */
#if EV_WALK_ENABLE
/* walk (almost) all watchers in the loop of a given type, invoking the */
/* callback on every such watcher. The callback might stop the watcher, */
/* but do nothing else with the loop */
void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w));
#endif
#endif /* prototypes */
#define EVLOOP_NONBLOCK 1 /* do not block/wait */
#define EVLOOP_ONESHOT 2 /* block *once* only */
#define EVUNLOOP_CANCEL 0 /* undo unloop */
#define EVUNLOOP_ONE 1 /* unloop once */
#define EVUNLOOP_ALL 2 /* unloop all loops */
#if EV_PROTOTYPES
void ev_loop (EV_P_ int flags);
void ev_unloop (EV_P_ int how); /* set to 1 to break out of event loop, set to 2 to break out of all event loops */
/*
* ref/unref can be used to add or remove a refcount on the mainloop. every watcher
* keeps one reference. if you have a long-running watcher you never unregister that
* should not keep ev_loop from running, unref() after starting, and ref() before stopping.
*/
void ev_ref (EV_P);
void ev_unref (EV_P);
/*
* convenience function, wait for a single event, without registering an event watcher
* if timeout is < 0, do wait indefinitely
*/
void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
# if EV_MINIMAL < 2
unsigned int ev_loop_count (EV_P); /* number of loop iterations */
unsigned int ev_loop_depth (EV_P); /* #ev_loop enters - #ev_loop leaves */
void ev_loop_verify (EV_P); /* abort if loop data corrupted */
void ev_set_io_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
/* advanced stuff for threading etc. support, see docs */
void ev_set_userdata (EV_P_ void *data);
void *ev_userdata (EV_P);
void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P));
void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P));
unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
void ev_invoke_pending (EV_P); /* invoke all pending watchers */
/*
* stop/start the timer handling.
*/
void ev_suspend (EV_P);
void ev_resume (EV_P);
#endif
#endif
/* these may evaluate ev multiple times, and the other arguments at most once */
/* either use ev_init + ev_TYPE_set, or the ev_TYPE_init macro, below, to first initialise a watcher */
#define ev_init(ev,cb_) do { \
((ev_watcher *)(void *)(ev))->active = \
((ev_watcher *)(void *)(ev))->pending = 0; \
ev_set_priority ((ev), 0); \
ev_set_cb ((ev), cb_); \
} while (0)
#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0)
#define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0)
#define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0)
#define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0)
#define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0)
#define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0)
#define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */
#define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */
#define ev_check_set(ev) /* nop, yes, this is a serious in-joke */
#define ev_embed_set(ev,other_) do { (ev)->other = (other_); } while (0)
#define ev_fork_set(ev) /* nop, yes, this is a serious in-joke */
#define ev_async_set(ev) do { (ev)->sent = 0; } while (0)
#define ev_io_init(ev,cb,fd,events) do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0)
#define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0)
#define ev_periodic_init(ev,cb,ofs,ival,rcb) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(ofs),(ival),(rcb)); } while (0)
#define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0)
#define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0)
#define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0)
#define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0)
#define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0)
#define ev_check_init(ev,cb) do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0)
#define ev_embed_init(ev,cb,other) do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0)
#define ev_fork_init(ev,cb) do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0)
#define ev_async_init(ev,cb) do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0)
#define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */
#define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */
#define ev_cb(ev) (ev)->cb /* rw */
#if EV_MINPRI == EV_MAXPRI
# define ev_priority(ev) ((ev), EV_MINPRI)
# define ev_set_priority(ev,pri) ((ev), (pri))
#else
# define ev_priority(ev) (+(((ev_watcher *)(void *)(ev))->priority))
# define ev_set_priority(ev,pri) ( (ev_watcher *)(void *)(ev))->priority = (pri)
#endif
#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at)
#ifndef ev_set_cb
# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)
#endif
/* stopping (enabling, adding) a watcher does nothing if it is already running */
/* stopping (disabling, deleting) a watcher does nothing unless its already running */
#if EV_PROTOTYPES
/* feeds an event into a watcher as if the event actually occured */
/* accepts any ev_watcher type */
void ev_feed_event (EV_P_ void *w, int revents);
void ev_feed_fd_event (EV_P_ int fd, int revents);
void ev_feed_signal_event (EV_P_ int signum);
void ev_invoke (EV_P_ void *w, int revents);
int ev_clear_pending (EV_P_ void *w);
void ev_io_start (EV_P_ ev_io *w);
void ev_io_stop (EV_P_ ev_io *w);
void ev_timer_start (EV_P_ ev_timer *w);
void ev_timer_stop (EV_P_ ev_timer *w);
/* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */
void ev_timer_again (EV_P_ ev_timer *w);
/* return remaining time */
ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
#if EV_PERIODIC_ENABLE
void ev_periodic_start (EV_P_ ev_periodic *w);
void ev_periodic_stop (EV_P_ ev_periodic *w);
void ev_periodic_again (EV_P_ ev_periodic *w);
#endif
/* only supported in the default loop */
void ev_signal_start (EV_P_ ev_signal *w);
void ev_signal_stop (EV_P_ ev_signal *w);
/* only supported in the default loop */
void ev_child_start (EV_P_ ev_child *w);
void ev_child_stop (EV_P_ ev_child *w);
# if EV_STAT_ENABLE
void ev_stat_start (EV_P_ ev_stat *w);
void ev_stat_stop (EV_P_ ev_stat *w);
void ev_stat_stat (EV_P_ ev_stat *w);
# endif
# if EV_IDLE_ENABLE
void ev_idle_start (EV_P_ ev_idle *w);
void ev_idle_stop (EV_P_ ev_idle *w);
# endif
void ev_prepare_start (EV_P_ ev_prepare *w);
void ev_prepare_stop (EV_P_ ev_prepare *w);
void ev_check_start (EV_P_ ev_check *w);
void ev_check_stop (EV_P_ ev_check *w);
# if EV_FORK_ENABLE
void ev_fork_start (EV_P_ ev_fork *w);
void ev_fork_stop (EV_P_ ev_fork *w);
# endif
# if EV_EMBED_ENABLE
/* only supported when loop to be embedded is in fact embeddable */
void ev_embed_start (EV_P_ ev_embed *w);
void ev_embed_stop (EV_P_ ev_embed *w);
void ev_embed_sweep (EV_P_ ev_embed *w);
# endif
# if EV_ASYNC_ENABLE
void ev_async_start (EV_P_ ev_async *w);
void ev_async_stop (EV_P_ ev_async *w);
void ev_async_send (EV_P_ ev_async *w);
# endif
#endif
#ifdef __cplusplus
}
#endif
#endif

165
deps/libev/ev_port.c vendored
View File

@@ -1,165 +0,0 @@
/*
* libev solaris event port backend
*
* Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU General Public License ("GPL") version 2 or any later version,
* in which case the provisions of the GPL are applicable instead of
* the above. If you wish to allow the use of your version of this file
* only under the terms of the GPL and not to allow others to use your
* version of this file under the BSD license, indicate your decision
* by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete the
* provisions above, a recipient may use your version of this file under
* either the BSD or the GPL.
*/
#include <sys/types.h>
#include <sys/time.h>
#include <poll.h>
#include <port.h>
#include <string.h>
#include <errno.h>
void inline_speed
port_associate_and_check (EV_P_ int fd, int ev)
{
if (0 >
port_associate (
backend_fd, PORT_SOURCE_FD, fd,
(ev & EV_READ ? POLLIN : 0)
| (ev & EV_WRITE ? POLLOUT : 0),
0
)
)
{
if (errno == EBADFD)
fd_kill (EV_A_ fd);
else
ev_syserr ("(libev) port_associate");
}
}
static void
port_modify (EV_P_ int fd, int oev, int nev)
{
/* we need to reassociate no matter what, as closes are
* once more silently being discarded.
*/
if (!nev)
{
if (oev)
port_dissociate (backend_fd, PORT_SOURCE_FD, fd);
}
else
port_associate_and_check (EV_A_ fd, nev);
}
static void
port_poll (EV_P_ ev_tstamp timeout)
{
int res, i;
struct timespec ts;
uint_t nget = 1;
EV_RELEASE_CB;
ts.tv_sec = (time_t)timeout;
ts.tv_nsec = (long)(timeout - (ev_tstamp)ts.tv_sec) * 1e9;
res = port_getn (backend_fd, port_events, port_eventmax, &nget, &ts);
EV_ACQUIRE_CB;
if (res == -1)
{
if (errno != EINTR && errno != ETIME)
ev_syserr ("(libev) port_getn (see http://bugs.opensolaris.org/view_bug.do?bug_id=6268715, try LIBEV_FLAGS=3 env variable)");
return;
}
for (i = 0; i < nget; ++i)
{
if (port_events [i].portev_source == PORT_SOURCE_FD)
{
int fd = port_events [i].portev_object;
fd_event (
EV_A_
fd,
(port_events [i].portev_events & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0)
| (port_events [i].portev_events & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
);
port_associate_and_check (EV_A_ fd, anfds [fd].events);
}
}
if (expect_false (nget == port_eventmax))
{
ev_free (port_events);
port_eventmax = array_nextsize (sizeof (port_event_t), port_eventmax, port_eventmax + 1);
port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
}
}
int inline_size
port_init (EV_P_ int flags)
{
/* Initalize the kernel queue */
if ((backend_fd = port_create ()) < 0)
return 0;
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
backend_fudge = 1e-3; /* needed to compensate for port_getn returning early */
backend_modify = port_modify;
backend_poll = port_poll;
port_eventmax = 64; /* intiial number of events receivable per poll */
port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
return EVBACKEND_PORT;
}
void inline_size
port_destroy (EV_P)
{
ev_free (port_events);
}
void inline_size
port_fork (EV_P)
{
close (backend_fd);
while ((backend_fd = port_create ()) < 0)
ev_syserr ("(libev) port");
fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
/* re-register interest in fds */
fd_rearm_all (EV_A);
}

View File

@@ -1,226 +0,0 @@
/*
* Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
* Copyright (c) 2008 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
typedef unsigned char u_char;
typedef unsigned short u_short;
#else
# include <sys/types.h>
# include <sys/time.h>
# include <inttypes.h>
#endif
#include <stdarg.h>
/* Fix so that ppl dont have to run with <sys/queue.h> */
#ifndef TAILQ_ENTRY
#define _EVENT_DEFINED_TQENTRY
#define TAILQ_ENTRY(type) \
struct { \
struct type *tqe_next; /* next element */ \
struct type **tqe_prev; /* address of previous next element */ \
}
#endif /* !TAILQ_ENTRY */
#ifndef RB_ENTRY
#define _EVENT_DEFINED_RBENTRY
#define RB_ENTRY(type) \
struct { \
struct type *rbe_left; /* left element */ \
struct type *rbe_right; /* right element */ \
struct type *rbe_parent; /* parent element */ \
int rbe_color; /* node color */ \
}
#endif /* !RB_ENTRY */
/*
* Key-Value pairs. Can be used for HTTP headers but also for
* query argument parsing.
*/
struct evkeyval {
TAILQ_ENTRY(evkeyval) next;
char *key;
char *value;
};
#ifdef _EVENT_DEFINED_TQENTRY
#undef TAILQ_ENTRY
struct event_list;
struct evkeyvalq;
#undef _EVENT_DEFINED_TQENTRY
#else
TAILQ_HEAD (event_list, event);
TAILQ_HEAD (evkeyvalq, evkeyval);
#endif /* _EVENT_DEFINED_TQENTRY */
#ifdef _EVENT_DEFINED_RBENTRY
#undef RB_ENTRY
#undef _EVENT_DEFINED_RBENTRY
#endif /* _EVENT_DEFINED_RBENTRY */
struct eventop {
char *name;
void *(*init)(struct event_base *);
int (*add)(void *, struct event *);
int (*del)(void *, struct event *);
int (*recalc)(struct event_base *, void *, int);
int (*dispatch)(struct event_base *, void *, struct timeval *);
void (*dealloc)(struct event_base *, void *);
};
/* These functions deal with buffering input and output */
struct evbuffer {
u_char *buffer;
u_char *orig_buffer;
size_t misalign;
size_t totallen;
size_t off;
void (*cb)(struct evbuffer *, size_t, size_t, void *);
void *cbarg;
};
/* Just for error reporting - use other constants otherwise */
#define EVBUFFER_READ 0x01
#define EVBUFFER_WRITE 0x02
#define EVBUFFER_EOF 0x10
#define EVBUFFER_ERROR 0x20
#define EVBUFFER_TIMEOUT 0x40
struct bufferevent;
typedef void (*evbuffercb)(struct bufferevent *, void *);
typedef void (*everrorcb)(struct bufferevent *, short what, void *);
struct event_watermark {
size_t low;
size_t high;
};
struct bufferevent {
struct event ev_read;
struct event ev_write;
struct evbuffer *input;
struct evbuffer *output;
struct event_watermark wm_read;
struct event_watermark wm_write;
evbuffercb readcb;
evbuffercb writecb;
everrorcb errorcb;
void *cbarg;
int timeout_read; /* in seconds */
int timeout_write; /* in seconds */
short enabled; /* events that are currently enabled */
};
struct bufferevent *bufferevent_new(int fd,
evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
int bufferevent_priority_set(struct bufferevent *bufev, int pri);
void bufferevent_free(struct bufferevent *bufev);
int bufferevent_write(struct bufferevent *bufev, const void *data, size_t size);
int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf);
size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size);
int bufferevent_enable(struct bufferevent *bufev, short event);
int bufferevent_disable(struct bufferevent *bufev, short event);
void bufferevent_settimeout(struct bufferevent *bufev,
int timeout_read, int timeout_write);
#define EVBUFFER_LENGTH(x) (x)->off
#define EVBUFFER_DATA(x) (x)->buffer
#define EVBUFFER_INPUT(x) (x)->input
#define EVBUFFER_OUTPUT(x) (x)->output
struct evbuffer *evbuffer_new(void);
void evbuffer_free(struct evbuffer *);
int evbuffer_expand(struct evbuffer *, size_t);
int evbuffer_add(struct evbuffer *, const void *, size_t);
int evbuffer_remove(struct evbuffer *, void *, size_t);
char *evbuffer_readline(struct evbuffer *);
int evbuffer_add_buffer(struct evbuffer *, struct evbuffer *);
int evbuffer_add_printf(struct evbuffer *, const char *fmt, ...);
int evbuffer_add_vprintf(struct evbuffer *, const char *fmt, va_list ap);
void evbuffer_drain(struct evbuffer *, size_t);
int evbuffer_write(struct evbuffer *, int);
int evbuffer_read(struct evbuffer *, int, int);
u_char *evbuffer_find(struct evbuffer *, const u_char *, size_t);
void evbuffer_setcb(struct evbuffer *, void (*)(struct evbuffer *, size_t, size_t, void *), void *);
/*
* Marshaling tagged data - We assume that all tags are inserted in their
* numeric order - so that unknown tags will always be higher than the
* known ones - and we can just ignore the end of an event buffer.
*/
void evtag_init(void);
void evtag_marshal(struct evbuffer *evbuf, uint32_t tag, const void *data,
uint32_t len);
void encode_int(struct evbuffer *evbuf, uint32_t number);
void evtag_marshal_int(struct evbuffer *evbuf, uint32_t tag, uint32_t integer);
void evtag_marshal_string(struct evbuffer *buf, uint32_t tag,
const char *string);
void evtag_marshal_timeval(struct evbuffer *evbuf, uint32_t tag,
struct timeval *tv);
int evtag_unmarshal(struct evbuffer *src, uint32_t *ptag, struct evbuffer *dst);
int evtag_peek(struct evbuffer *evbuf, uint32_t *ptag);
int evtag_peek_length(struct evbuffer *evbuf, uint32_t *plength);
int evtag_payload_length(struct evbuffer *evbuf, uint32_t *plength);
int evtag_consume(struct evbuffer *evbuf);
int evtag_unmarshal_int(struct evbuffer *evbuf, uint32_t need_tag,
uint32_t *pinteger);
int evtag_unmarshal_fixed(struct evbuffer *src, uint32_t need_tag, void *data,
size_t len);
int evtag_unmarshal_string(struct evbuffer *evbuf, uint32_t need_tag,
char **pstring);
int evtag_unmarshal_timeval(struct evbuffer *evbuf, uint32_t need_tag,
struct timeval *ptv);
#ifdef __cplusplus
}
#endif

View File

@@ -1,131 +0,0 @@
#!/bin/sh
LE=../libevent-1.4.3-stable
if ! [ -e evbuffer.c ]; then
echo do not run this programm unless you know what you are doing
exit 1
fi
# this program combines libev and libevent into a single package
cvs update -AdP libev
rsync -avP libev/. . --exclude CVS
rm -f configure.ac
cp $LE/evdns.h .
perl -i -pe 's%^/.libevent-include./%#include "event_compat.h"%' event.h
perl -ne '
s/\s+char buf\[64\];/\tchar buf[96];/;
if (/#include "event.h"/) {
print "#ifndef EV_STANDALONE\n$_#endif\n";
next;
}
if (/#include "misc.h"/) {
print "#ifndef EV_STANDALONE\n$_#endif\n";
next;
}
if (/#include "(unistd.h|sys\/time.h)"/) {
print "#ifndef WIN32\n$_#endif\n";
next;
}
next if /#include "log.h"/;
print;
' <$LE/evdns.c >evdns.c
cp $LE/autogen.sh .
cp $LE/epoll_sub.c .
cp $LE/evbuffer.c .
cp $LE/buffer.c .
cp $LE/evhttp.h .
cp $LE/evutil.h .
cp $LE/evutil.c .
cp $LE/event-config.h .
cp $LE/event-internal.h .
cp $LE/evrpc.h .
cp $LE/evrpc.c .
cp $LE/evrpc-internal.h .
cp $LE/http.c .
cp $LE/event_tagging.c .
cp $LE/http-internal.h .
cp $LE/strlcpy-internal.h .
cp $LE/log.c .
cp $LE/log.h .
cp $LE/strlcpy.c .
rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del
#rename 's/libevent/libev/' WIN32-Prj/lib*
cp $LE/aclocal.m4 .
#cp $LE/acconfig.h .
cp $LE/config.h.in .
cp $LE/event_rpcgen.py .
cp $LE/*.3 .
#perl -i -pe 's/libevent/libev/g' sample/Makefile.am
#perl -i -pe 's/libevent/libev/g' test/Makefile.am
perl -i -pe 's/#include <event.h>$/#include "event.h"/' test/*.c
perl -i -ne '
next if /"event-internal.h"/;
s/base\d?->sig.ev_signal_added/0/;
s/base\d?->sig.ev_signal_pair\[0\]/-1/;
s/base->sig.evsignal_caught/0/;
next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/;
next if /^\ttest_simplesignal\(\)/; # non-default-loop
next if /^\ttest_immediatesignal\(\)/; # non-default-loop
next if /test_priorities\(\d\)/;
print;
' test/regress.c
perl -ne '
s/\bmin_heap.h\b//g;
s/\bsignal.c\b//g;
s/\bevport.c\b//g;
s/\bkqueue.c\b//g;
s/\bdevpoll.c\b//g;
s/\brtsig.c\b//g;
s/\bselect.c\b//g;
s/\bpoll.c\b//g;
s/\bepoll.c\b//g;
s/\bepoll_sub.c\b//g;
s/\bevent-internal.h\b//g;
s/\bevsignal.h\b//g;
s/^(man_MANS\s*=)/$1 ev.3 /;
s/^(EXTRA_DIST\s*=)/$1 libev.m4 ev.h ev_vars.h ev_wrap.h event_compat.h ev++.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c ev.3 ev.pod /;
s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /;
s/^(CORE_SRC\s*=)/$1 ev.c /;
s/^(SYS_LIBS\s*=)/$1 -lm /;
#s/libevent/libev/g;
print;
' <$LE/Makefile.am >Makefile.am
perl -ne '
#s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/;
s/-Wall//g;
#s/libevent/libev/g;
#VERSION
s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,3.1)/;
s/AC_LIBOBJ\(select\)/: ;/g;
s/AC_LIBOBJ\(poll\)/: ;/g;
s/AC_LIBOBJ\(kqueue\)/: ;/g;
s/AC_LIBOBJ\(epoll\)/: ;/g;
s/AC_LIBOBJ\(devpoll\)/: ;/g;
s/AC_LIBOBJ\(evport\)/: ;/g;
s/AC_LIBOBJ\(signal\)/: ;/g;
s/AC_LIBOBJ\(rtsig\)/: ;/g;
print "m4_include([libev.m4])\n" if /^AC_OUTPUT/;
print;
' <$LE/configure.in >configure.in
aclocal-1.7
automake-1.7 --add-missing
autoconf
autoheader
libtoolize
CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@"

View File

@@ -1,19 +0,0 @@
#!/bin/sh
(
echo '#define VAR(name,decl) name'
echo '#define EV_GENWRAP 1'
cat ev_vars.h
) | cc -E -o - - | perl -ne '
while (<>) {
push @syms, $1 if /(^\w+)/;
}
print "/* DO NOT EDIT, automatically generated by update_ev_wrap */\n",
"#ifndef EV_WRAP_H\n",
"#define EV_WRAP_H\n",
(map "#define $_ ((loop)->$_)\n", @syms),
"#else\n",
"#undef EV_WRAP_H\n",
(map "#undef $_\n", @syms),
"#endif\n";
' >ev_wrap.h

Some files were not shown because too many files have changed in this diff Show More