bugfix: HTTP Parser中log error时无效的stream info

This commit is contained in:
luwenpeng
2024-04-11 18:42:12 +08:00
parent 641c14f55a
commit 4ca3f5a4a2

View File

@@ -318,8 +318,8 @@ static int __parser_callback_on_headers_complete(http_parser * parser)
char *__str_transfer_encoding = (char *)tfe_http_field_read(hf_public, &__transfer_encoding_field_name);
if (!(__str_transfer_encoding && strncasecmp(__str_transfer_encoding, "chunked", strlen("chunked")) == 0))
{
const char * __str_stream = hf_private->session->hc_private->stream->str_stream_info;
TFE_LOG_ERROR(g_http_plugin->logger, "the content-length and transfer-encoding field not set, passthrough the whole tcp connection: %s. ", __str_stream);
//const char * __str_stream = hf_private->session->hc_private->stream->str_stream_info;
TFE_LOG_ERROR(g_http_plugin->logger, "the content-length and transfer-encoding field not set, passthrough the whole tcp connection.");
hf_private->is_passthrough = true;
return -1;
}