I am trying to make a post to an HTTPS server with curl. The server
requires me to login and store a session cookie which I can then use on
subsequent requests, and this works fine. I cannot make a file post,
however, and am unsure why. I used --trace trace.txt and this provides me
with a trace file that indicates the server has responded with "Expectation
failed." I don't really know what to make of this.
More context: the form which I am posting to has several variables which I
think I need to post as well. So, the form looks like this:
<input type="text" name="episode[title]">
<input type="text" name="episode[description]">
<input type="file" name="episode_mp3_file">
The command I am using for curl is this:
curl -b jar.txt -c jar.txt --trace trace.txt -k -F "episode_mp3_file=@
Can someone help me understand what the "Expectation failed" message means?
Does this indicate that I am not sending the form variables "episode[title]"
for example? I think the server does require at least some of these
variables in order to process the request, but this error message seems to
me to be before the upload even begins, so I wonder how the server knows to
I tried to post form variables alongside the file post (with -d
"episode[title]=Upload") but I got a complaint: "You can only select one
The trace file is posted here:
Received on 2005-11-23