Put URL and garbage in result from PHP
Dave Cragg
dave.cragg at lacscentre.co.uk
Tue Oct 9 07:33:15 EDT 2012
On 9 Oct 2012, at 10:12, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:
> Hi Monte,
>
> I think you're right. The libURLLastRHHeaders return:
>
> HTTP/1.1 200 OK
> Date: Tue, 09 Oct 2012 08:52:49 GMT
> Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.8 mod_fastcgi/2.4.2
> X-Powered-By: PHP/5.3.8
> Content-Transfer-Encoding: text
> Transfer-Encoding: chunked
> Content-Type: text/utf8
I think the Content-Transfer-Encoding header may be causing the problem. (More accurately, a libUrl bug is causing the problem). A quick check in older libUrl code shows that lineOffset("Transfer-Encoding:",<string>) is used to find the Transfer-Encoding header. That will pick up the Content-Transfer-Encoding header instead. That would explain what you're seeing.
Although it seems like a bug in libUrl, the "Content-Transfer-Encoding: text" header seems unusual. "text" isn't specified as a possible value here. (Typical is base64, binary, etc.) Are you doing anything that might cause that to get set?
As a possible workaround, what happens if you specifically set the "Transfer-Encoding: chunked" header early in the php script. If it causes it to come before the "Content-Transfer-Encoding" header, I'd guess it would work.
Cheers
Dave
More information about the use-livecode
mailing list