Skip to content

Commit a037770

Browse files
jasnellMylesBorins
authored andcommitted
src,http2: introduce node_http_common
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 <[email protected]> PR-URL: #32069 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 50094de commit a037770

7 files changed

+862
-474
lines changed

node.gyp

+2
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@
664664
'src/node_errors.h',
665665
'src/node_file.h',
666666
'src/node_file-inl.h',
667+
'src/node_http_common.h',
668+
'src/node_http_common-inl.h',
667669
'src/node_http2.h',
668670
'src/node_http2_state.h',
669671
'src/node_i18n.h',

src/env.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ class IsolateData : public MemoryRetainer {
510510
#undef VS
511511
#undef VP
512512

513-
std::unordered_map<nghttp2_rcbuf*, v8::Eternal<v8::String>> http2_static_strs;
513+
std::unordered_map<const char*, v8::Eternal<v8::String>> http_static_strs;
514514
inline v8::Isolate* isolate() const;
515515
IsolateData(const IsolateData&) = delete;
516516
IsolateData& operator=(const IsolateData&) = delete;

0 commit comments

Comments
 (0)