修正重复写入Content-Length的问题
This commit is contained in:
@@ -1087,6 +1087,9 @@ void hf_private_construct(struct http_half_private * hf_private)
|
||||
{
|
||||
const char * __str_content_encoding = __hf_content_encoding_to_str(hf_private->content_encoding);
|
||||
const static struct http_field_name __cont_encoding_type_name = {TFE_HTTP_CONT_ENCODING, NULL};
|
||||
|
||||
/* Delete the origin encoding type, and add a new one */
|
||||
tfe_http_field_write(hf_public, &__cont_encoding_type_name, NULL);
|
||||
tfe_http_field_write(hf_public, &__cont_encoding_type_name, __str_content_encoding);
|
||||
}
|
||||
|
||||
@@ -1098,6 +1101,7 @@ void hf_private_construct(struct http_half_private * hf_private)
|
||||
snprintf(str_sz_evbuf_body, sizeof(str_sz_evbuf_body) - 1, "%lu", evbuffer_get_length(hf_private->evbuf_body));
|
||||
|
||||
const static struct http_field_name __cont_encoding_length_name = {TFE_HTTP_CONT_LENGTH, NULL};
|
||||
tfe_http_field_write(hf_public, &__cont_encoding_length_name, NULL);
|
||||
tfe_http_field_write(hf_public, &__cont_encoding_length_name, str_sz_evbuf_body);
|
||||
|
||||
/* If origin is chunked, now delete chunked tag */
|
||||
|
||||
Reference in New Issue
Block a user