Put URL and garbage in result from PHP
m.schonewille at economy-x-talk.com
Tue Oct 9 03:53:48 CDT 2012
If I don't set any headers in the PHP script, then the libUrlLastHTTPHeaders are:
GET /~user/list.php HTTP/1.1
User-Agent: Revolution (MacOS)
There is no transfer-encoding header and no content-length header.
If I move the echo command from the repeat loop to the end of the PHP script, then I get only one piece of garbage at the beginning of the data, which is 1e550.
Economy-x-Talk Consulting and Software Engineering
Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com
On 9 okt 2012, at 10:37, Dave Cragg wrote:
> (Answer based on behavior of libUrl from a couple of years ago)
> It looks like the format of a 'chunked' Transfer-Encoding. LibUrl should deal with this. Can you check if the response headers contain a line like this:
> Transfer-Encoding: chunked
> If so, there shouldn't also be a Content-Length header. If there is, libUrl will just read raw data for the length of the Content-Length header.
> If there is neither, libUrl will read data until the socket is closed.
> I think 'chunked' is normal for php scripts of the style you showed (echo in a loop). So it looks like something odd is happening in this case.
More information about the use-livecode