Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.11.0 proposal #6322

Closed
wants to merge 90 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
8da4bad
test: fix pummel test failures
Trott Apr 2, 2016
fbc99ba
src: add missing 'inline' keywords
bnoordhuis Apr 5, 2016
bc0ee06
doc: note about Android support
Trott Apr 4, 2016
a27e952
test: enforce strict mode for test-domain-crypto
Trott Apr 4, 2016
a5f8d0c
build: remove -f{data,function}-sections flags
bnoordhuis Apr 6, 2016
07829b0
doc: simple doc typo fix
BrendonPierson Apr 4, 2016
96ad5c5
doc: update openssl LICENSE using license-builder.sh
srl295 Apr 5, 2016
632e6b9
deps: backport 125ac66 from v8 upstream
Apr 6, 2016
6bb7999
test: refactor test-file-write-stream3
Trott Apr 5, 2016
440d117
doc: add example using algorithms not directly exposed
hillbrad Apr 7, 2016
d44540f
buffer: standardize array index check
trevnorris Apr 6, 2016
a81fca4
doc: add topic - event loop, timers, `nextTick()`
techjeffharris Apr 8, 2016
2254f1a
repl: refactor repl.js
Trott Apr 6, 2016
fc89d17
path: fixing a test that breaks on some machines.
Apr 5, 2016
476535c
test: fix flaky test-http-client-abort
Trott Apr 8, 2016
a40d0e8
doc: fix scrolling on iOS devices
lpinca Mar 23, 2016
a2dd848
tools,doc: fix incomplete json produced by doctool
firedfox Mar 31, 2016
69eb4a6
tools,doc: fix json for grouped optional params
firedfox Mar 31, 2016
5e6915f
doc: describe child.kill() pitfalls on linux
eljefedelrodeodeljefe Apr 5, 2016
daaad47
doc: clarification for maxBuffer and Unicode output
jasnell Apr 9, 2016
b26fea1
doc: add copy about how to curl SHA256.txt
Apr 8, 2016
4392b4a
stream: Fix readableState.awaitDrain mechanism
addaleax Apr 2, 2016
fabc33a
tools: remove simplejson dependency
thefourtheye Apr 7, 2016
a38b614
test: fix flaky test-child-process-fork-net
Trott Apr 9, 2016
a7104e4
deps: cherry-pick 1383d00 from v8 upstream
indutny Apr 13, 2016
f69416c
streams: support unlimited synchronous cork/uncork cycles
mcollina Apr 12, 2016
6bc3bde
doc: fix incorrect references in buffer docs
Amery2010 Apr 14, 2016
1d669ab
deps: upgrade npm to 3.8.6
zkat Apr 11, 2016
f8c0ab9
deps: floating fix for npm's test-node script
zkat Apr 11, 2016
5807f9d
benchmark: add module loader benchmark parameter
mscdex Feb 10, 2016
3364703
doc: add addaleax to collaborators
addaleax Apr 15, 2016
9d3317a
doc: add santigimeno to collaborators
santigimeno Apr 15, 2016
4a2b53a
doc: add iWuzHere to collaborators
imran-iq Apr 15, 2016
02bf459
doc: add stefanmb to collaborators
stefanmb Apr 15, 2016
1796e49
doc: add domain postmortem
trevnorris Apr 11, 2016
01d4522
test,vm: enable strict mode for vm tests
Trott Apr 15, 2016
bb97de0
doc: clarify fs.watch() and inodes on linux, os x
jorangreef Apr 7, 2016
0658632
tools,doc: parse types in braces everywhere
estliberitas Feb 20, 2016
fbb0a06
process: fix incorrect usage of assert.fail()
Trott Apr 15, 2016
90eb765
doc: native module reloading is not supported
bengl Apr 12, 2016
5c4395b
doc: explain differences in console.assert between node and browsers
jasnell Apr 12, 2016
93f91c6
gitignore: ignore VS 2015 *.VC.opendb files
Apr 5, 2016
90aabb9
gitignore: adding .vs/ directory to .gitignore
Apr 13, 2016
fb64630
tools: fix license-builder.sh again for ICU
srl295 Apr 5, 2016
ea8fe04
doc: document intention and dangers of fs module Buffer API
seishun Apr 2, 2016
5bf8d1a
doc: fix http response event, Agent#getName
mdouglass Apr 1, 2016
038801d
doc: DCO anchor that doesn't change
williamkapke Apr 18, 2016
91001d3
doc: replace functions with arrow functions
hiroppy Apr 14, 2016
85cb9bb
assert: respect assert.doesNotThrow message.
Aug 17, 2015
68c3283
test: fix test-net-settimeout flakiness
santigimeno Apr 12, 2016
1af0e44
test: fix flaky test-http-set-timeout-server
santigimeno Apr 15, 2016
3ce59ab
tools: update ESLint to 2.7.0
silverwind Apr 9, 2016
8077b89
test: fix issues for ESLint 2.7.0
silverwind Apr 9, 2016
90c12a9
lib,test,tools: alignment on variable assignments
Trott Apr 16, 2016
7ea5e43
tools: lint for alignment of variable assignments
Trott Apr 16, 2016
713f6ff
tools: improve js linter
mscdex Mar 10, 2016
95e9c06
build: allow test-ci to run tests in parallel
jbergstroem Apr 15, 2016
b0ba16f
test: move the debugger tests back to parallel
santigimeno Apr 15, 2016
9293946
test: move some test from sequential to parallel
santigimeno Apr 5, 2016
b8ae1b8
doc: path.format provide more examples
eversojk Mar 22, 2016
6892536
tools: move message listener to worker objects
mscdex Apr 15, 2016
b74ddea
doc: fix broken references
gromnitsky Apr 13, 2016
8779967
test: move debugger tests to sequential
Trott Apr 14, 2016
8ccfb87
http: unref socket timer on parser execute
indutny Apr 19, 2016
052d87c
stream_base: expose `bytesRead` getter
indutny Apr 19, 2016
36c58da
net: replace __defineGetter__ with defineProperty
indutny Apr 20, 2016
24ec701
buffer: add Buffer.prototype.compare by offset
jasnell Mar 23, 2016
9f2dc70
src: add SIGINFO to supported signals
jamesreggio Apr 7, 2016
b7dd451
deps: update to http-parser 2.7.0
indutny Apr 19, 2016
f6969a1
http: skip body and next message of CONNECT res
indutny Apr 19, 2016
1ef18bd
test: add test for responses to HTTP CONNECT req
slushie Apr 19, 2016
68cf6a5
build: fix make tar-headers for Linux
gibfahn Mar 31, 2016
8877703
tools: enable linting for v8_prof_processor.js
Trott Apr 18, 2016
73eac79
tools: lint rule for assert.fail()
Trott Apr 18, 2016
fb2a978
test,tools: enable linting for undefined vars
Trott Apr 18, 2016
df93d6b
test: assert - fixed error messages to match the tests
suryagh Apr 16, 2016
2e6e2d6
child_process: add nullptr checks after allocs
addaleax Apr 18, 2016
033b21b
test: move more tests from sequential to parallel
santigimeno Apr 9, 2016
5c9dddf
debugger: run last command on presssing enter
Trott Apr 6, 2016
3a5dd02
zlib: detect gzip files when using unzip*
addaleax Mar 24, 2016
2ac14ee
zlib: Make the finish flush flag configurable
addaleax Apr 5, 2016
87e0734
node: make builtin libs available for `--eval`
addaleax Apr 15, 2016
40945e0
repl: keep the built-in modules non-enumerable
addaleax Apr 18, 2016
9f9371b
doc: note that zlib.flush acts after pending writes
addaleax Apr 12, 2016
02a84e2
doc: add full example for zlib.flush()
addaleax Apr 19, 2016
5874502
doc: git mv to .md
eljefedelrodeodeljefe Apr 20, 2016
d9cd449
http: disallow sending obviously invalid status codes
mscdex Apr 20, 2016
4f6f599
zlib: fix use after null when calling .close
lightsofapollo Mar 31, 2016
3bacd19
test: add zlib close-after-error regression test
addaleax Apr 18, 2016
8dc1d5e
2016-04-21, Version 5.11.0 (Stable) Release
Apr 20, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
lib/internal/v8_prof_polyfill.js
lib/internal/v8_prof_processor.js
lib/punycode.js
test/addons/??_*/
test/fixtures
Expand Down
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules:
no-duplicate-case: 2
no-empty-character-class: 2
no-ex-assign: 2
no-extra-boolean-cast : 2
no-extra-boolean-cast: 2
no-extra-parens: [2, "functions"]
no-extra-semi: 2
no-func-assign: 2
Expand Down Expand Up @@ -85,8 +85,9 @@ rules:
prefer-const: 2

# Custom rules in tools/eslint-rules
assert-fail-single-argument: 2
new-with-error: [2, "Error", "RangeError", "TypeError", "SyntaxError", "ReferenceError"]

align-multiline-assignment: 2

# Global scoped method and vars
globals:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ _UpgradeReport_Files/
ipch/
*.sdf
*.opensdf
*.VC.opendb
.vs/

/config.mk
/config.gypi
Expand Down
9 changes: 8 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ To test if Node.js was built correctly:
$ node -e "console.log('Hello from Node.js ' + process.version)"
```

### Android / Android based devices, aka. Firefox OS
### Android / Android-based devices (e.g., Firefox OS)

Although these instructions for building on Android are provided, please note
that Android is not an officially supported platform at this time. Patches to
improve the Android build are accepted. However, there is no testing on Android
in the current continuous integration environment. The participation of people
dedicated and determined to improve Android building, testing, and support is
encouraged.

Be sure you have downloaded and extracted [Android NDK]
(https://developer.android.com/tools/sdk/ndk/index.html)
Expand Down
122 changes: 122 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ and built upon.
#### Respect the stability index

The rules for the master branch are less strict; consult the
[stability index](./doc/api/documentation.markdown#stability-index) for details.
[stability index](./doc/api/documentation..md#stability-index) for details.

In a nutshell, modules are at varying levels of API stability. Bug fixes are
always welcome but API or behavioral changes to modules at stability level 3
Expand Down Expand Up @@ -173,6 +173,7 @@ to address, apply your changes in a separate commit and push that to your
feature branch. Post a comment in the pull request afterwards; GitHub does
not send out notifications when you add commits.

<a id="developers-certificate-of-origin"></a>
## Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:
Expand Down
538 changes: 288 additions & 250 deletions LICENSE

Large diffs are not rendered by default.

39 changes: 24 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ PREFIX ?= /usr/local
FLAKY_TESTS ?= run
TEST_CI_ARGS ?=
STAGINGSERVER ?= node-www

OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')

ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
endif

ifdef QUICKCHECK
QUICKCHECK_ARG := --quickcheck
endif
Expand Down Expand Up @@ -128,7 +131,7 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
--nodedir="$(shell pwd)"

# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
test/addons/.docbuildstamp: doc/api/addons.markdown
test/addons/.docbuildstamp: doc/api/addons.md
$(RM) -r test/addons/??_*/
$(NODE) tools/doc/addon-verify.js
touch $@
Expand Down Expand Up @@ -168,7 +171,8 @@ test-all-valgrind: test-build
$(PYTHON) tools/test.py --mode=debug,release --valgrind

test-ci: | build-addons
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) addons message parallel sequential

test-release: test-build
Expand Down Expand Up @@ -235,9 +239,9 @@ test-v8-benchmarks:
test-v8-all: test-v8 test-v8-intl test-v8-benchmarks
# runs all v8 tests

apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json))
apidoc_sources = $(wildcard doc/api/*.md)
apidocs = $(addprefix out/,$(apidoc_sources:.md=.html)) \
$(addprefix out/,$(apidoc_sources:.md=.json))

apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets

Expand All @@ -254,10 +258,10 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
out/doc/%: doc/%
cp -r $< $@

out/doc/api/%.json: doc/api/%.markdown $(NODE_EXE)
out/doc/api/%.json: doc/api/%.md $(NODE_EXE)
$(NODE) tools/doc/generate.js --format=json $< > $@

out/doc/api/%.html: doc/api/%.markdown $(NODE_EXE)
out/doc/api/%.html: doc/api/%.md $(NODE_EXE)
$(NODE) tools/doc/generate.js --format=html --template=doc/template.html $< > $@

docopen: out/doc/api/all.html
Expand Down Expand Up @@ -469,15 +473,15 @@ doc-upload: tar
scp -pr out/doc/ $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/
ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done"

$(TARBALL)-headers: config.gypi release-only
$(TARBALL)-headers: release-only
$(PYTHON) ./configure \
--prefix=/ \
--dest-cpu=$(DESTCPU) \
--tag=$(TAG) \
--release-urlbase=$(RELEASE_URLBASE) \
$(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
HEADERS_ONLY=1 $(PYTHON) tools/install.py install '$(TARNAME)' '/'
find $(TARNAME)/ -type l | xargs rm # annoying on windows
find $(TARNAME)/ -type l | xargs rm -f
tar -cf $(TARNAME)-headers.tar $(TARNAME)
rm -rf $(TARNAME)
gzip -c -f -9 $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.gz
Expand Down Expand Up @@ -592,8 +596,13 @@ bench-idle:
$(NODE) benchmark/idle_clients.js &

jslint:
$(NODE) tools/eslint/bin/eslint.js benchmark lib src test tools/doc \
tools/eslint-rules --rulesdir tools/eslint-rules
$(NODE) tools/jslint.js -J benchmark lib src test tools/doc \
tools/eslint-rules tools/jslint.js

jslint-ci:
$(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
benchmark lib src test tools/doc \
tools/eslint-rules tools/jslint.js

CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_lttng.cc
Expand Down Expand Up @@ -621,13 +630,13 @@ cpplint:
@$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)

lint: jslint cpplint

lint-ci: lint
lint-ci: jslint-ci 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 test-addons build-addons website-upload pkg \
blog blogclean tar binary release-only bench-http-simple bench-idle \
bench-all bench bench-misc bench-array bench-buffer bench-net \
bench-http bench-fs bench-tls cctest run-ci test-v8 test-v8-intl \
test-v8-benchmarks test-v8-all v8 lint-ci bench-ci
test-v8-benchmarks test-v8-all v8 lint-ci bench-ci jslint-ci \
$(TARBALL)-headers
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ documentation of the latest stable version.

Stable, LTS and Nightly download directories all contain a *SHASUM256.txt*
file that lists the SHA checksums for each file available for
download. To check that a downloaded file matches the checksum, run
download.

The *SHASUM256.txt* can be downloaded using curl.

```
$ curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt
```

To check that a downloaded file matches the checksum, run
it through `sha256sum` with a command such as:

```
Expand Down Expand Up @@ -159,6 +167,7 @@ information about the governance of the Node.js project, see

### Collaborators

* [addaleax](https:/addaleax) - **Anna Henningsen** &lt;[email protected]&gt;
* [AndreasMadsen](https:/AndreasMadsen) - **Andreas Madsen** &lt;[email protected]&gt;
* [benjamingr](https:/benjamingr) - **Benjamin Gruenbaum** &lt;[email protected]&gt;
* [brendanashworth](https:/brendanashworth) - **Brendan Ashworth** &lt;[email protected]&gt;
Expand All @@ -168,6 +177,7 @@ information about the governance of the Node.js project, see
* [geek](https:/geek) - **Wyatt Preul** &lt;[email protected]&gt;
* [iarna](https:/iarna) - **Rebecca Turner** &lt;[email protected]&gt;
* [isaacs](https:/isaacs) - **Isaac Z. Schlueter** &lt;[email protected]&gt;
* [iWuzHere](https:/iWuzHere) - **Imran Iqbal** &lt;[email protected]&gt;
* [jbergstroem](https:/jbergstroem) - **Johan Bergström** &lt;[email protected]&gt;
* [joaocgreis](https:/joaocgreis) - **João Reis** &lt;[email protected]&gt;
* [julianduque](https:/julianduque) - **Julian Duque** &lt;[email protected]&gt;
Expand All @@ -188,9 +198,11 @@ information about the governance of the Node.js project, see
* [romankl](https:/romankl) - **Roman Klauke** &lt;[email protected]&gt;
* [saghul](https:/saghul) - **Saúl Ibarra Corretgé** &lt;[email protected]&gt;
* [sam-github](https:/sam-github) - **Sam Roberts** &lt;[email protected]&gt;
* [santigimeno](https:/santigimeno) - **Santiago Gimeno** &lt;[email protected]&gt;
* [seishun](https:/seishun) - **Nikolai Vavilov** &lt;[email protected]&gt;
* [silverwind](https:/silverwind) - **Roman Reiss** &lt;[email protected]&gt;
* [srl295](https:/srl295) - **Steven R Loomis** &lt;[email protected]&gt;
* [stefanmb](https:/stefanmb) - **Stefan Budeanu** &lt;[email protected]&gt;
* [targos](https:/targos) - **Michaël Zasso** &lt;[email protected]&gt;
* [tellnes](https:/tellnes) - **Christian Tellnes** &lt;[email protected]&gt;
* [thealphanerd](https:/thealphanerd) - **Myles Borins** &lt;[email protected]&gt;
Expand Down
58 changes: 58 additions & 0 deletions benchmark/buffers/buffer-compare-offset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
'use strict';
const common = require('../common.js');
const v8 = require('v8');

const bench = common.createBenchmark(main, {
method: ['offset', 'slice'],
size: [16, 512, 1024, 4096, 16386],
millions: [1]
});

function compareUsingSlice(b0, b1, len, iter) {

// Force optimization before starting the benchmark
Buffer.compare(b0.slice(1, len), b1.slice(1, len));
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(Buffer.compare)');
eval('%OptimizeFunctionOnNextCall(b0.slice)');
eval('%OptimizeFunctionOnNextCall(b1.slice)');
Buffer.compare(b0.slice(1, len), b1.slice(1, len));
doCompareUsingSlice(b0, b1, len, iter);
}

function doCompareUsingSlice(b0, b1, len, iter) {
var i;
bench.start();
for (i = 0; i < iter; i++)
Buffer.compare(b0.slice(1, len), b1.slice(1, len));
bench.end(iter / 1e6);
}

function compareUsingOffset(b0, b1, len, iter) {
len = len + 1;
// Force optimization before starting the benchmark
b0.compare(b1, 1, len, 1, len);
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(b0.compare)');
b0.compare(b1, 1, len, 1, len);
doCompareUsingOffset(b0, b1, len, iter);
}

function doCompareUsingOffset(b0, b1, len, iter) {
var i;
bench.start();
for (i = 0; i < iter; i++)
b0.compare(b1, 1, len, 1, len);
bench.end(iter / 1e6);
}

function main(conf) {
const iter = (conf.millions >>> 0) * 1e6;
const size = (conf.size >>> 0);
const method = conf.method === 'slice' ?
compareUsingSlice : compareUsingOffset;
method(Buffer.alloc(size, 'a'),
Buffer.alloc(size, 'b'),
size >> 1,
iter);
}
21 changes: 17 additions & 4 deletions benchmark/module/module-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ var tmpDirectory = path.join(__dirname, '..', 'tmp');
var benchmarkDirectory = path.join(tmpDirectory, 'nodejs-benchmark-module');

var bench = common.createBenchmark(main, {
thousands: [50]
thousands: [50],
fullPath: ['true', 'false']
});

function main(conf) {
var n = +conf.thousands * 1e3;

rmrf(tmpDirectory);
try { fs.mkdirSync(tmpDirectory); } catch (e) {}
try { fs.mkdirSync(benchmarkDirectory); } catch (e) {}

var n = +conf.thousands * 1e3;
for (var i = 0; i <= n; i++) {
fs.mkdirSync(benchmarkDirectory + i);
fs.writeFileSync(
Expand All @@ -28,10 +30,21 @@ function main(conf) {
);
}

measure(n);
if (conf.fullPath === 'true')
measureFull(n);
else
measureDir(n);
}

function measureFull(n) {
bench.start();
for (var i = 0; i <= n; i++) {
require(benchmarkDirectory + i + '/index.js');
}
bench.end(n / 1e3);
}

function measure(n) {
function measureDir(n) {
bench.start();
for (var i = 0; i <= n; i++) {
require(benchmarkDirectory + i);
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
'variables': {
'v8_enable_handle_zapping': 0,
},
'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
'cflags': [ '-O3' ],
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
Expand Down
4 changes: 2 additions & 2 deletions deps/http_parser/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
HELPER ?=
BINEXT ?=
ifeq (darwin,$(PLATFORM))
SONAME ?= libhttp_parser.2.6.2.dylib
SONAME ?= libhttp_parser.2.7.0.dylib
SOEXT ?= dylib
else ifeq (wine,$(PLATFORM))
CC = winegcc
BINEXT = .exe.so
HELPER = wine
else
SONAME ?= libhttp_parser.so.2.6.2
SONAME ?= libhttp_parser.so.2.7.0
SOEXT ?= so
endif

Expand Down
3 changes: 3 additions & 0 deletions deps/http_parser/http_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,9 @@ size_t http_parser_execute (http_parser *parser,
case 0:
break;

case 2:
parser->upgrade = 1;

case 1:
parser->flags |= F_SKIPBODY;
break;
Expand Down
9 changes: 7 additions & 2 deletions deps/http_parser/http_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {

/* Also update SONAME in the Makefile whenever you change these. */
#define HTTP_PARSER_VERSION_MAJOR 2
#define HTTP_PARSER_VERSION_MINOR 6
#define HTTP_PARSER_VERSION_PATCH 2
#define HTTP_PARSER_VERSION_MINOR 7
#define HTTP_PARSER_VERSION_PATCH 0

#include <sys/types.h>
#if defined(_WIN32) && !defined(__MINGW32__) && \
Expand Down Expand Up @@ -77,6 +77,11 @@ typedef struct http_parser_settings http_parser_settings;
* HEAD request which may contain 'Content-Length' or 'Transfer-Encoding:
* chunked' headers that indicate the presence of a body.
*
* Returning `2` from on_headers_complete will tell parser that it should not
* expect neither a body nor any futher responses on this connection. This is
* useful for handling responses to a CONNECT request which may not contain
* `Upgrade` or `Connection: upgrade` headers.
*
* http_data_cb does not return data chunks. It will be called arbitrarily
* many times for each string. E.G. you might get 10 callbacks for "on_url"
* each providing just a few characters more data.
Expand Down
Loading