diff options
Diffstat (limited to 'src/plugins/hs_apps')
-rw-r--r-- | src/plugins/hs_apps/http_cli.c | 10 | ||||
-rw-r--r-- | src/plugins/hs_apps/proxy.c | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/hs_apps/http_cli.c b/src/plugins/hs_apps/http_cli.c index 89eb49c8ec7..d670ae6b369 100644 --- a/src/plugins/hs_apps/http_cli.c +++ b/src/plugins/hs_apps/http_cli.c @@ -419,14 +419,14 @@ hcs_ts_rx_callback (session_t *ts) msg.data.headers_len, hs->req_headers.buf); ASSERT (rv == msg.data.headers_len); http_build_header_table (&hs->req_headers, msg); - const http_header_t *accept = http_get_header ( + const http_token_t *accept_value = http_get_header ( &hs->req_headers, http_header_name_token (HTTP_HEADER_ACCEPT)); - if (accept) + if (accept_value) { - HCS_DBG ("client accept: %U", format_http_bytes, accept->value.base, - accept->value.len); + HCS_DBG ("client accept: %U", format_http_bytes, accept_value->base, + accept_value->len); /* just for testing purpose, we don't care about precedence */ - if (http_token_contains (accept->value.base, accept->value.len, + if (http_token_contains (accept_value->base, accept_value->len, http_token_lit ("text/plain"))) args.plain_text = 1; } diff --git a/src/plugins/hs_apps/proxy.c b/src/plugins/hs_apps/proxy.c index f3b1fdce48c..7407bcb9f0d 100644 --- a/src/plugins/hs_apps/proxy.c +++ b/src/plugins/hs_apps/proxy.c @@ -592,13 +592,12 @@ proxy_http_connect (session_t *s, vnet_connect_args_t *a) msg.data.headers_len, req_headers.buf); ASSERT (rv == msg.data.headers_len); http_build_header_table (&req_headers, msg); - const http_header_t *capsule_protocol = http_get_header ( + const http_token_t *capsule_protocol = http_get_header ( &req_headers, http_header_name_token (HTTP_HEADER_CAPSULE_PROTOCOL)); if (capsule_protocol) { PROXY_DBG ("Capsule-Protocol header present"); - if (!http_token_is (capsule_protocol->value.base, - capsule_protocol->value.len, + if (!http_token_is (capsule_protocol->base, capsule_protocol->len, http_token_lit (HTTP_BOOLEAN_TRUE))) { PROXY_DBG ("Capsule-Protocol invalid value"); |