-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--etag-save failing with error "(23) Failed writing header" #5610
Comments
You've silenced the warnings which is why you don't see:
Lines 115 to 128 in e9db32a
I'm not sure why the warning message starts on a separate line, and also I think it should /cc @s-3ntinel |
- Return 'failure' on failure, to follow the existing style. - Put Warning: and the warning message on the same line. Ref: curl#5610
I fixed that but I think we should change the behavior to not fail in this case and instead ignore the invalid etag (or ignore the double quotes if there's some precedent for it). |
Yes, I too think it should rather ignore it when invalid (but probably say something in the verbose output). |
To start playing with the code, can I take care of your proposal? |
@sterchelen please go ahead, this could certainly be a good entry step into the code. This is entirely cmdline tool-side code. My advice: submit the first take on your PR early to solicit feedback on your approach! |
D'oh. I figured there was some PEBCAK at play here also. Thanks for looking at this. Just for confirmation, an etag header is invalid without double-quotes according to this spec? https://tools.ietf.org/html/rfc7232#section-2.3 |
In fact, as the rfc specify:
|
Combine E-Tags, If-Modified-Since in one section. Also mention the curl --compression option for typically GZIP decompression. Note that E-Tags were broken in curl <7.73 due to a bug with "weak" e-tags. curl/curl#5610 From a question/feedback by e-mail from Hadrien Lacour, thanks.
I did this
Against a specific server (get.helm.sh), curl returns an error when using the
--etag-save
flag. I have used this feature with other servers (specifically github releases) without issue. I'm not familiar enough with http to troubleshoot this further. I tested on two machines: latest MacOS and Arch Linux, each with fully updated curl versions (7.71 & 7.70).MacOS (installed via homebrew) output:
Arch Linux output:
I expected the following
I would expect curl to succesfully download the file, and write the etag value to the specified file.
curl/libcurl version
Found in output above ^^
operating system
Found in output above ^^
Other
Happy to help troubleshoot further if needed.
The text was updated successfully, but these errors were encountered: