diff --git a/AUTHORS b/AUTHORS index 131b1ad8f2..eb271aceb6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -455,3 +455,4 @@ Benoit Vallée Ryuichi Okumura Brandon Frohs Nick Sullivan +Nathan Zadoks diff --git a/ChangeLog b/ChangeLog index baa9a0a9b7..81e7930e30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -60,6 +60,29 @@ * zlib: allow passing options to convenience methods (Kyle Robinson Young) +2013.05.24, Version 0.10.8 (Stable), 30d9e9fdd9d4c33d3d95a129d021cd8b5b91eddb + +* v8: update to 3.14.5.9 + +* uv: upgrade to 0.10.8 + +* npm: Upgrade to 1.2.23 + +* http: remove bodyHead from 'upgrade' events (Nathan Zadoks) + +* http: Return true on empty writes, not false (isaacs) + +* http: save roundtrips, convert buffers to strings (Ben Noordhuis) + +* configure: respect the --dest-os flag consistently (Nathan Rajlich) + +* buffer: throw when writing beyond buffer (Trevor Norris) + +* crypto: Clear error after DiffieHellman key errors (isaacs) + +* string_bytes: strip padding from base64 strings (Trevor Norris) + + 2013.05.17, Version 0.10.7 (Stable), d2fdae197ac542f686ee06835d1153dd43b862e5 * uv: upgrade to v0.10.7 diff --git a/README.md b/README.md index aa505e555b..9f6e07871a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Evented I/O for V8 javascript. [![Build Status](https://secure.travis-ci.org/joy Prerequisites (Unix only): + * GCC 4.2 or newer * Python 2.6 or 2.7 * GNU Make 3.81 or newer * libexecinfo (FreeBSD and OpenBSD only) diff --git a/benchmark/http/client-request-body.js b/benchmark/http/client-request-body.js new file mode 100644 index 0000000000..7a3468a670 --- /dev/null +++ b/benchmark/http/client-request-body.js @@ -0,0 +1,69 @@ +// Measure the time it takes for the HTTP client to send a request body. + +var common = require('../common.js'); +var http = require('http'); + +var bench = common.createBenchmark(main, { + dur: [5], + type: ['asc', 'utf', 'buf'], + bytes: [32, 256, 1024], + method: ['write', 'end '] // two spaces added to line up each row +}); + +function main(conf) { + var dur = +conf.dur; + var len = +conf.bytes; + + var encoding; + var chunk; + switch (conf.type) { + case 'buf': + chunk = new Buffer(len); + chunk.fill('x'); + break; + case 'utf': + encoding = 'utf8'; + chunk = new Array(len / 2 + 1).join('ü'); + break; + case 'asc': + chunk = new Array(len + 1).join('a'); + break; + } + + var nreqs = 0; + var options = { + headers: { 'Connection': 'keep-alive', 'Transfer-Encoding': 'chunked' }, + agent: new http.Agent({ maxSockets: 1 }), + host: '127.0.0.1', + port: common.PORT, + path: '/', + method: 'POST' + }; + + var server = http.createServer(function(req, res) { + res.end(); + }); + server.listen(options.port, options.host, function() { + setTimeout(done, dur * 1000); + bench.start(); + pummel(); + }); + + function pummel() { + var req = http.request(options, function(res) { + nreqs++; + pummel(); // Line up next request. + res.resume(); + }); + if (conf.method === 'write') { + req.write(chunk, encoding); + req.end(); + } else { + req.end(chunk, encoding); + } + } + + function done() { + bench.end(nreqs); + } +} diff --git a/configure b/configure index 7fb2588b99..012b77f24a 100755 --- a/configure +++ b/configure @@ -10,7 +10,8 @@ import sys CC = os.environ.get('CC', 'cc') root_dir = os.path.dirname(__file__) -sys.path.insert(0, os.path.join(root_dir, 'deps', 'v8', 'tools')) +sys.path.insert(0, os.path.join(root_dir, 'tools', 'gyp', 'pylib')) +from gyp.common import GetFlavor # parse our options parser = optparse.OptionParser() @@ -236,7 +237,7 @@ parser.add_option("--dest-os", action="store", dest="dest_os", help="Operating system to build for. Valid values are: " - "win, mac, solaris, freebsd, linux") + "win, mac, solaris, freebsd, openbsd, linux") parser.add_option("--no-ifaddrs", action="store_true", @@ -462,18 +463,18 @@ def configure_node(o): # 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') or sys.platform.startswith('darwin'): + if flavor in ('solaris', 'mac'): o['variables']['node_use_dtrace'] = b(not options.without_dtrace) o['variables']['uv_use_dtrace'] = o['variables']['node_use_dtrace'] o['variables']['uv_parent_path'] = '/deps/uv/' - elif sys.platform.startswith('linux'): + elif flavor == 'linux': o['variables']['node_use_dtrace'] = 'false' o['variables']['node_use_systemtap'] = b(options.with_dtrace) if options.systemtap_includes: o['include_dirs'] += [options.systemtap_includes] elif options.with_dtrace: raise Exception( - 'DTrace is currently only supported on SunOS or Linux systems.') + 'DTrace is currently only supported on SunOS, MacOS or Linux systems.') else: o['variables']['node_use_dtrace'] = 'false' o['variables']['node_use_systemtap'] = 'false' @@ -482,7 +483,7 @@ def configure_node(o): o['defines'] += ['SUNOS_NO_IFADDRS'] # By default, enable ETW on Windows. - if sys.platform.startswith('win32'): + if flavor == 'win': o['variables']['node_use_etw'] = b(not options.without_etw); elif options.with_etw: raise Exception('ETW is only supported on Windows.') @@ -490,7 +491,7 @@ def configure_node(o): o['variables']['node_use_etw'] = 'false' # By default, enable Performance counters on Windows. - if sys.platform.startswith('win32'): + if flavor == 'win': o['variables']['node_use_perfctr'] = b(not options.without_perfctr); elif options.with_perfctr: raise Exception('Performance counter is only supported on Windows.') @@ -603,7 +604,7 @@ def configure_openssl(o): def configure_winsdk(o): - if not sys.platform.startswith('win32'): + if flavor != 'win': return winsdk_dir = os.environ.get("WindowsSdkDir") @@ -616,6 +617,13 @@ def configure_winsdk(o): print "ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles." +# determine the "flavor" (operating system) we're building for, +# leveraging gyp's GetFlavor function +flavor_params = {}; +if (options.dest_os): + flavor_params['flavor'] = options.dest_os; +flavor = GetFlavor(flavor_params); + output = { 'variables': { 'python': sys.executable }, 'include_dirs': [], @@ -668,14 +676,12 @@ write('config.mk', '# Do not edit. Generated by the configure script.\n' + config) if options.use_ninja: - gyp_args = ['-f', 'ninja'] + gyp_args = ['-f', 'ninja-' + flavor] elif options.use_xcode: gyp_args = ['-f', 'xcode'] -elif os.name == 'nt': +elif flavor == 'win': gyp_args = ['-f', 'msvs', '-G', 'msvs_version=auto'] -elif options.dest_os: - gyp_args = ['-f', 'make-' + options.dest_os] else: - gyp_args = ['-f', 'make'] + gyp_args = ['-f', 'make-' + flavor] subprocess.call([sys.executable, 'tools/gyp_node'] + gyp_args) diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 88cbedc9ee..224f570a5d 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@

This function should not be used programmatically. Instead, just refer to the npm.bin member.

- +