net: remove use of arguments in Server constructor
The current implementation uses the arguments object in the Server() constructor. Since both arguments to Server() are optional, there was a high likelihood of accessing a non-existent element in arguments, which carries a performance overhead. This commit replaces the arguments object with named arguments. Reviewed-by: Trevor Norris <trev.norris@gmail.com>
stream: remove duplicated expression
Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Merge remote-tracking branch 'upstream/v0.12'
Conflicts: src/node_version.h
Merge remote-tracking branch 'upstream/v0.12'
Conflicts: src/node_version.h
Merge remote-tracking branch 'upstream/v0.12'
Conflicts: src/node_version.h
src: update AUTHORS after merge of v0.12 in master
fs: properly handle fd passed to truncate()
Currently, fs.truncate() silently fails when a file descriptor is passed as the first argument. This commit changes this behavior to properly call fs.ftruncate(). This commit also adds proper type checking to the callback provided to makeCallback(). PR-URL: #9161 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
dgram: implicit binds should be exclusive
Server sockets should be shared by default, and client sockets should be exclusive by default. For net/TCP, this is how it is, for dgram/UDP, its a little less clear what a client socket is, but a socket that is auto-bound during a dgram.send() is not usefully shared among cluster workers, any more than an outgoing TCP connection would be usefully shared. Since implicit binds become exclusive, implicit/client dgram sockets can now be used with cluster on Windows. Before, neither explicit nor implicitly bound sockets could be used, causing dgram to be completely unsupported with cluster on Windows. After this change, they become half supported. PR: #8643 Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Bert Belder <bertbelder@gmail.com> Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Merge remote-tracking branch 'upstream/v0.12'
src: enable strict mode in all builtin modules
This is a follow-up commit for b233131. It enables strict mode in all built-in modules. PR: #9302 PR-URL: #9302 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Merge remote-tracking branch 'upstream/v0.12'
doc: fix '\\' typos on Windows
This commit changes the Windows examples in path.markdown to correctly display '\\'. PR-URL: #9412 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Merge remote-tracking branch 'upstream/v0.12'
Merge remote-tracking branch 'upstream/v0.12'
Conflicts: src/node_version.h
Merge remote-tracking branch 'upstream/v0.12'
Conflicts: src/node_version.h
Port of io.js commit: nodejs/node@77f3586 Original commit message: This updates the default cipher suite to an more secure list, which prefers strong ciphers with Forward Secrecy. Additionally, it enables `honorCipherOrder` by default. Noteable effect of this change is that the insecure RC4 ciphers are disabled and that Chrome negotiates a more secure ECDHE cipher. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: #14383
tls: command-line switch and envar cipher-list override
Add command line switches and environment variables to override the default cipher suite in tls.js `--cipher-list` and `NODE_CIPHER_LIST` can be used to completely override the default cipher list with a given value. `--enable-legacy-cipher-list` and `NODE_LEGACY_CIPHER_LIST` can be used to reset the default cipher list back to a known legacy value shipped in prior Node.js releases A new `getLegacyCiphers` method on the tis module allows programmatic access to the old cipher list defaults. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: #14383
tls: make --enable-legacy-cipher-list less verbose
Based on commit feedback, make the PrintHelp for --enable-legacy-cipher-list less verbose. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: #14383
tls: pass in isolate with define string constant + style nits
Per the commit feedback, fix up style nits and pass in the isolate with the NODE_DEFINE_STRING_CONSTANT macro. Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: #14383
test: fixing a few nits in the test
typo and unnecessary options init Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: #14383