On Thu, 30 Jun 2011, Steven Parkes wrote:

I'm seeing something I don't understand:

I'm doing an HTTP/1.1 POST that's generating an Expect: 100-continue to nginx/1.0.0. When server successfully reads and processes the request, everything works fine.

However, sometimes the server responds with a 404 before it ever asks for the body. (This is the expected result). In this case libcurl is not sending the body. And I think it should?

Why should it? The whole purpose of Expect: 100-continue is to avoid having to send the request body in a case like this when the server can tell the client at once that the request (and body) isn't wanted. Are you possibly using some kind of HTTP auth?

What I'm seeing is that nginx sees a bad request on the next request.

Can you wireshark the connection or use CURLOPT_DEBUGFUNCTION to figure out exactly what is sent and isn't sent in both the requests to figure out what's wrong in the second one?

Unfortunately, our test http server isn't good enough to let us execute this exact scenario in the test suite. We really need fix the server so that we can get some good 100-continue tests added...

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to