tags:

views:

28

answers:

1

I'm trying to send a binary file to a server over HTTP. The beginning of the file contains headers already

I'm trying to send a file using command line version of curl for windows like so:

C:>curl -H "Content-Type:application/octet-stream" --data-binary @asdf.file http://server:1234/url

Curl is adding headers which cause a 400 Bad Request.

When I run the exact same command using the linux version of curl, the post completes?

A: 

From http://curl.haxx.se/docs/manpage.html:

Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H "Host:".

Curious if this actually works?

mjhm
Yes the -H "Value:" with no content works to prevent the internal header being sent.
nbathum