mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-31 23:58:16 +00:00
MINOR: h2: Set flags about the request's scheme on the start-line
The flag HTX_SL_F_HAS_SCHM is always set because H2 requests have always an explicit scheme. Then, the pseudo-header ":scheme" is tested. If it is set to "http", the flag HTX_SL_F_SCHM_HTTP is set. Otherwise, for all other cases, the flag HTX_SL_F_SCHM_HTTPS is set. For now, it seems reasonable to have a fallback on the scheme "https".
This commit is contained in:
parent
e21c01637a
commit
a9a5c04c23
2
src/h2.c
2
src/h2.c
@ -555,6 +555,8 @@ static struct htx_sl *h2_prepare_htx_reqline(uint32_t fields, struct ist *phdr,
|
||||
goto fail;
|
||||
|
||||
sl->info.req.meth = find_http_meth(phdr[H2_PHDR_IDX_METH].ptr, phdr[H2_PHDR_IDX_METH].len);
|
||||
sl->flags |= HTX_SL_F_HAS_SCHM;
|
||||
sl->flags |= (isteqi(phdr[H2_PHDR_IDX_SCHM], ist("http")) ? HTX_SL_F_SCHM_HTTP : HTX_SL_F_SCHM_HTTPS);
|
||||
return sl;
|
||||
fail:
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user