diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-07-01 01:20:09 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-07-16 00:25:47 +0200 |
commit | e876c0c308bb98ed08ec9cae9f04a65a48517be5 (patch) | |
tree | e542873e53ea1a07e794394e3f3d14f070e97e99 /src/node_http_common-inl.h | |
parent | 9ae849120429870af17fbba5ed8c75a215daf899 (diff) | |
download | node-new-e876c0c308bb98ed08ec9cae9f04a65a48517be5.tar.gz |
http2: add support for sensitive headers
Add support for “sensitive”/“never-indexed” HTTP2 headers.
Fixes: https://github.com/nodejs/node/issues/34091
PR-URL: https://github.com/nodejs/node/pull/34145
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'src/node_http_common-inl.h')
-rw-r--r-- | src/node_http_common-inl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/node_http_common-inl.h b/src/node_http_common-inl.h index 7cd4bdec99..6ddc99e7d4 100644 --- a/src/node_http_common-inl.h +++ b/src/node_http_common-inl.h @@ -55,13 +55,14 @@ NgHeaders<T>::NgHeaders(Environment* env, v8::Local<v8::Array> headers) { return; } - nva[n].flags = T::kNoneFlag; nva[n].name = reinterpret_cast<uint8_t*>(p); nva[n].namelen = strlen(p); p += nva[n].namelen + 1; nva[n].value = reinterpret_cast<uint8_t*>(p); nva[n].valuelen = strlen(p); p += nva[n].valuelen + 1; + nva[n].flags = *p; + p++; } } @@ -189,6 +190,11 @@ size_t NgHeader<T>::length() const { return name_.len() + value_.len(); } +template <typename T> +uint8_t NgHeader<T>::flags() const { + return flags_; +} + } // namespace node #endif // SRC_NODE_HTTP_COMMON_INL_H_ |