lib: move handling of data->req.writer_stack into Curl_client_write()

- move definitions from content_encoding.h to sendf.h
- move create/cleanup/add code into sendf.c
- installed content_encoding writers will always be called
  on Curl_client_write(CLIENTWRITE_BODY)
- Curl_client_cleanup() frees writers and tempbuffers from
  paused transfers, irregardless of protocol

Closes #11908
This commit is contained in:
Stefan Eissing 2023-09-20 11:59:16 +02:00 committed by Daniel Stenberg
parent d39863d27a
commit 0bd9e137e3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 205 additions and 182 deletions

View file

@ -246,11 +246,7 @@ static int hyper_body_chunk(void *userdata, const hyper_buf *chunk)
if(0 == len)
return HYPER_ITER_CONTINUE;
Curl_debug(data, CURLINFO_DATA_IN, buf, len);
if(!data->set.http_ce_skip && k->writer_stack)
/* content-encoded data */
result = Curl_unencode_write(data, k->writer_stack, buf, len);
else
result = Curl_client_write(data, CLIENTWRITE_BODY, buf, len);
result = Curl_client_write(data, CLIENTWRITE_BODY, buf, len);
if(result) {
data->state.hresult = result;