We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Object.create(null)
1 parent 7817b87 commit c972ce2Copy full SHA for c972ce2
lib/internal/http2/compat.js
@@ -287,6 +287,9 @@ class Http2ServerRequest extends Readable {
287
closed: false,
288
didRead: false,
289
};
290
+ // Headers in HTTP/1 are not initialized using Object.create(null) which,
291
+ // although preferable, would simply break too much code. Ergo header
292
+ // initialization using Object.create(null) in HTTP/2 is intentional.
293
this[kHeaders] = headers;
294
this[kRawHeaders] = rawHeaders;
295
this[kTrailers] = {};
0 commit comments