You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run curl command line: curl --compressed -o example https://example.com
got "curl: (23) Failed writing received data to disk/application" while the downloaded file is intact
I expected the following
The error message should be omitted if end of downloading stream encountered.
After digging into the code as well as the server response, I found:
the server did not send Content-Length and curl may not know when the stream ends (current Nginx implementation will strip Content-Length because the stream length after compressed is not predictable)
Botli support in curl returns CURLE_WRITE_ERROR when unexpectedly reaching end of stream, ref:
I did this
curl --compressed -o example https://example.com
I expected the following
The error message should be omitted if end of downloading stream encountered.
After digging into the code as well as the server response, I found:
Content-Length
and curl may not know when the stream ends (current Nginx implementation will stripContent-Length
because the stream length after compressed is not predictable)curl/lib/content_encoding.c
Line 676 in c8e0cd1
P.S. Zstd writer in curl will not return CURLE_WRITE_ERROR when
Content-Length
is not specified in response header.curl/libcurl version
curl 8.7.1
operating system
macOS 12.7.4
The text was updated successfully, but these errors were encountered: