Explicit content-type: multipart/form-data leads to unexpected content-disposition:attachment in the http body #5256
Comments
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 For all I can see, the specs are not very clear either way on this. |
It was probably a typo since his reported version is 7.64.1 /cc @monnerat |
@jay Thx
Shouldn't it be |
Yes, this is a bug occurring only when Content-Type has parameters. |
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: