Comments (7)
Aha, ok. Thanks for clarifying.
from curl.
fails to sign properly when given
Content-Type: multipart/form-data
.
So why do you?
When sending a multipart formpost, the Content-Type
header also needs a boundary string set (and curl needs to know it) and your provided header does not so curl is not able to produce a proper POST. You broke curl by providing a broken header.
update: curl actually can survive the situation and still do a formpost with a boundary so it does not exactly explain the error. Even though the original question why you would use this command line remains.
from curl.
So the same error occurs whether or not I give it the -H "Content-Type: multipart/form-data
.
I left it there as this was how we received the bug internally.
from curl.
This confuses me. Your report says
When using the curl command with only a single file and without Content-Type: multipart/form-data everything works as expected
Isn't that quite the opposite of what you just said here?
from curl.
I think I might need to clarify then. :)
Whenever curl tries to send a request where curl uses the Content-Type: multipart/form-data
, then it fails to sign correctly.
So in this case whether it automatically adds it because of -F
or if I add it manually, then it fails to sign the message correctly.
Sorry for the confusion. :)
from curl.
I suspect this is because the generated Content-Type:
type header used for multipart formposts is not taken into account correctly when the header hash is calculated.
from curl.
For context what we have done previously that worked was:
curl --verbose -X POST "${ENDPOINT}" \
-d "$DATA" \
--user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
--aws-sigv4 "aws:amz:${AWS_REGION}:${SERVICE}" \
--header "x-amz-security-token: $AWS_SESSION_TOKEN"
This has worked fine until we needed to upload multiple files.
Here we end up with Content-Type: application/x-www-form-urlencoded
.
from curl.
Related Issues (20)
- version 8.7.1 fails to compile for IOS SDK 17.2 HOT 5
- Version 8.6.0 and 8.7.1 fails to compile for CentOS 7 HOT 2
- Please consider --ca-native for OpenSSL by default on Windows HOT 2
- version 8.7.0 and 8.7.1 don't compile against OpenSSL 1.1.0h on Linux HOT 3
- Change in behaviour for duplicate "Transfer-Encoding = chunked" headers HOT 3
- Please update tiny-curl HOT 1
- SOCKS problem with 8.7.0+ HOT 22
- test 345 fails on AppVeyor HOT 2
- Unable to upload file with curl when --limit-rate is set to specific value HOT 3
- GitHub actions major outage/problem HOT 2
- `git clone` hangs with curl-8.7.1 HOT 7
- wolfSSL HTTP/3 peer verification is lacking HOT 4
- Ambiguous error message when decompressing brotli stream HOT 2
- CURL_VERSION_GSSAPI is not display on curl tool. HOT 4
- Bug in Debian (curl-8.7.1) leads to Failed writing received data to disk/application HOT 10
- Error 451 when transfering certain files using FTPS\TLS1.3 HOT 1
- Fail during configure if perl is missing but required HOT 5
- Windows DNS resolution: Curl crash when GetAddrInfoExW callback invoked on shutdown HOT 7
- CURLOPT_SSLVERSION: C++20 deprecation warning when values of two enums are combined HOT 1
- Sign the un-preprocessed `git archive` .tar.gz
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl.