summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 2015.05.22, Version 0.12.4 (Stable)v0.12.4v0.12.4-releaseJulien Gilli2015-05-223-2/+13
| | | | | | | | * npm: upgrade to 2.10.1 * V8: revert v8 Array.prototype.values() removal (cjihrig) * win: bring back xp/2k3 support (Bert Belder)
* deps: upgrade to npm 2.10.1Rebecca Turner2015-05-22283-2770/+6270
| | | | | Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25364
* win: bring back xp/2k3 supportBert Belder2015-05-222-9/+14
| | | | | | | | | | | | | | | | | | | Issue: https://github.com/joyent/node/issues/25348 The gyp/project files don't explicitly specify a subsystem version, which results in the default being used. The default changed from VS 2010 to VS 2012 and later. Backport e8d08503c7821e8c92e9fa236ed7328e9bdfe62a from io.js. Original commit message follows: Chrome still runs on Windows XP, so there is no reason that iojs couldn't. PR: https://github.com/iojs/io.js/pull/512 (cherry picked from commit e8d08503c7821e8c92e9fa236ed7328e9bdfe62a) Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25367
* test: Array.prototype.values() regression testcjihrig2015-05-221-0/+36
| | | | | | | | This commit adds a regression test for https://github.com/joyent/node/issues/25324 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25328
* deps: revert v8 Array.prototype.values() removalcjihrig2015-05-226-12/+16
| | | | | | | | | | | | | | | | | | | | | | | The Node 0.12 line was initially released with a version of v8 that included Array.prototype.values(). In https://github.com/joyent/node/pull/18206, v8 was updated to a version that dropped support for values(). https://codereview.chromium.org/647703003 removed this method because it causes problems with some versions of Outlook Web Access. This commit reverts the removal of Array.prototype.values(). Original commit message: Revert "Version 3.28.71.17 (merged r24706, r24708)" This reverts commit 529541ecb58fd0d6df4dfbe41d01bff9ae21ff06. Conflicts: src/version.cc Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25328
* doc: Using ciphers with tls.connect()Chad Johnston2015-05-211-1/+16
| | | | | | | Refs #25270,#25271 Reviewed-By: Michael Dawson <mhdawsonibm@gmail.com> PR-URL: https://github.com/joyent/node/pull/25325
* test: relax timing constraints for child processGireesh Punathil2015-05-141-1/+1
| | | | | | | | | | | | | | | | | With additional load in the system, the child process which runs sleep command takes more time to run - typically slightly above 1 second, but above 2 seconds under stress. While the intent of the test is to test the functionality of spawnSync and the child process in general, in effect it is testing the system command sleep, and further, it's responsiveness. Since from the name the purpose of the test seems to be unrelated to the sleep behaviour, I believe a more meaningful assertion would be to see the time taken is more than 1 second. Reviewed-By: Michael Dawson <mhdawsonibm@gmail.com> PR-URL: https://github.com/joyent/node/pull/25291
* test: delete simple/test-process-active-wrapsMichael Dawson2015-05-141-79/+0
| | | | | | | | | | | | | | | | | | This test currently fails when run on machines without IPv6 enabled. Futher it was delete in io.js under 3143d732f6efd82da76e9c53ad192ac14071bf70 as the test was known to have problems across platforms and releases. The existing test was hard to understand so I wrote a new version but then found exactly what was reported in the io.js pull request. Behaviour varies across platforms such that writing a solid test would either be infeasible or test so little that it does not seem to make sense to keep it. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/25326
* Now working on 0.12.4Julien Gilli2015-05-131-2/+2
|
* Merge branch 'v0.12.3-release' into v0.12Julien Gilli2015-05-133-2/+28
|\
| * 2015.05.13, Version 0.12.3 (Stable)v0.12.3v0.12.3-releaseJulien Gilli2015-05-133-2/+28
|/ | | | | | | | | | | | | | | | | | | | | | * V8: update to 3.28.71.19 * uv: upgrade to 1.5.0 * npm: upgrade to 2.9.1 * V8: don't busy loop in v8 cpu profiler thread (Mike Tunnicliffe) * V8: fix issue with let bindings in for loops (adamk) * debugger: don't spawn child process in remote mode (Jackson Tian) * net: do not set V4MAPPED on FreeBSD (Julien Gilli) * repl: make 'Unexpected token' errors recoverable (Julien Gilli) * src: backport ignore ENOTCONN on shutdown race (Ben Noordhuis) * src: fix backport of SIGINT crash fix on FreeBSD (Julien Gilli)
* tls,crypto: revert recent cipher lists changesJulien Gilli2015-05-138-262/+12
| | | | | | | | | | | | | | | | | | | | Revert "disable RC4, add --cipher-list command line switch" and "tls: make --enable-legacy-cipher-list=val less verbose" This reverts commit f9291a94498c6f9d70a74a1e402f333383286120 and b5737bb97775ff461266d28245df104dde0e6986. There is still some work to be done to guarantee secure defaults and a smooth upgrade path for v0.12.x users. Before this work is finished, we want to be able to release new versions of v0.12.x. So instead of waiting for these changes to be ready to ship, revert them and integrate them when they're ready to be shipped. Conflicts: src/node.cc Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/25296
* deps: upgrade npm to 2.9.1Forrest L Norvell2015-05-12288-1137/+2276
| | | | | Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25289
* repl: make 'Unexpected token' errors recoverableJulien Gilli2015-05-122-1/+54
| | | | | | | | | | | | | | | | | Fix the regexp used to detect 'Unexpected token' errors so that they can be considered as recoverable. This fixes the following use case: > var foo = 'bar \ ... baz'; undefined > foo 'bar baz' > Fixes #8874 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/8875
* test,win: disable test-tls-server-verify for CIAlexis Campailla2015-05-121-0/+1
| | | | | | | | test-tls-server-verify takes a lont time to execute and times out on the Jenkins machines. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/25284
* deps: don't busy loop in v8 cpu profiler threadMike Tunnicliffe2015-05-1110-22/+40
| | | | | | | | | | | | | | | | | | | | | | | | Backport 6964a9e0685fa186d9d9b7907be17505e839db1a from upstream v8. Original commit message: Make CPU profiler do not hog 100% of CPU. Tick event processor should not stay in a tight loop when there's nothing to do. It can go sleep until next sample event. LOG=N BUG=v8:3967 Committed: https://crrev.com/6964a9e0685fa186d9d9b7907be17505e839db1a Cr-Commit-Position: refs/heads/master@{#28211} Fixes #25137 Related: #9439, #8789 PR: #25268 PR-URL: https://github.com/joyent/node/pull/25268 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
* build: fix use of strict aliasingTrevor Norris2015-05-111-0/+6
| | | | | | | | | | | | | The -fno-strict-aliasing flag was added to fix compilation warnings when building Node.js with GCC <= 4.4 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/9179 PR: #25141 PR-URL: https://github.com/joyent/node/pull/25141 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
* deps: update libuv to 1.5.0Saúl Ibarra Corretgé2015-05-1173-837/+1680
| | | | | | | PR: #25141 PR-URL: https://github.com/joyent/node/pull/25141 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
* test: Extend timeout due to failure on AIXMichael Dawson2015-05-061-1/+1
| | | | | | | | | | | | | | | The loopback on AIX is slower by default than on other platforms and we've seen a number of tests fail on AIX for this reason. This looks to be another instance. Changing the test to bind to the host ip instead of the loopback makes it pass reliably. This change extends the timeout so that it passes reliably on AIX even with the slower loopback behaviour modified: test/simple/test-tls-wrap-timeout.js Reviewed-By: coln Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/25138
* deps: upgrade npm to 2.8.4Forrest L Norvell2015-04-30939-10867/+42215
| | | | | Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/20311
* test: make test-npm uses custom node, not globalJulien Gilli2015-04-301-3/+3
| | | | | | | | | | | | | | | | | | | When running make test-npm, make would use the node binary available in the PATH, which would most of the time not be the same binary as the one built from the source tree from where the make test-npm command in run. This can be confusing, as it can lead users to think that they tested npm with the version of node that was built from the current checkout of the source tree when it would actually run the tests with a completely different version. This change modifies the PATH environment variable for all commands that need to run the node binary to run npm's tests by adding the root of the local checkout as the first entry, so that the custom built node is always used. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/9107
* test: add test for let bindings in for loopsJulien Gilli2015-04-291-0/+38
| | | | | | | | | | | | | 072460265226c047369558b23e9ff2748965bf6c floats a patch on V8 that fixes issue #9113 that would cause let bindings and continue statements in for loops to not work properly. This change adds a regression test that fails if that patch is not properly floated, thus preventing us from not floating that patch after future V8 upgrades. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/23948
* v8: fix issue with let bindings in for loopsadamk2015-04-292-59/+213
| | | | | | | | | | | | | | | | | | | | | | | | Backport b17eaaa5755e625493c5fe537f42b58838923c52 from upstream v8. Original commit message: Fix desugaring of let bindings in for loops to handle continue properly This requires putting the original loop's body inside an inner for loop (with the same labels as the original loop) and re-binding the temp variables in its "next" expression. A second flag is added to the desugared code to ensure the loop body executes at most once per loop. BUG=v8:3683 LOG=y Review URL: https://codereview.chromium.org/720863002 Cr-Commit-Position: refs/heads/master@{#25363} Fixes #9113 and #14411. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/23948
* build: fix build for SmartOSJulien Gilli2015-04-292-3/+8
| | | | | | | | | | | | | | | | | | | | | | | 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. Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/18206
* deps: backport use strict fix for V8 debuggerYury Semikhatsky2015-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Backport 2ad2237507c5b5f9047b8d94d2f4997327eae852 from V8. Original commit message: Fix Unhandled ReferenceError in debug-debugger.js This fixes following exception in Sky on attempt to set a breakpoint "Unhandled: Uncaught ReferenceError: break_point is not defined" I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode. BUG=None LOG=N R=yangguo@chromium.org Review URL: https://codereview.chromium.org/741683002 Cr-Commit-Position: refs/heads/master@{#25415} Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/18206
* mdb_v8: fix dictionary properties accessDave Pacheco2015-04-291-1/+5
| | | | | Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/18206
* deps: fix postmortem-metadata generator in v8Refael Ackermann2015-04-291-9/+5
| | | | | Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/18206
* deps: apply floating irhydra patch to v8Trevor Norris2015-04-295-7/+34
| | | | | Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/18206
* deps: update V8 to 3.28.71.19Trevor Norris2015-04-2994-2018/+3530
| | | | | | | | The 3.28.73 update was technically unstable code. This reverts the code to the latest 3.28 stable release. Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/18206
* net: do not set V4MAPPED on FreeBSDJulien Gilli2015-04-282-4/+15
| | | | | | | | | | V4MAPPED is not supported on recent FreeBSD versions, at least on 10.1. Thus, do not set this flag in net.connect on FreeBSD. Fixes #8540 and #9204. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/18204
* build,win: set env before generating projectsAlexis Campailla2015-04-231-18/+19
| | | | | | | | | | | | | vcbuild.bat calls python configure before setting GYP_MSVS_VERSION, so SelectVisualStudioVersion (tools\gyp\pylib\gyp\MSVSVersion.py) defaults to 'auto' and selects VS 2005. vcbuild sets the environment in the current shell, so this issue would manifest itself only on the first invocation of the script in any given shell windows. Reviewed-By: Julien Gilli <jgilli@fastmail.fm> PR-URL: https://github.com/joyent/node/pull/20109
* src: fix backport for SIGINT crash fix on FreeBSDJulien Gilli2015-04-141-1/+1
| | | | | | | | | | | | | | | 61fe1fe21ba281b05b90a632e2dad29eefb14a0a backported b64983d77cc3ed2e4b585f3bfc8ed23802389a52 from io.js, but failed to change nullptr to NULL, which lead to a build break on FreeBSD since the current build system doesn't enable support for C++11. This change replaces nullptr by NULL, and has been tested on FreeBSD 10.1-RELEASE-p8. Fixes #9326. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/joyent/node/pull/14819
* debugger: don't spawn child process in remote modeJackson Tian2015-04-141-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | When debug in remote mode with host:port or pid, the interface spawn child process also. If the debugger agent is running, will get following output: ``` < Error: listen EADDRINUSE :::5858 < at Object.exports._errnoException (util.js:734:11) < at exports._exceptionWithHostPort (util.js:757:20) < at Agent.Server._listen2 (net.js:1155:14) < at listen (net.js:1181:10) < at Agent.Server.listen (net.js:1268:5) < at Object.start (_debug_agent.js:21:9) < at startup (node.js:68:9) < at node.js:799:3 ``` This fix won't spawn child process and no more error message was shown. Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/14172
* debugger: improve help informationJackson Tian2015-04-141-0/+2
| | | | | Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/14172
* src: backport ignore ENOTCONN on shutdown raceBen Noordhuis2015-04-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of ea37ac04f4e4e9248fb361d65a3cd69f57bcaba1 Original commit message: On AIX, OS X and the BSDs, calling shutdown() on one end of a pipe when the other end has closed the connection fails with ENOTCONN. The sequential/test-child-process-execsync test failed sporadically because of a race between the parent and the child where one closed its end of the pipe before the other got around to calling shutdown() on its end of the pipe. Libuv is not the right place to handle that because it can't tell if the ENOTCONN error is genuine but io.js can. Refs: libuv/libuv#268 PR-URL: iojs#1214 Reviewed-By: Bert Belder <bertbelder@gmail.com> Fixes: https://github.com/joyent/node/issues/9444. Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/14480
* test: immunize data flow from packet size and orderGireesh Punathil2015-04-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple/test-child-process-stdout-flush-exit.js fails with an assertion. The root cause for this assertion is that the expected boolean value of true for the variable gotBye was false. This is set to true when the piped stdout stream of the child writes the end token "goodbye". So the error message would indicate that the end token was never received by the parent, but in fact it did. The only difference is that the first chunk itself had both 'hello' and 'goodbye' (as well as the filler words in between) in AIX, while Linux receives them separately. While this issue is not reproducible in Linux, the number of bytes received each time a callback is called is not consistent across runs, which is ratified as the actual content size of a UNIX domain data packet is determined outside of the node's logic, instead in OS tunables, as well as the runtime context of data transfer (depending on contigeous free memory available in OS data structures at the time of sending). In addition, around 200 filler words sent in between the 'hello' and 'goodbye' seem to indicate that the coalescence of chunks was a possibility in Linux as well, and was devised to separate the first word from the last, through an arbitrary delimiter. Parser logic seem to be rigid and have assumptions about the order and size of the data arrival. For example, it checks for 'goodbye' only when it does not find 'hello' in it, as if they would always come separately. This exclusiveness is what makes the test to fail in AIX. Reviewed-By: PR-URL: https://github.com/joyent/node/pull/14410
* tls: make --enable-legacy-cipher-list=val less verboseJames M Snell2015-04-081-7/+3
| | | | | | | | Per feedback on the commit, make the PrintHelp output for --enable-legacy-cipher-list less verbose. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/14414
* disable RC4, add --cipher-list command line switchJames M Snell2015-04-088-12/+266
| | | | | | | | | | | | | | Disable RC4 in the default cipher list Add the `--cipher-list` command line switch and `NODE_CIPHER_LIST` environment variable to completely override the default cipher list. Add the `--enable-legacy-cipher-list` and `NODE_LEGACY_CIPHER_LIST` environment variable to selectively enable the default cipher list from previous node.js releases. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/14414
* test: relax the timing window in test-child-process-fork-net2.jsGireesh Punathil2015-04-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | In Linux, simple/test-child-process-fork-net2.js fails intermittently. In SuSE Linux system, under network high load situations, this failure is consistently reproducible. The test case tests whether the TCP connections which were established between the processes terminate in a timely and clean manner. After some iterations of data transfer on established connections, the server is closed. The server does not get closed immediately, instead waits for all the active connections to terminate. A timed (200ms) callback closes the connections, which eventually closes the server. The start is the time when the server close is invoked. The end is the time when the server is actually closed(onClose call back invoked). Given that there is a minimum delay of 200ms before the connections are terminated, expecting the elapsed time above 190 is reasonable and fair, but looks like the leeway of 800ms for the upper bounds seem to be too stringent, and breaking some scenarios of network load. Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/joyent/node/pull/14129
* Now working on 0.12.3Julien Gilli2015-03-311-2/+2
|
* Merge branch 'v0.12.2-release' into v0.12Julien Gilli2015-03-313-2/+54
|\
| * 2015.03.31, Version 0.12.2 (Stable)v0.12.2v0.12.2-releaseJulien Gilli2015-03-313-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * uv: Upgrade to 1.4.2 * npm: Upgrade to 2.7.4 * V8: do not add extra newline in log file (Julien Gilli) * V8: Fix --max_old_space_size=4096 integer overflow (Andrei Sedoi) * asyncwrap: fix constructor condition for early ret (Trevor Norris) * buffer: align chunks on 8-byte boundary (Fedor Indutny) * buffer: fix pool offset adjustment (Trevor Norris) * build: fix use of strict aliasing (Trevor Norris) * console: allow Object.prototype fields as labels (Colin Ihrig) * fs: make F_OK/R_OK/W_OK/X_OK not writable (Jackson Tian) * fs: properly handle fd passed to truncate() (Bruno Jouhier) * http: fix assert on data/end after socket error (Fedor Indutny) * lib: fix max size check in Buffer constructor (Ben Noordhuis) * lib: fix stdio/ipc sync i/o regression (Ben Noordhuis) * module: replace NativeModule.require (Herbert Vojčík) * net: allow port 0 in connect() (cjihrig) * net: unref timer in parent sockets (Fedor Indutny) * path: refactor for performance and consistency (Nathan Woltman) * smalloc: extend user API (Trevor Norris) * src: fix for SIGINT crash on FreeBSD (Fedor Indutny) * src: fix builtin modules failing with --use-strict (Julien Gilli) * watchdog: fix timeout for early polling return (Saúl Ibarra Corretgé)
* | test: make cluster tests more time tolerantGireesh Punathil2015-03-312-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | simple tests test-cluster-master-error.js, test-cluster-master-kill.js fails in AIX with assertion failure indicating that the workers were alive even after the master terminated. A 200ms leeway is provided for the workers to actually terminate, but the isAlive check returns true in both the cases. In AIX, the workers were actually terminating, but they took more time - as much as 800ms (normal) to 1000ms (in rare cases). Based on a C test we ran, it is found that the exit routines in AIX is a bit more longer than that in Linux. There are a number of cleanup activities performed in exit() system call, and depending on when the signal handlers are shutdown in that sequence, the process will be deemed as dead or alive, from another process's perspective. process.kill(pid) is used in the test case to check the liveliness of the worker, and when the kill() call is issued, even if the target process is in it's exit sequences, if the signal handlers are not shut down, it will respond to external signals, causing those calls to pass. This fix extends the additional timeout for all platforms Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/joyent/node/pull/9431
* src: backport fix for SIGINT crash on FreeBSDFedor Indutny2015-03-272-0/+24
| | | | | | | | | | | | | | | | | | | | | | | This is a backport of b64983d77cc3ed2e4b585f3bfc8ed23802389a52. Original commit message: src: reset signal handler to SIG_DFL on FreeBSD FreeBSD has a nasty bug with SA_RESETHAND reseting the SA_SIGINFO, that is in turn set for a libthr wrapper. This leads to a crash. Work around the issue by manually setting SIG_DFL in the signal handler. Fix: https://github.com/joyent/node/issues/9326 PR-URL: https://github.com/iojs/io.js/pull/1218 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Fixes #9326. Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/joyent/node/pull/14184
* http: fix assert on data/end after socket errorFedor Indutny2015-03-272-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is a backport of 1a3ca8223e08d82051655d7d7e2ea31b439f1bf1 from io.js. Original commit message: Read all pending data out of the socket on `error` event and ensure that no `data`/`end` handlers will be invoked on `socket.destroy()`. Otherwise following assertion happens: AssertionError: null == true at TLSSocket.socketOnData (_http_client.js:308:3) at TLSSocket.emit (events.js:107:17) at TLSSocket.Readable.read (_stream_readable.js:373:10) at TLSSocket.socketCloseListener (_http_client.js:229:10) at TLSSocket.emit (events.js:129:20) at TCP.close (net.js:476:12) Fix: https://github.com/joyent/node/issues/9348 PR-URL: https://github.com/iojs/io.js/pull/1103 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Nicu Micleușanu <micnic90@gmail.com> Fixes #9348. Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/14087
* deps: upgrade npm to 2.7.4Forrest L Norvell2015-03-27488-5015/+25704
| | | | | Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/14180
* test: address timing issues in simple http testsGireesh Punathil2015-03-272-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple tests test-http-request-end.js, test-http-default-encoding.js hangs in AIX. The root cause for both the failures is related to the timing with which packets are sent between the client and server. On the client side, one factor that affects the timing is Nagle's algorithm. With Nagle enabled there may be a delay between two packets as the stack may wait until either: a. An acknowledgement for the first packet is received, or b. 200 ms elapses. before sending the second packet. Similarly at the server side 2 sequential packages can be delivered to the application either together or separatly. On AIX we see that they are delivered separately to the server, while on Linux delivered together. If we change the timing, for example disabling Nagle on AIX we see the 2 packets delivered together and the tests pass. In the test case simple/test-http-request-end.js, the client request handler of the server receives and stores the data in a data callback, closes the server in a request end callback, and writes to the client and ends the response, in-line with the request receipt. An HTTP parser module parses the incoming message, and invokes callback routines which are registered for HTTP events (such as header, body, end etc.) Because the termination sequence arrive in a separate packet, there is a delay in parsing that message and identify that the client request ended (and thereby invoke the request end call backhandler). Due to this delay, the response close happens first, which in-turn destroys the server socket leading to the fd and watcher removal from the uv loop abandoning further events on this connection, and end call back never being called, causing the reported hang. simple/test-http-default-encoding.js suffers from the same problem. Also, remove the timer logic from the test case. Test harness anyways contain a timer which controls the individual tests so remove such controls from the test case, as suggested by @tjfontaine Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/joyent/node/pull/9432
* test: Env variable to specify directory for pipesMichael Dawson2015-03-264-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the uv layer pipes are connected with uv_pipe_connect. The current spec for this method indicates that the maximum length is limited to the size of length of sizeof(sockaddr_un.sun_path), typically between 92 and 108 bytes. Anything longer than that just gets truncated. The simple testsuite currently creates pipes in directories under the directory where node was built. In our jenkins jobs this sometimes ends up being a deep enough path that the path for the pipes is getting truncated. The result is that tests using pipes fail with errors that don't make it obvious what the problem is. Even if the errors were helpful, we still need a way to avoid the truncation. This patch adds the environment variable NODE_PIPE_DIR. If set the tests create pipes in this directory instead of the current defaults. In addition the test harness is updated to remove/delete this directory before/after each test is run. modified: test/common.js modified: test/simple/test-net-pipe-connect-errors.js modified: test/testpy/__init__.py modified: test/simple/test-cluster-eaccess.js Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/9381
* path: refactor for performance and consistencyNathan Woltman2015-03-252-71/+91
| | | | | | | | | | | | | | | | | | | | | | Improve performance by: + Not leaking the `arguments` object! + Getting the last character of a string by index, instead of with `.substr()` or `.slice()` Improve code consistency by: + Using `[]` instead of `.charAt()` where possible + Using a function declaration instead of a var declaration + Using `.slice()` with clearer arguments + Checking if `dir` is truthy in `win32.format` (added tests for this) Improve both by: + Making the reusable `trimArray()` function + Standardizing getting certain path statistics with the new `win32StatPath()` function Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/9289
* Merge remote-tracking branch 'upstream/v0.10' into v0.12Julien Gilli2015-03-231-1/+6
|\ | | | | | | | | | | Conflicts: ChangeLog src/node_version.h