summaryrefslogtreecommitdiff
path: root/src/node_http2.h
AgeCommit message (Collapse)Author
2018-05-02http2: remove unused using declarations node_http2Daniel Bevenius
PR-URL: https://github.com/nodejs/node/pull/20420 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-28http2: fix responses to long payload reqsAnatoli Papirovski
When a request with a long payload is received, http2 does not allow a response that does not process all the incoming payload. Add a conditional Http2Stream.close call that runs only if the user hasn't attempted to read the stream. PR-URL: https://github.com/nodejs/node/pull/20084 Fixes: https://github.com/nodejs/node/issues/20060 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-04-16http2: refactor how trailers are doneJames M Snell
Rather than an option, introduce a method and an event... ```js server.on('stream', (stream) => { stream.respond(undefined, { waitForTrailers: true }); stream.on('wantTrailers', () => { stream.sendTrailers({ abc: 'xyz'}); }); stream.end('hello world'); }); ``` This is a breaking change in the API such that the prior `options.getTrailers` is no longer supported at all. Ordinarily this would be semver-major and require a deprecation but the http2 stuff is still experimental. PR-URL: https://github.com/nodejs/node/pull/19959 Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-18http2: clean up Http2SettingsJames M Snell
Use of a MaybeStackBuffer was just silly. Fix a long standing todo Reduce code duplication a bit. PR-URL: https://github.com/nodejs/node/pull/19400 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-18http2: don't aggressively inlineJames M Snell
Most of the inlines were leftovers from a much older design iteration and are largely pointless or counter productive. PR-URL: https://github.com/nodejs/node/pull/19400 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-15http2: use native pipe instead of synchronous I/OAnna Henningsen
This resolves the issue of using synchronous I/O for `respondWithFile()` and `respondWithFD()`, and enables scenarios in which the underlying file does not need to be a regular file. PR-URL: https://github.com/nodejs/node/pull/18936 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-15src: give StreamBases the capability to ask for dataAnna Henningsen
Add a `OnStreamWantsWrite()` event that allows streams to ask for more input data if they want some. PR-URL: https://github.com/nodejs/node/pull/18936 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-11http2: simplify timeout trackingAnna Henningsen
There’s no need to reset the chunk counter for every write. PR-URL: https://github.com/nodejs/node/pull/19206 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-03-04http2: no stream destroy while its data is on the wireAnna Henningsen
This fixes a crash that occurred when a `Http2Stream` write is completed after it is already destroyed. Instead, don’t destroy the stream in that case and wait for GC to take over. PR-URL: https://github.com/nodejs/node/pull/19002 Fixes: https://github.com/nodejs/node/issues/18973 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-19src: add nullptr check for session in DEBUG macroDaniel Bevenius
Currenlty when configuring --debug-http2 /test/parallel/test-http2-getpackedsettings.js will segment fault: $ out/Debug/node test/parallel/test-http2-getpackedsettings.js Segmentation fault: 11 This is happening because the settings is created with the Environment in PackSettings: Http2Session::Http2Settings settings(env); This will cause the session to be set to nullptr. When the init function is later called the expanded DEBUG_HTTP2SESSION macro will cause the segment fault when the session is dereferenced. PR-URL: https://github.com/nodejs/node/pull/18815 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-14src: refactor WriteWrap and ShutdownWrapsAnna Henningsen
Encapsulate stream requests more: - `WriteWrap` and `ShutdownWrap` classes are now tailored to the streams on which they are used. In particular, for most streams these are now plain `AsyncWrap`s and do not carry the overhead of unused libuv request data. - Provide generic `Write()` and `Shutdown()` methods that wrap around the actual implementations, and make *usage* of streams easier, rather than implementing; for example, wrap objects don’t need to be provided by callers anymore. - Use `EmitAfterWrite()` and `EmitAfterShutdown()` handlers to call the corresponding JS handlers, rather than always trying to call them. This makes usage of streams by other C++ code easier and leaner. Also fix up some tests that were previously not actually testing asynchronicity when the comments indicated that they would. PR-URL: https://github.com/nodejs/node/pull/18676 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01src: refactor stream callbacks and ownershipAnna Henningsen
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: https://github.com/nodejs/node/pull/18334 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-18http2: refactor read mechanismAnna Henningsen
Refactor the read mechanism to completely avoid copying. Instead of copying individual `DATA` frame contents into buffers, create `ArrayBuffer` instances for all socket reads and emit slices of those `ArrayBuffer`s to JS. PR-URL: https://github.com/nodejs/node/pull/18030 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-14src: remove declarations for missing functionsAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/18134 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-09http2: use aliased buffer for perf stats, add statsJames M Snell
Add an aliased buffer for session and stream statistics, add a few more metrics PR-URL: https://github.com/nodejs/node/pull/18020 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-05http2: implement maxSessionMemoryJames M Snell
The maxSessionMemory is a cap for the amount of memory an Http2Session is permitted to consume. If exceeded, new `Http2Stream` sessions will be rejected with an `ENHANCE_YOUR_CALM` error and existing `Http2Stream` instances that are still receiving headers will be terminated with an `ENHANCE_YOUR_CALM` error. PR-URL: https://github.com/nodejs/node/pull/17967 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03http2: properly handle already closed stream errorJames M Snell
PR-URL: https://github.com/nodejs/node/pull/17942 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03http2: add aligned padding strategyJames M Snell
Add a padding strategy option that makes a best attempt to ensure that total frame length for DATA and HEADERS frames are aligned on multiples of 8-bytes. PR-URL: https://github.com/nodejs/node/pull/17938 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03http2: add altsvc supportJames M Snell
Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-02http2: strictly limit number on concurrent streamsJames M Snell
Strictly limit the number of concurrent streams based on the current setting of the MAX_CONCURRENT_STREAMS setting PR-URL: https://github.com/nodejs/node/pull/16766 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2018-01-02http2: perf_hooks integrationJames M Snell
Collect and report basic timing information about `Http2Session` and `Http2Stream` instances. PR-URL: https://github.com/nodejs/node/pull/17906 Refs: https://github.com/nodejs/node/issues/17746 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-27http2: keep session objects alive during Http2ScopeAnna Henningsen
Keep a local handle as a reference to the JS `Http2Session` object so that it will not be garbage collected when inside an `Http2Scope`, because the presence of the latter usually indicates that further actions on the session object are expected. Strictly speaking, storing the `session_handle_` as a property on the scope object is not necessary, but this is not very costly and makes the code more obviously correct. Fixes: https://github.com/nodejs/node/issues/17840 PR-URL: https://github.com/nodejs/node/pull/17863 Fixes: https://github.com/nodejs/node/issues/17840 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-22http2: convert Http2Settings to an AsyncWrapJames M Snell
PR-URL: https://github.com/nodejs/node/pull/17763 Refs: https://github.com/nodejs/node/issues/17746 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-19http2: refactor outgoing write mechanismAnna Henningsen
- Only finish outgoing `WriteWrap`s once data has actually been passed to the underlying socket. - This makes HTTP2 streams respect backpressure - Use `DoTryWrite` as a shortcut for sending out as much of the data synchronously without blocking as possible - Use `NGHTTP2_DATA_FLAG_NO_COPY` to avoid copying DATA frame contents into nghttp2’s buffers before sending them out. PR-URL: https://github.com/nodejs/node/pull/17718 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-19http2: remove redundant write indirectionAnna Henningsen
`nghttp2_stream_write_t` was not a necessary redirection layer and came with the cost of one additional allocation per stream write. Also, having both `nghttp2_stream_write` and `nghttp2_stream_write_t` as identifiers did not help with readability. PR-URL: https://github.com/nodejs/node/pull/17718 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-18http2: cleanup Http2Stream/Http2Session destroyJames M Snell
PR-URL: https://github.com/nodejs/node/pull/17406 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> This is a significant cleanup and refactoring of the cleanup/close/destroy logic for Http2Stream and Http2Session. There are significant changes here in the timing and ordering of cleanup logic, JS apis. and various related necessary edits.
2017-12-13src: remove `StreamResourc::Cast()`Anna Henningsen
This is not necessary since C++ already has `static_cast` as a proper way to cast inside a class hierarchy. PR-URL: https://github.com/nodejs/node/pull/17564 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-27http2: only schedule write when necessaryAnna Henningsen
Introduce an `Http2Scope` class that, when it goes out of scope, checks whether a write to the network is desired by nghttp2. If that is the case, schedule a write using `SetImmediate()` rather than a custom per-session libuv handle. PR-URL: https://github.com/nodejs/node/pull/17183 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-11-21src: fix compiler warningcjihrig
This commit fixes a -Winconsistent-missing-override warning. PR-URL: https://github.com/nodejs/node/pull/17195 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-21http2: major update to internalsJames M Snell
This update does several significant things: 1. It eliminates the base Nghttp2* classes and folds those in to node::http2::Http2Session and node::http2::Http2Stream 2. It makes node::http2::Http2Stream a StreamBase instance and sends that out to JS-land to act as the [kHandle] for the JavaScript Http2Stream class. 3. It shifts some of the callbacks from C++ off of the JavaScript Http2Session class to the Http2Stream class. 4. It refactors the data provider structure for FD and Stream based sending to help encapsulate those functions easier 5. It streamlines some of the functions at the C++ layer to eliminate now unnecessary redirections 6. It cleans up node_http2.cc for better readability and maintainability 7. It refactors some of the debug output 8. Because Http2Stream instances are now StreamBases, they are now also trackable using async-hooks 9. The Stream::OnRead algorithm has been simplified with a couple bugs fixed. 10. I've eliminated node_http2_core.h and node_http2_core-inl.h 11. Detect invalid handshake a report protocol error to session 12. Refactor out of memory error, improve other errors 13. Add Http2Session.prototype.ping PR-URL: https://github.com/nodejs/node/pull/17105 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-12http2: multiple smaller code cleanupsJames M Snell
* Add Http2Priority utility class * Reduces some code duplication * Other small minor cleanups PR-URL: https://github.com/nodejs/node/pull/16764 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-11-07src: fix -Winconsistent-missing-override warningBen Noordhuis
Fix a compiler warning that was introduced in commit 4db1bc8f205 ("http2: allocate on every chunk send") by adding an `override` keyword. PR-URL: https://github.com/nodejs/node/pull/16726 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-11-04http2: refactor multiple internalsJames M Snell
* eliminate pooling of Nghttp2Stream instances. After testing, the pooling is not having any tangible benefit and makes things more complicated. Simplify. Simplify. * refactor inbound headers * Enforce MAX_HEADERS_LIST setting and limit the number of header pairs accepted from the peer. Use the ENHANCE_YOUR_CALM error code when receiving either too many headers or too many octets. Use a vector to store the headers instead of a queue PR-URL: https://github.com/nodejs/node/pull/16676 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-11-04http, http2: add 103 Early Hints status codeYosuke Furukawa
PR-URL: https://github.com/nodejs/node/pull/16644 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-11-03http2: allocate on every chunk sendJames M Snell
Previously, we were using a shared stack allocated buffer to hold the serialized outbound data but that runs into issues if the outgoing stream does not write or copy immediately. Instead, allocate a buffer each time. Slight additional overhead here, but necessary. Later on, once we've analyzed this more, we might be able to switch to a stack allocated ring or slab buffer but that's a bit more complicated than what we strictly need right now. PR-URL: https://github.com/nodejs/node/pull/16669 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-11-03http2: refactor settings handlingJames M Snell
Add `Http2Seettings` utility class for handling settings logic and reducing code duplication. PR-URL: https://github.com/nodejs/node/pull/16668 Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-10-30http2: make sessions garbage-collectibleAnna Henningsen
Use weak handles to track the lifetime of an `Http2Session` instance. Refs: https://github.com/nodejs/http2/issues/140 PR-URL: https://github.com/nodejs/node/pull/16461 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-10-30http2: move uv_prepare handle to `Http2Session`Anna Henningsen
As far as I understand it, `Nghttp2Session` should not be concerned about how its consumers handle I/O. PR-URL: https://github.com/nodejs/node/pull/16461 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-10-29http2: fix several timeout related issuesAnatoli Papirovski
* correctly reset write timers: currently reset timers on both session & stream when write starts and when it ends. * prevent large writes from timing out: when writing a large chunk of data in http2, once the data is handed off to C++, the JS session & stream lose all track of the write and will timeout if the write doesn't complete within the timeout window Fix this issue by tracking whether a write request is ongoing and also tracking how many chunks have been sent since the most recent write started. (Since each write call resets the timer.) PR-URL: https://github.com/nodejs/node/pull/16525 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-27http2: adjust stream buffer sizeAnatoli Papirovski
Adjust stream buffer size to allow full 4 default-sized frames including their frame headers to allow more efficient sending of data to the socket. PR-URL: https://github.com/nodejs/node/pull/16445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-25src: remove empty comment in node_http2.hDaniel Bevenius
This commit removes an "empty" comment in node_http2.h that I don't think was intentional and as far as I can tell not a doxygen comment or anything like that. This was not picked up by the cpp linter so a suggestion has also been added to the CheckComment function to detect these in the future. PR-URL: https://github.com/nodejs/node/pull/16400 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-23http2: multiple style and performance updatesJames M Snell
* move CHECK statements into DEBUG checks * improve performance by removing branches * Several if checks were left in while the code was being developed. Now that the core API has stablized more, the checks are largely unnecessary and can be removed, yielding a significant boost in performance. * refactor flow control for proper backpressure * use std::queue for inbound headers * use std::queue for outbound data * remove now unnecessary FreeHeaders function * expand comments and miscellaneous edits * add a couple of misbehaving flow control tests PR-URL: https://github.com/nodejs/node/pull/16239 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-20http2: expand list of known headersAnatoli Papirovski
Add access-control-*, dnt, forwarded, trailer, tk, upgrade-insecure-requests, warning, x-content-type-options and x-frame-options to known list of headers for HTTP2. Expand tests to account for these headers. Fixes: https://github.com/nodejs/node/issues/15337 Refs: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers Refs: https://www.w3.org/TR/cors/#syntax Refs: https://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html#dnt-header-field Refs: https://tools.ietf.org/html/rfc7239#section-4 Refs: https://tools.ietf.org/html/rfc7230#section-4.4 Refs: https://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html#response-header-field Refs: https://www.w3.org/TR/upgrade-insecure-requests/#preference Refs: https://tools.ietf.org/html/rfc7234#section-5.5 Refs: https://fetch.spec.whatwg.org/#x-content-type-options-header Refs: https://tools.ietf.org/html/rfc7034 PR-URL: https://github.com/nodejs/node/pull/15434 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-13http2,async-wrap: introduce AliasedBuffer classMike Kaufman
This change introduces an AliasedBuffer class and updates asytnc-wrap and http2 to use this class. A common technique to optimize performance is to create a native buffer and then map that native buffer to user space via JS array. The runtime can efficiently write to the native buffer without having to route though JS, and the values being written are accessible from user space. While efficient, this technique allows modifications to user space memory w/out going through JS type system APIs, effectively bypassing any monitoring the JS VM has in place to track program state modifications. The result is that monitors have an incorrect view of prorgram state. The AliasedBuffer class provides a future placeholder where this technique can be used, but writes can still be observed. To achieve this, the node-chakra-core fork will add in appropriate tracking logic in the AliasedBuffer's SetValue() method. Going forward, this class can evolve to support more sophisticated mechanisms if necessary. PR-URL: https://github.com/nodejs/node/pull/15077 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-01doc,lib,src,test: strip executable bits off filesAnna Henningsen
Remove the executable bits of the file modes of some files that accidentally received it. PR-URL: https://github.com/nodejs/node/pull/15132 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-17http2: minor refactor of passing headers to JSAnna Henningsen
- Make `ExternalString::New` return a `MaybeLocal`. Failing is left up to the caller. - Allow creating internalized strings for short header names to reduce memory consumption and increase performance. - Use persistent storage for statically allocated header names. PR-URL: https://github.com/nodejs/node/pull/14808 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-08-16http2: handful of http/2 src cleanupsJames M Snell
* inline more stuff. remove a node_http2_core.cc * clean up debug messages * simplify options code, and cleanup PR-URL: https://github.com/nodejs/node/pull/14825 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-08-13http2: improve perf of passing headers to C++Anna Henningsen
By passing a single string rather than many small ones and a single block allocation for passing headers, save expensive interactions with JS values and memory allocations. PR-URL: https://github.com/nodejs/node/pull/14723 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-10src,http2: DRY header/trailer handling code upAnna Henningsen
Remove duplicate code through minor refactoring. PR-URL: https://github.com/nodejs/node/pull/14688 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-04http2: fix socketOnTimeout and a segfaultJames M Snell
Fixes: https://github.com/nodejs/http2/issues/179 Was fixing issue #179 and encountered a segault that was happening somewhat randomly on session destruction. Both should be fixed PR-URL: https://github.com/nodejs/node/pull/14239 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>