RE: [PHP] String length output in php-generated response

From: Date: Mon, 07 Feb 2011 08:43:55 +0000
Subject: RE: [PHP] String length output in php-generated response
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-311176@lists.php.net to get a copy of this message
> -----Original Message----- > From: Florin Jurcovici [mailto:florin.jurcovici@gmail.com] > Sent: 06 February 2011 15:57 > I'm trying to build myself a small JSON-RPC server using PHP. > > Using wireshark, here's the conversation: > > Request: [...snip...] > Response: > HTTP/1.1 200 OK > Date: Sun, 06 Feb 2011 15:04:08 GMT > Server: Apache/2.2.14 (Ubuntu) > Accept-Ranges: bytes > X-Powered-By: PHP/5.3.2-1ubuntu4.7 > Keep-Alive: timeout=15, max=100 > Connection: Keep-Alive > Transfer-Encoding: chunked > Content-Type: application/json; charset=UTF-8 > > 6f > > {"id":2,"result":{"service":"test.service","method":"method", > > "id":2,"params":[{"code":"client"}]},"error":null} > 0 That's nothing to do with PHP -- it's http chunked encoding, as indicated by the "Transfer-Encoding: chunked" header, and is handled by Apache and your browser. It's totally expected and totally harmless. Read about it here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, C507 City Campus, Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 812 4730 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

« previous php.general (#311176) next »