curl-and-php
Error HTTP 502 caused by CURLOPT_RETURNTRANSFER ?
Date: Fri, 25 Jul 2008 18:54:45 +0200
Hi everyone,
I'm annoyed with a very weird problem. In a few words my code (using
curl obviously) produces a 502 HTTP error only if I disable
RETURNTRANSFER. The problem is that I need to parse the page returned...
Here's in detail what happens, and why it's weird :
- I made a little software which connects on a website, gets identified
using a cookie then submit a form.
something very simple, that actually fully works on my server. (using
apache)
- I deployed my software on a pre-production server using IIS.
- The identification step works fine, I save the cookie.
-The next step : I submit the form using the cookie. And my script stops
and the server returns the error HTTP 502. No errors from curl or the
PHP script : everything is interrupted. And the error itself has not
much sense to me 'Bad gateway'...
- If I disable CURLOPT_RETURNTRANSFER, I receive the page I expect. But
the results is printed and I can't use it afterwards.
I spent quite some time searching for similar cases without success :
either about IIS or curl itself.
Sorry if my explanations are not very clear, english isn't my mother
tongue. So if you need more details, I'd be happy to feed you with some
inputs !
Thanks in advance for any clues on my problem :-)
Regards,
Rodolphe.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-07-25