curl-and-php
Re: Data in headers
Date: Wed, 10 Oct 2007 13:19:23 -0400
Daniel Stenberg wrote:
> On Wed, 10 Oct 2007, David Durant wrote:
>
>
>> I'm trying to emulate the output javascript output of
>> ActiveXObject("Microsoft.XMLHTTP"), which injects the request data into the
>> headers. Everything I've tried with curl and/or http_post_data sends the
>> headers with "Expect: 100-continue", waits for the Continue response from
>> the server (which it gets), then sends the data. Unfortunately this is not
>> working correctly.
>>
>
> You mean the server isn't behaving correctly?
>
Yes, the server (apparently not an HTTP server) is not responding correctly.
>> Notice the headers end with "Cache-Control: no-cache" followed by \r\n, then
>> the xml data. Can this be done with curl?
>>
>
> Yes. But there's no particular "data in headers" here, there's just
> request-headers and a request-body with the XML in the body part...
>
> Here's an example for you:
>
> http://curl.haxx.se/libcurl/php/examples/blogpost.html
>
>
That sample does exactly what I've been doing all along. It causes two
packets to be sent: first the headers (which want a Continue response
from the server) followed by the body (the xml data).
I need to send only a single packet: the body must be in the first
packet with no Continue expected.
I hope that's clear, I'm certainly no protocol expert so perhaps my
terminology is off base.
Thanks,
Dave
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-10-10