GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — quic: reuse header support assertion · nodejs/node@613b8b6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/quic
    • quic.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/quic/quic.js‎

Copy file name to clipboardExpand all lines: lib/internal/quic/quic.js
+4-16Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,10 +2165,7 @@ class QuicStream {
21652165
sendHeaders(headers, options = kEmptyObject) {
21662166
assertIsQuicStream(this);
21672167
if (this.destroyed) return false;
2168-
if (getQuicSessionState(this.#inner.session).headersSupported === 2) {
2169-
throw new ERR_INVALID_STATE(
2170-
'The negotiated QUIC application protocol does not support headers');
2171-
}
2168+
assertHeadersSupported(this.#inner.session);
21722169
validateObject(headers, 'headers');
21732170
const { terminal = false } = options;
21742171
const headerString = buildNgHeaderString(
@@ -2187,10 +2184,7 @@ class QuicStream {
21872184
sendInformationalHeaders(headers) {
21882185
assertIsQuicStream(this);
21892186
if (this.destroyed) return false;
2190-
if (getQuicSessionState(this.#inner.session).headersSupported === 2) {
2191-
throw new ERR_INVALID_STATE(
2192-
'The negotiated QUIC application protocol does not support headers');
2193-
}
2187+
assertHeadersSupported(this.#inner.session);
21942188
validateObject(headers, 'headers');
21952189
const headerString = buildNgHeaderString(
21962190
headers, assertValidPseudoHeader, true);
@@ -2208,10 +2202,7 @@ class QuicStream {
22082202
sendTrailers(headers) {
22092203
assertIsQuicStream(this);
22102204
if (this.destroyed) return false;
2211-
if (getQuicSessionState(this.#inner.session).headersSupported === 2) {
2212-
throw new ERR_INVALID_STATE(
2213-
'The negotiated QUIC application protocol does not support headers');
2214-
}
2205+
assertHeadersSupported(this.#inner.session);
22152206
validateObject(headers, 'headers');
22162207
const headerString = buildNgHeaderString(headers);
22172208
return sendHeaders(
@@ -2683,10 +2674,7 @@ class QuicStream {
26832674
[kSendHeaders](headers, kind = kHeadersKindInitial,
26842675
flags = kHeadersFlagsTerminal) {
26852676
validateObject(headers, 'headers');
2686-
if (getQuicSessionState(this.#inner.session).headersSupported === 2) {
2687-
throw new ERR_INVALID_STATE(
2688-
'The negotiated QUIC application protocol does not support headers');
2689-
}
2677+
assertHeadersSupported(this.#inner.session);
26902678
if (this.pending) {
26912679
debug('pending stream enqueuing headers', headers);
26922680
} else {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.