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
mixing --data and --upload-file sets content-length from --data and sends data from --upload-file #8704
Comments
As per the documentation, |
The phrasing in the man page I think is unfortunate. "This option overrides -F, --form and -I, --head and -T, --upload-file." That line is generated by the keyword |
As one implies PUT and the other POST, both cannot be used simultaneously. Add test 378 to verify. Fixes #8704 Reported-by: Boris Verkhovskiy
Instead of saying "This option overrides NNN", now say "This option is mutually exclusive to NNN" in the generated man page ouput, as the option does not in all cases actually override the others but they are always mutually exclusive. Ref: #8704
I did this
I expected the following
An error message or for
--data
to win or--upload-file
to win.Instead, I see this
Content-Length: 13
comes from--data
, but the actual data being sent is the data in--upload-file
.I don't blame curl for doing something non-sensical here because passing both of these arguments is non-sensical, but I think it would be better for one option to win completely.
curl/libcurl version
operating system
macOS 12.3.1
The text was updated successfully, but these errors were encountered: