lib: add trace support for client reads and writes

- add `CURL_TRC_READ()` and `CURL_TRC_WRITE()`
- use in generic client writers and readers, as well
  as http headers, chunking and websockets

Closes #13223
This commit is contained in:
Stefan Eissing 2024-03-28 14:12:54 +01:00 committed by Daniel Stenberg
parent f46385d36d
commit 0b28ece657
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 188 additions and 51 deletions

View file

@ -361,6 +361,8 @@ static CURLcode hds_cw_collect_write(struct Curl_easy *data,
(type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
CURLH_HEADER)));
CURLcode result = Curl_headers_push(data, buf, htype);
CURL_TRC_WRITE(data, "header_collect pushed(type=%x, len=%zu) -> %d",
htype, blen, result);
if(result)
return result;
}