Skip to content

Commit

Permalink
src,http2: introduce node_http_common
Browse files Browse the repository at this point in the history
The nghttp2 and nghttp3 (used in the QUIC implementation) share nearly
identical structs for header handling. However, they differ enough that
they need to be handled slightly different in each case. This PR
includes some elements introduced in the QUIC PR separated out to
make them independently reviewable, and updates the http2 implementation
to use the shared utilities.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #32069
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
jasnell committed Mar 6, 2020
1 parent b6cd215 commit 434d39d
Show file tree
Hide file tree
Showing 7 changed files with 862 additions and 474 deletions.
2 changes: 2 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@
'src/node_errors.h',
'src/node_file.h',
'src/node_file-inl.h',
'src/node_http_common.h',
'src/node_http_common-inl.h',
'src/node_http2.h',
'src/node_http2_state.h',
'src/node_i18n.h',
Expand Down
2 changes: 1 addition & 1 deletion src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class IsolateData : public MemoryRetainer {
#undef VS
#undef VP

std::unordered_map<nghttp2_rcbuf*, v8::Eternal<v8::String>> http2_static_strs;
std::unordered_map<const char*, v8::Eternal<v8::String>> http_static_strs;
inline v8::Isolate* isolate() const;
IsolateData(const IsolateData&) = delete;
IsolateData& operator=(const IsolateData&) = delete;
Expand Down
Loading

0 comments on commit 434d39d

Please sign in to comment.