Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit 90cf11c

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp3 to 1.15.0
PR-URL: #61512 Backport-PR-URL: #64675 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent e1f315a commit 90cf11c

10 files changed

Lines changed: 184 additions & 191 deletions

File tree

‎deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* Version number of the nghttp3 library release.
3333
*/
34-
#defineNGHTTP3_VERSION "1.14.0"
34+
#defineNGHTTP3_VERSION "1.15.0"
3535

3636
/**
3737
* @macro
@@ -41,6 +41,6 @@
4141
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4242
* becomes 0x010203.
4343
*/
44-
#defineNGHTTP3_VERSION_NUM0x010e00
44+
#defineNGHTTP3_VERSION_NUM0x010f00
4545

4646
#endif/* !defined(NGHTTP3_VERSION_H) */

‎deps/ngtcp2/nghttp3/lib/nghttp3_conn.c‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn,
21422142

21432143
intnghttp3_conn_bind_control_stream(nghttp3_conn*conn, int64_tstream_id) {
21442144
nghttp3_stream*stream;
2145-
nghttp3_frame_entryfrent;
2145+
nghttp3_framefr;
21462146
intrv;
21472147

21482148
assert(stream_id >= 0);
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) {
21682168
returnrv;
21692169
}
21702170

2171-
frent.fr.settings.type=NGHTTP3_FRAME_SETTINGS;
2172-
frent.aux.settings.local_settings=&conn->local.settings;
2171+
fr.settings= (nghttp3_frame_settings){
2172+
.type=NGHTTP3_FRAME_SETTINGS,
2173+
.local_settings=&conn->local.settings,
2174+
};
21732175

2174-
rv=nghttp3_stream_frq_add(stream, &frent);
2176+
rv=nghttp3_stream_frq_add(stream, &fr);
21752177
if (rv!=0) {
21762178
returnrv;
21772179
}
21782180

21792181
if (conn->local.settings.origin_list) {
21802182
assert(conn->server);
21812183

2182-
frent.fr.origin= (nghttp3_frame_origin){
2184+
fr.origin= (nghttp3_frame_origin){
21832185
.type=NGHTTP3_FRAME_ORIGIN,
21842186
.origin_list=*conn->local.settings.origin_list,
21852187
};
21862188

2187-
rv=nghttp3_stream_frq_add(stream, &frent);
2189+
rv=nghttp3_stream_frq_add(stream, &fr);
21882190
if (rv!=0) {
21892191
returnrv;
21902192
}
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream,
24142416
constnghttp3_data_reader*dr) {
24152417
intrv;
24162418
nghttp3_nv*nnva;
2417-
nghttp3_frame_entryfrent;
2419+
nghttp3_framefr;
24182420

24192421
rv=nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem);
24202422
if (rv!=0) {
24212423
returnrv;
24222424
}
24232425

2424-
frent.fr.headers= (nghttp3_frame_headers){
2426+
fr.headers= (nghttp3_frame_headers){
24252427
.type=NGHTTP3_FRAME_HEADERS,
24262428
.nva=nnva,
24272429
.nvlen=nvlen,
24282430
};
24292431

2430-
rv=nghttp3_stream_frq_add(stream, &frent);
2432+
rv=nghttp3_stream_frq_add(stream, &fr);
24312433
if (rv!=0) {
24322434
nghttp3_nva_del(nnva, conn->mem);
24332435
returnrv;
24342436
}
24352437

24362438
if (dr) {
2437-
frent.fr.data= (nghttp3_frame_data){
2439+
fr.data= (nghttp3_frame_data){
24382440
.type=NGHTTP3_FRAME_DATA,
2441+
.dr=*dr,
24392442
};
2440-
frent.aux.data.dr=*dr;
24412443

2442-
rv=nghttp3_stream_frq_add(stream, &frent);
2444+
rv=nghttp3_stream_frq_add(stream, &fr);
24432445
if (rv!=0) {
24442446
returnrv;
24452447
}
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
24932495

24942496
assert(!conn->server);
24952497
assert(conn->tx.qenc);
2496-
24972498
assert(stream_id >= 0);
24982499
assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT);
24992500
assert(nghttp3_client_stream_bidi(stream_id));
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id,
25152516
}
25162517
stream->rx.hstate=NGHTTP3_HTTP_STATE_RESP_INITIAL;
25172518
stream->user_data=stream_user_data;
2519+
stream->node.pri.inc=1;
25182520

25192521
nghttp3_http_record_request_method(stream, nva, nvlen);
25202522

@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id,
25852587
}
25862588

25872589
intnghttp3_conn_submit_shutdown_notice(nghttp3_conn*conn) {
2588-
nghttp3_frame_entryfrent;
2590+
nghttp3_framefr;
25892591
intrv;
25902592

25912593
assert(conn->tx.ctrl);
25922594

2593-
frent.fr.goaway= (nghttp3_frame_goaway){
2595+
fr.goaway= (nghttp3_frame_goaway){
25942596
.type=NGHTTP3_FRAME_GOAWAY,
25952597
.id=conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID
25962598
: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID,
25972599
};
25982600

2599-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2601+
assert(fr.goaway.id <= conn->tx.goaway_id);
26002602

2601-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2603+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26022604
if (rv!=0) {
26032605
returnrv;
26042606
}
26052607

2606-
conn->tx.goaway_id=frent.fr.goaway.id;
2608+
conn->tx.goaway_id=fr.goaway.id;
26072609
conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED;
26082610

26092611
return0;
26102612
}
26112613

26122614
intnghttp3_conn_shutdown(nghttp3_conn*conn) {
2613-
nghttp3_frame_entryfrent;
2615+
nghttp3_framefr;
26142616
intrv;
26152617

26162618
assert(conn->tx.ctrl);
26172619

2618-
frent.fr.goaway= (nghttp3_frame_goaway){
2620+
fr.goaway= (nghttp3_frame_goaway){
26192621
.type=NGHTTP3_FRAME_GOAWAY,
26202622
.id=conn->server ? nghttp3_min_int64((1ll << 62) -4,
26212623
conn->rx.max_stream_id_bidi+4)
26222624
: 0,
26232625
};
26242626

2625-
assert(frent.fr.goaway.id <= conn->tx.goaway_id);
2627+
assert(fr.goaway.id <= conn->tx.goaway_id);
26262628

2627-
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2629+
rv=nghttp3_stream_frq_add(conn->tx.ctrl, &fr);
26282630
if (rv!=0) {
26292631
returnrv;
26302632
}
26312633

2632-
conn->tx.goaway_id=frent.fr.goaway.id;
2634+
conn->tx.goaway_id=fr.goaway.id;
26332635
conn->flags |=
26342636
NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED;
26352637

@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28702872
constuint8_t*data,
28712873
size_tdatalen) {
28722874
nghttp3_stream*stream;
2873-
nghttp3_frame_entryfrent;
2875+
nghttp3_framefr;
28742876
uint8_t*buf=NULL;
28752877

28762878
assert(!conn->server);
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn,
28952897
memcpy(buf, data, datalen);
28962898
}
28972899

2898-
frent.fr.priority_update= (nghttp3_frame_priority_update){
2900+
fr.priority_update= (nghttp3_frame_priority_update){
28992901
.type=NGHTTP3_FRAME_PRIORITY_UPDATE,
29002902
.pri_elem_id=stream_id,
29012903
.data=buf,
29022904
.datalen=datalen,
29032905
};
29042906

2905-
returnnghttp3_stream_frq_add(conn->tx.ctrl, &frent);
2907+
returnnghttp3_stream_frq_add(conn->tx.ctrl, &fr);
29062908
}
29072909

29082910
intnghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn*conn,

‎deps/ngtcp2/nghttp3/lib/nghttp3_frame.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef struct nghttp3_frame_hd {
6060

6161
typedefstructnghttp3_frame_data {
6262
int64_ttype;
63+
/* dr is set when sending DATA frame. It is not used on
64+
reception. */
65+
nghttp3_data_readerdr;
6366
} nghttp3_frame_data;
6467

6568
typedefstructnghttp3_frame_headers {
@@ -88,6 +91,9 @@ typedef struct nghttp3_frame_settings {
8891
int64_ttype;
8992
size_tniv;
9093
nghttp3_settings_entry*iv;
94+
/* local_settings is set when sending SETTINGS frame. It is not
95+
used on reception. */
96+
constnghttp3_settings*local_settings;
9197
} nghttp3_frame_settings;
9298

9399
typedefstructnghttp3_frame_goaway {

‎deps/ngtcp2/nghttp3/lib/nghttp3_http.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static int memieq(const void *a, const void *b, size_t n) {
5959
return1;
6060
}
6161

62-
#definelstrieq(A, B, N) ((sizeof((A)) - 1) == (N) && memieq((A), (B), (N)))
62+
#definelstrieq(A, B, N) \
63+
(nghttp3_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
6364

6465
staticint64_tparse_uint(constuint8_t*s, size_tlen) {
6566
int64_tn=0;

0 commit comments

Comments
 (0)