-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
http2: Introducing http/2 #14239
http2: Introducing http/2 #14239
Commits on Aug 3, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 33ba2d8 - Browse repository at this point
Copy the full SHA 33ba2d8View commit details -
tls: add tlsSocket.disableRenegotiation()
Allows TLS renegotiation to be disabled per `TLSSocket` instance. Per HTTP/2, TLS renegotiation is forbidden after the initial connection prefix is exchanged.
Configuration menu - View commit details
-
Copy full SHA for 1cc4d86 - Browse repository at this point
Copy the full SHA 1cc4d86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 160197a - Browse repository at this point
Copy the full SHA 160197aView commit details -
At long last: The initial *experimental* implementation of HTTP/2. This is an accumulation of the work that has been done in the nodejs/http2 repository, squashed down to a couple of commits. The original commit history has been preserved in the nodejs/http2 repository. This PR introduces the nghttp2 C library as a new dependency. This library provides the majority of the HTTP/2 protocol implementation, with the rest of the code here providing the mapping of the library into a usable JS API. Within src, a handful of new node_http2_*.c and node_http2_*.h files are introduced. These provide the internal mechanisms that interface with nghttp and define the `process.binding('http2')` interface. The JS API is defined within `internal/http2/*.js`. There are two APIs provided: Core and Compat. The Core API is HTTP/2 specific and is designed to be as minimal and as efficient as possible. The Compat API is intended to be as close to the existing HTTP/1 API as possible, with some exceptions. Tests, documentation and initial benchmarks are included. The `http2` module is gated by a new `--expose-http2` command line flag. When used, `require('http2')` will be exposed to users. Note that there is an existing `http2` module on npm that would be impacted by the introduction of this module, which is the main reason for gating this behind a flag. When using `require('http2')` the first time, a process warning will be emitted indicating that an experimental feature is being used. To run the benchmarks, the `h2load` tool (part of the nghttp project) is required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only two benchmarks are currently available. Additional configuration options to enable verbose debugging are provided: ``` $ ./configure --debug-http2 --debug-nghttp2 $ NODE_DEBUG=http2 ./node ``` The `--debug-http2` configuration option enables verbose debug statements from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level debug output. The following illustrates as simple HTTP/2 server and client interaction: (The HTTP/2 client and server support both plain text and TLS connections) ```jt client = http2.connect('http://localhost:80'); const req = client.request({ ':path': '/some/path' }); req.on('data', (chunk) => { /* do something with the data */ }); req.on('end', () => { client.destroy(); }); // Plain text (non-TLS server) const server = http2.createServer(); server.on('stream', (stream, requestHeaders) => { stream.respond({ ':status': 200 }); stream.write('hello '); stream.end('world'); }); server.listen(80); ``` ```js const http2 = require('http2'); const client = http2.connect('http://localhost'); ``` Author: Anna Henningsen <[email protected]> Author: Colin Ihrig <[email protected]> Author: Daniel Bevenius <[email protected]> Author: James M Snell <[email protected]> Author: Jun Mukai Author: Kelvin Jin Author: Matteo Collina <[email protected]> Author: Robert Kowalski <[email protected]> Author: Santiago Gimeno <[email protected]> Author: Sebastiaan Deckers <[email protected]> Author: Yosuke Furukawa <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e1989a8 - Browse repository at this point
Copy the full SHA e1989a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 998a4ad - Browse repository at this point
Copy the full SHA 998a4adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 148dedd - Browse repository at this point
Copy the full SHA 148deddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3223555 - Browse repository at this point
Copy the full SHA 3223555View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb3a9c6 - Browse repository at this point
Copy the full SHA fb3a9c6View commit details -
test: fix flakiness in test-http2-client-upload
Race condition in the closing of the stream causing failure on some platforms.
Configuration menu - View commit details
-
Copy full SHA for e721353 - Browse repository at this point
Copy the full SHA e721353View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4f0a28 - Browse repository at this point
Copy the full SHA f4f0a28View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9848a1 - Browse repository at this point
Copy the full SHA b9848a1View commit details -
http2: refinement and test for socketError
Fixes: nodejs/http2#184 Refines the `'socketError'` event a bit and adds a test for the emission of the `'socketError'` event on the server. Client side is tested separately
Configuration menu - View commit details
-
Copy full SHA for 8dcad26 - Browse repository at this point
Copy the full SHA 8dcad26View commit details -
http2: fix socketOnTimeout and a segfault
Fixes: nodejs/http2#179 Was fixing issue nodejs#179 and encountered a segault that was happening somewhat randomly on session destruction. Both should be fixed
Configuration menu - View commit details
-
Copy full SHA for 754d713 - Browse repository at this point
Copy the full SHA 754d713View commit details -
http2: add range support for respondWith{File|FD}
* respondWithFD now supports optional statCheck * respondWithFD and respondWithFile both support offset/length for range requests * Fix linting nits following most recent update
Configuration menu - View commit details
-
Copy full SHA for 6371510 - Browse repository at this point
Copy the full SHA 6371510View commit details -
http2: doc and fixes to the Compatibility API
PR-URL: nodejs/http2#186 Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0bdfee6 - Browse repository at this point
Copy the full SHA 0bdfee6View commit details -
http2: make writeHead behave like HTTP/1.
PR-URL: nodejs/http2#186 Reviewed-By: James M Snell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f51e7d - Browse repository at this point
Copy the full SHA 2f51e7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 571deed - Browse repository at this point
Copy the full SHA 571deedView commit details -
Rather than using the `'fetchTrailers'` event to collect trailers, a new `getTrailers` callback option is supported. If not set, the internals will skip calling out for trailers at all. Expands the test to make sure trailers work from the client side also.
Configuration menu - View commit details
-
Copy full SHA for ec70fc5 - Browse repository at this point
Copy the full SHA ec70fc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2358b11 - Browse repository at this point
Copy the full SHA 2358b11View commit details -
Configuration menu - View commit details
-
Copy full SHA for d17aedb - Browse repository at this point
Copy the full SHA d17aedbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40bd27c - Browse repository at this point
Copy the full SHA 40bd27cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e447fe - Browse repository at this point
Copy the full SHA 5e447feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 358b3df - Browse repository at this point
Copy the full SHA 358b3dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7539a6 - Browse repository at this point
Copy the full SHA b7539a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 886d2c6 - Browse repository at this point
Copy the full SHA 886d2c6View commit details
Commits on Aug 4, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 873c1c5 - Browse repository at this point
Copy the full SHA 873c1c5View commit details