You are here: Re: xmlrpc: no content-length in response « PHP Programming Language « IT news, forums, messages
Re: xmlrpc: no content-length in response

Posted by Jasen Betts on 02/15/06 10:32

On 2006-02-14, emielvl@yahoo.co.uk <emielvl@yahoo.co.uk> wrote:
> Hello,
>
> I'm developing a client/server architecture based on the XML-RPC
> implementation in php4. All works pretty well, except that in the
> response from the server there is no "Content-Length" in the header.
> Since the XML-RPC specification requires this header to be present in
> the server response, some libraries (notably: libxmlrpc++) choke on
> this. For clarity, here's a (simple) server (slightly altered from:
> http://www.devshed.com/c/a/PHP/Using-XMLRPC-with-PHP/4/):

use output buffering ob_start(). measure the length of the output,
make the header, emit the buffered output.

> HTTP/1.1 200 OK.
> Date: Tue, 14 Feb 2006 17:20:21 GMT.
> Server: Apache/1.3.34 (Ubuntu) PHP/4.4.2-1.
> X-Powered-By: PHP/4.4.2-1.
> Transfer-Encoding: chunked.
> Content-Type: text/html; charset=iso-8859-1.
> .
> a7 .

> As you can see, there is no "Content-Length" in the response. Am I
> doing something wrong here,

No. it's using chunks instead.

> or could this be a bug in php? Btw. I tried
> this on different servers, with the same results.

"Transfer-Encoding: chunked." is a valid alternative to "Content-Length:..."
if XMLRPC doesn't support it it's lying where it claims HTTP/1.1

Bye.
Jasen

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация