I have installed a packet sniffer and the weird thing is that on the POST HEX tab of the application for the sandbox API I see the XML being passed while on the main API it's empty. Also request body size is 0 for the main API call while it's 189 bytes for the sandbox API call.<br>
<br>It seems as if CURL is not sending any data to lighttpd. So how can I force it to do so?<br><br>---<br><br>AND I FIXED IT!<br><br>The missing "magic" line was:<br>curl_setopt($ch, CURLOPT_INFILESIZE, filesize('tmp/tmpfile'));<br>
<br>With this it works on the main API too!<br><br>---<br><br>Thanks for your help guys, without the sniffer idea I wouldn't have gotten far.<br><br><div class="gmail_quote">On Wed, Dec 2, 2009 at 12:51 PM, Peter Körner <span dir="ltr"><<a href="mailto:osm-lists@mazdermind.de">osm-lists@mazdermind.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Tom Hughes schrieb:<br>
<div><div></div><div class="h5">> On 02/12/09 10:10, Janos Rusiczki wrote:<br>
>> I have replaced the input file with the XML you provided.<br>
>> Result: the exact same error.<br>
>> And obviously it works like a charm on the sandbox<br>
>> (<a href="http://api06.dev.openstreetmap.org" target="_blank">api06.dev.openstreetmap.org</a> <<a href="http://api06.dev.openstreetmap.org" target="_blank">http://api06.dev.openstreetmap.org</a>>).<br>
>> I'm running out of hair to pull.<br>
><br>
> There's nothing wrong with the XML - it parses just fine using the live<br>
> code on the live server.<br>
><br>
> My suspicion is that you're seeing a problem with curl and lighttpd not<br>
> getting on and as a result the body of the request is not making it to<br>
> the rails code properly. That would also explain why it works on dev, as<br>
> that uses apache.<br>
><br>
> A network trace of exactly what request curl is sending and getting back<br>
> might help understand more what the problem is.<br>
><br>
> Tom<br>
><br>
<br>
</div></div>You may just add --trace-ascii mytrace.txt to your curl call (it's<br>
--debug with wget)<br>
<br>
Alternatively you may use a tool like Paros Proxy (a local standalone<br>
HTTP Proxy) to trace all your calls.<br>
<div><div></div><div class="h5"><br>
Peter<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
</div></div></blockquote></div><br>