diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-04-17 20:40:48 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-05-05 13:35:18 -0400 |
commit | 1ed3a78ea9f51c33c348de6aaa02447d3ac54fae (patch) | |
tree | 3267fe7d76b46bfd20b7f52b1eae1b8e17709e17 /src/h2.c | |
parent | 59b9a9a73d1d47c72483e040b8a45dcdac05f4cd (diff) | |
download | lighttpd-git-1ed3a78ea9f51c33c348de6aaa02447d3ac54fae.tar.gz |
[core] send Priority resp hdr w/ .css, .js re-prio
send Priority response header with .css, .js re-prioriziation
Diffstat (limited to 'src/h2.c')
-rw-r--r-- | src/h2.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1632,8 +1632,12 @@ h2_recv_headers (connection * const con, uint8_t * const s, uint32_t flen) /*(bump .js and .css to urgency 2; see h2_init_stream())*/ const uint32_t len = buffer_clen(&r->target); const char * const p = r->target.ptr+len-4; - if (len>=4 && (0==memcmp(p+1,".js",3) || 0==memcmp(p,".css",4))) + if (len>=4 && (0==memcmp(p+1,".js",3)||0==memcmp(p,".css",4))) { r->h2_prio = (2 << 1) | !0; /*(urgency=2, incremental=0)*/ + http_header_response_set(r, HTTP_HEADER_PRIORITY, + CONST_STR_LEN("priority"), + CONST_STR_LEN("u=2")); + } } } if (h2c->rused-1) /*(true if more than one active stream)*/ |