Skip to content

Commit

Permalink
httpc: fix reading data in a chunked request
Browse files Browse the repository at this point in the history
There was a problem: chunked request to etcd via TLS using builtin http
client returns nothing. The problem was reproduced quite often by a test
`integration.general.tls` in etcd-client Lua module. The patch updates
curl submodule to a version based on 8.5.0 release with applied patch
with fix [1].

The patch also removes workaround for aforementioned problem made in
commit aa58c21 ("httpc: use http 1.1 by default").

1. curl/curl@cdd905a

Fixes #9547

NO_TEST=etcd-client tests
NO_DOC=bugfix
  • Loading branch information
ligurio authored and igormunkin committed Jan 23, 2024
1 parent f58bfc9 commit 9bdf2ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## bugfix/httpc

* Fixed a bug when read from a chunked request returns
nothing (gh-9547).
2 changes: 0 additions & 2 deletions src/httpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ httpc_request_new(struct httpc_env *env, const char *method,
curl_easy_header_cb);
curl_easy_setopt(req->curl_request.easy, CURLOPT_NOPROGRESS, 1L);
curl_easy_setopt(req->curl_request.easy, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(req->curl_request.easy, CURLOPT_HTTP_VERSION,
CURL_HTTP_VERSION_1_1);

ibuf_create(&req->send, &cord()->slabc, 1);

Expand Down
2 changes: 1 addition & 1 deletion third_party/curl
Submodule curl updated 1 files
+9 −4 lib/transfer.c

0 comments on commit 9bdf2ba

Please sign in to comment.