curl-users
Expect: 100-continue with another Expect header does not always wait for a response
Date: Mon, 14 Feb 2011 17:31:10 -0600
I apologize in advance for not posting a location in code or using the
bug tracking system. I'm not at all familiar with curl's internals,
and feel best suited to simply describe what I observed.
To illustrate, here are the commands I issued:
curl -X POST --post301 -H "Expect: 100-continue" -H "Expect:
Content-MD5" -d @small.htm -v "http://<<server IP>>"
curl -X POST --post301 -H "Expect: Content-MD5" -H "Expect:
100-continue"-d @small.htm -v "http://<<server IP>>"
The commands are identical except for the ordering of the headers.
The IP address is the actual IP (not virtual) of a server on my local
network. The file being POSTed (small.htm) is 4127 bytes.
Using Wireshark I watched the data from each command. The first one
shows curl sending the first part of the request (through the headers
and final CRLF) in the packet, and no more. The 100 comes back, and
curl sends the rest of the data. However, the 2nd command shows curl
sending the body data in the same packet as the headers (implying that
curl did not wait for the 100 response). Even though this is
technically okay per the RFC, it is inconsistent behavior and does not
permit the server to deny the request prior to the data being sent.
Please let me know if there is any way I can help with this issue any further.
---Brian
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-15