0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

10396 Commits

Author SHA1 Message Date
Rod Vagg
b594e59543 test: named pipe is invalid when appending .txt
On Windows, appending '.txt' to a named pipe does not produce a valid
regular file name.  We want an empty _file_, not an invalid named pipe.
Fix-up for commit 1f79e4f.

PR-URL: https://github.com/node-forward/node/pull/63
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-23 17:11:04 +01:00
Ben Noordhuis
fcbbc7a050 Merge remote-tracking branch 'joyent/v0.12' into v0.12
Conflicts:
	Makefile
	deps/v8/src/base/platform/platform.h

PR-URL: https://github.com/node-forward/node/pull/65
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-11-22 17:55:59 +01:00
Ben Noordhuis
21130c7d6f lib: turn on strict mode
Turn on strict mode for the files in the lib/ directory.  It helps
catch bugs and can have a positive effect on performance.

PR-URL: https://github.com/node-forward/node/pull/64
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-22 17:23:30 +01:00
Rory Bradford
2d17193f20 path: added parse() and format() functions
The parse() function splits a path and returns an object
with the different elements. The format() function is the
reverse of this and adds an objects corresponding path
elements to make up a string. Fixes #6976.

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

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

Fixes: https://github.com/joyent/node/issues/8464
PR-URL: https://github.com/joyent/node/pull/8756
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 15:38:29 -08:00
Fedor Indutny
963f5e8a88 tls: do not hang without newSession handler
When listening for client hello parser events (like OCSP requests), do
not hang if `newSession` event handler is not present.

fix joyent/node#8660
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/47
2014-11-20 18:14:57 +03:00
Ben Noordhuis
f8076c4067 lib: add setFlagsFromString() to tracing module
Expose v8::V8::SetFlagsFromString() on tracing.v8 in lib/tracing.js.

PR-URL: https://github.com/node-forward/node/pull/62
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-20 16:08:54 +01:00
MK Safi
6a6782343c doc: clarify return value of http.createServer
PR-URL: https://github.com/joyent/node/pull/6054
Reviewed-by: Isaac Z. Schlueter <i@izs.me>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-19 14:18:50 -08:00
Ben Noordhuis
83d2cb634e src: remove static variables from tls_wrap
Remove the error message globals.  More prep work for multi-isolate
support.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/node-forward/node/pull/58
2014-11-18 22:56:10 +03:00
Ben Noordhuis
8ba39b0189 src: turn two global vars into local vars
Bring us a little closer to multi-isolate readiness by removing two
global variables.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/node-forward/node/pull/58
2014-11-18 22:55:55 +03:00
Rod Vagg
28c4520bb7 test: fix test-cluster-eaccess to work on windows
properly create an EADDRINUSE condition rather than
simulating one with a plain file

PR-URL: https://github.com/node-forward/node/pull/59
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2014-11-18 17:58:10 +01:00
Rod Vagg
1f79e4f4b4 test: use common.PIPE for emptyTxt path
Work-around for long paths exceeding limits for UNIX socket binds,
emptyTxt would otherwise be burried deep in the fixtures directory.

PR-URL: https://github.com/node-forward/node/pull/51
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-11-18 14:21:40 +01:00
Artur Cistov
adc0206de9 doc: fix typos in http.markdown
PR-URL: https://github.com/joyent/node/pull/4784
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-17 15:35:00 -08:00
Chris Dickinson
0fef250090 dns: propagate domain for c-ares methods
Fixes: https://github.com/joyent/node/issues/5471
PR-URL: https://github.com/joyent/node/pull/8732
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-17 12:34:37 -08:00
Sam Roberts
743a009bad process: pid can be a string in process.kill()
Not allowing string was a change from v0.10 behaviour, commented on in
joyent/node#7991. Allow them again, but still check that argument is
numberish. Also, simplify the fragile and non-portable test code
introduced in 832ec1cd50 that required fixups 2a415358ee, and
ef3c4ed3d.

PR-URL: https://github.com/joyent/node/pull/8531
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-17 12:15:54 -08:00
Vladimir Kurchatkin
f6556b678d fs: fix symlink error message
the arguments were swapped, so fs.symlink{Sync,} would
report that the wrong file EEXIST'd in error.

Fixes: https://github.com/joyent/node/issues/8651
Fixes: https://github.com/joyent/node/issues/4314
Fixes: https://github.com/joyent/node/issues/5381
PR-URL: https://github.com/joyent/node/pull/8657
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-15 17:01:13 -08:00
Ben Noordhuis
c3d3c8e8cd src: fixups after v8 upgrade
* v8::Platform has a new MonotonicallyIncreasingTime() method,
  implement it.

* The ASCII apocalypse continues with the replacement of external
  ASCII strings with external one byte strings.
2014-11-14 16:34:59 +01:00
Refael Ackermann
5a438489f0 deps: fix postmortem-metadata generator in v8
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8476
2014-11-14 16:34:58 +01:00
Ben Noordhuis
5d1b6d3e0f deps: upgrade v8 to 3.30.37 2014-11-14 16:34:58 +01:00
Fedor Indutny
3b3d89bad2 crypto: fix X509 cert memory leak in GetPeerCert
`SSL_get_peer_certificate` returns referenced X509 object, we should
decrement the reference count once it is not needed.

Fix joyent/node#8674
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/56
2014-11-14 09:56:32 +03:00
haoxin
00d7b13a18 module: correct the order of the assertions
this puts the type-checking assertions in require
into proper order.

PR-URL: https://github.com/joyent/node/pull/8333
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-13 19:58:52 -08:00
Steven Loomis
855b1c98ca build: i18n: support little-endian machines
Note that this may not affect anything until powerpc support lands in
v8.

Related: https://github.com/srl295/node/issues/7
Related: ba8ab91bc4
PR-URL: https://github.com/joyent/node/pull/8712
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-13 11:25:55 -08:00
Steven R. Loomis
ea4dc7d444 build: i18n: fix icu toolset dependencies
So what I did here is to make the icutools library actually contain the
entire ICU dependencies needed for host-side tools. Sadly, this will
build ICU twice, but avoids conflicts between host and target side.
This all seems like a gyp bug of some sort, but without docs for
toolsets, who’s to say?

I removed the icuio library as a separate target, because it was only
used by the host-side tools.

PR-URL: https://github.com/joyent/node/pull/8681
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-11 16:18:22 -08:00
Steven R. Loomis
0339446cf7 build: i18n: fix build on OSX
Fix config option that doesn't work with OSX.

Fixes: https://github.com/joyent/node/issues/8521
PR-URL: https://github.com/joyent/node/pull/8602
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-11 16:14:59 -08:00
Ben Noordhuis
be413ac732 src: fix windows build error
Fix a Windows-only build error that was introduced in
commit 1183ba4 ("zlib: support concatenated gzip files").

Rename the NO_ERROR and FAILED enumerations, they conflict
with macros of the same name in <winerror.h>.

PR-URL: https://github.com/node-forward/node/pull/57
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-11-11 13:21:19 +01:00
Ben Noordhuis
355b96b605 lib,src: make os.endianness() inlinable
Turn os.endianness() from a run-time function into a pure JS function.
Upsides: makes it a good candidate for inlining at the call site.
Downsides: none that I can think of.

PR-URL: https://github.com/node-forward/node/pull/55
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-11 12:02:27 +01:00
sudodoki
fd2226894a doc: note ability to require files within packages
Adding note to api/modules.markdown about ability to
load arbitrary path from modules from node_module path
by adding reference to path after module name in call
to require()

PR-URL: https://github.com/joyent/node/pull/7794
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-11-09 21:46:35 -08:00
Jackson Tian
d8a3c4ab2a tls: remove tls.createSecurePair code deprecation
In https://github.com/joyent/node/pulls/8695, the deprecation was
removed from doc.  This removes the deprecation from the code.

PR-URL: https://github.com/joyent/node/pull/8700
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-09 21:39:24 -08:00
Rod Vagg
454fbb803a test: kill children before cluster parent
Killing the cluster master first on Windows causes an ESRCH when killing
the children as the OS takes care of them itself.

PR-URL: https://github.com/node-forward/node/pull/53
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-10 02:06:45 +01:00
Luis Reis
1183ba47df zlib: support concatenated gzip files
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/6442
2014-11-09 05:09:10 +03:00
Fedor Indutny
1bb0aeb8f2 crypto: escape DNS altname
Vulnerability credit goes to:

    Calvin Liang conradjliang@hotmail.com

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: ...private
2014-11-08 02:24:07 +03:00
Chris Dickinson
03bae7bded doc: remove tls.createSecurePair deprecation
pending tls.TLSSocket growing the ability to work
with streams, createSecurePair will remain.

PR-URL: https://github.com/joyent/node/pull/8695
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-07 14:33:05 -08:00
Trevor Norris
5845a6bcd5 uv: revert change causing build failures
Revert uv_thread_self() to return unsigned long instead of uv_thread_t.
This was causing a build failure on Windows and is only a temporary fix
until the proper patch lands upstream.

Reverts: https://github.com/joyent/libuv/commit/59658a8
Fixes: ce112c2 "deps: update uv to v1.0.0-rc2"
2014-11-07 13:44:09 -08:00
Saúl Ibarra Corretgé
e46cbaa06d core: fix usage of uv_cwd
It was modified in libuv to be consistent with uv_exepath and not
include the trailing NULL byte in the returned size.

PR-URL: https://github.com/joyent/node/pull/8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 16:51:12 -08:00
Saúl Ibarra Corretgé
a5f1307e45 core: replace uv_fs_readdir with uv_fs_scandir
PR-URL: https://github.com/joyent/node/pull/8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 16:50:58 -08:00
Saúl Ibarra Corretgé
ce112c27c6 deps: update uv to v1.0.0-rc2
PR-URL: https://github.com/joyent/node/pull/8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 16:49:57 -08:00
Rod Vagg
b9cecc305b test: use common.PIPE in simple/test-cluster-eaccess
PR-URL: https://github.com/node-forward/node/pull/50
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-06 00:13:20 +01:00
Ben Noordhuis
9fb7aee747 test: unlink custom unix socket before test
Unlink NODE_COMMON_PIPE before running the test if set in the
environment.  The test runner won't do it for us like it does
for files in test/tmp.

PR-URL: https://github.com/node-forward/node/pull/40
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-11-05 21:49:11 +01:00
Ben Noordhuis
bf23328a9c build: add rpmbuild .spec file
Add a .spec file and a rpmbuild(1) driver script.  Useful for people
on RHEL-based systems that want to compile and package from source.

PR-URL: https://github.com/node-forward/node/pull/10
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-11-05 21:45:38 +01:00
Ben Noordhuis
e13663d647 src: network interface names are UTF-8 encoded
Fixes a bug that was introduced in commit f674b09 when v8::String::New()
calls were replaced with calls to one-byte, two-byte and UTF-8 versions.
It turns out that for network interface names, using a one-byte encoding
can produce the wrong results on Windows.  Use UTF-8 instead.

Libuv on Windows correctly encodes non-ASCII characters in the interface
name as UTF-8.  On Unices however, the interface name is just a binary
string with no particular encoding; that's why on UNIX platforms, we
keep interpreting it as a one-byte string.

Fixes joyent/node#8633.

PR-URL: https://github.com/node-forward/node/pull/44
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2014-11-05 20:39:24 +01:00
Timothy J Fontaine
28ae70ebad npm: Upgrade to v2.1.6 2014-11-05 10:35:43 -08:00
Forrest L Norvell
272aa589af test: more thorough tests for npm 2014-11-05 10:35:42 -08:00
Julien Gilli
3589a62104 build: fix build for SmartOS
This change in V8: https://code.google.com/p/v8/source/detail?r=22210
has introduced a method named OS::GetCurrentThreadId which fails to
compile on OSes where a "gettid" syscall does not exist.

This build issue has been fixed upstream by several changes:
- https://code.google.com/p/v8/source/detail?r=23459.
- https://codereview.chromium.org/649553002
- https://codereview.chromium.org/642223003

Another minor fix to the upstream changes was also necessary.
See https://code.google.com/p/v8/issues/detail?id=3620 for
more information.

The other build issue was due to the fact that alloca.h is not included
by other system includes on SmartOS, which is assumed by V8.

Built and tested on Linux, MacOS X, Windows and SmartOS.
2014-11-05 10:35:42 -08:00
Vladimir Kurchatkin
f65a5cbcde smalloc: check if obj has external data
PR-URL: https://github.com/joyent/node/pull/8655
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 00:33:00 -08:00
Rod Vagg
7ab73ff735 windows: fix process description to say "Node.js"
Newer incarnations of the task manager only show the description, not
even the product name.

PR-URL: https://github.com/node-forward/node/pull/46
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuisl.nl>
2014-11-03 20:03:52 +01:00
Fedor Indutny
ef46ca61b5 node: do not crash on IPC stdin
When started with IPC pipe on fd=0 child process should not crash when
referencing or using `process.stdin`.

fix joyent/node#8669

PR-URL: https://github.com/node-forward/node/pull/45
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
2014-11-04 11:21:43 -05:00
Ben Noordhuis
b1dcaadb0e src: replace NULL with nullptr in debug agent
Update the debug agent to conform to the code style in src/.
2014-11-03 13:19:17 +01:00
Ben Noordhuis
084f3829ad src: clean up root_certs iteration
Drop the trailing nullptr and use ARRAY_SIZE.
2014-11-03 12:15:52 +01:00
Ben Noordhuis
29d7fd6bb8 src: move debug agent from deps/ to src/
There is not much point in keeping it a separate project because it
doesn't build standalone, plus it makes applying changes to core more
difficult because of the implicit dependency on header files in src/.
2014-11-03 12:08:04 +01:00