From 6d25db5ffa5cd20cf6358870e1e4a939bb6c4a2d Mon Sep 17 00:00:00 2001 From: "Alan M. Carroll" Date: Fri, 28 Jun 2019 13:19:33 -0500 Subject: [PATCH] HTTP/2 - tweak for better field name handling. --- proxy/http2/Http2Stream.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index 51b3759399d..09877f2890c 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -768,9 +768,8 @@ void Http2Stream::response_initialize_data_handling(bool &is_done) { is_done = false; - const char *name = "transfer-encoding"; - const char *value = "chunked"; - int chunked_index = response_header.value_get_index(name, strlen(name), value, strlen(value)); + int chunked_index = response_header.value_get_index(TS_MIME_FIELD_TRANSFER_ENCODING, TS_MIME_LEN_TRANSFER_ENCODING, + TS_HTTP_VALUE_CHUNKED, TS_HTTP_LEN_CHUNKED); // -1 means this value was not found for this field if (chunked_index >= 0) { Http2StreamDebug("Response is chunked");