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.
curl -X POST -F 'name=foo' -H 'Content-type: multipart/form-data; charset=utf-8' third_party_url
I expected the following
The problem was I am using the above command to send an HTTP request to a third-party. Things work fine until I upgraded curl to the latest version.
After debugging HTTP request, I found that before curl 7.6x, the request body has sent as ofContent-Disposition: form-data
If I omit the Content-type header, it goes well (both result in Content-Disposition: form-data) but I also lose the ability to set the charset header which is critical for me.
Are you really talking about curl 7.6, released in January 2001?
I'm reading this several times but it's not clear to me: are you saying you think it should be attachment or form-data in the Content-Disposition: line?
For all I can see, the specs are not very clear either way on this.
I'm reading this several times but it's not clear to me: are you saying you think it should be attachment or form-data in the Content-Disposition: line?
Shouldn't it be Content-Disposition: form-data?
It was form-data in 7.4x and 7.5x but suddenly become attachment in 7.6x that broken my api
I did this
I expected the following
The problem was I am using the above command to send an HTTP request to a third-party. Things work fine until I upgraded curl to the latest version.
After debugging HTTP request, I found that before curl 7.6x, the request body has sent as of
Content-Disposition: form-data
while in version 7.6x, it was
attachment
If I omit the
Content-type
header, it goes well (both result inContent-Disposition: form-data
) but I also lose the ability to set thecharset
header which is critical for me.curl/libcurl version
operating system
This problem happens in my AWS EC2 instance but since I can reproduce it in my local machine, I do think it is related to 7.6x version
The text was updated successfully, but these errors were encountered: