Hi All,
The problem i am facing is as mentioned.
I am Series 60 developer and am working on symbian os.
When i make a HTTP Get request from a PHP site, in the response that i receive i get some random data bytes (characters) along with the actual response. I am parsing the actual response for particular fields. But due to the presence of the extra bytes, the parsing fails. This is valid for many of the php sites.
What could be the reason for the extra random bytes that come down.
E.g
When u check the response received for the below mentioned site, the response contains extra bytes just after the header.
http://www.cdt.org/security/010911response.php
The response can be viewed using
http://www.rexswain.com/httpview.html
Kindly help.
Thanks in advance
Improper Response
Moderator: General Moderators
Very odd. I don't think it's anything to do with PHP though. I get a few characters on all URLs including Google, Yahoo, Slashdot .. the only one that didn't have anything extra was Microsoft. I guess you're going to have to get your head into the HTTP protocol to figure out what exactly is going on..
-
shashishaw
- Forum Newbie
- Posts: 3
- Joined: Wed Mar 22, 2006 4:40 am
Hi onion2k ,
Thanks for the reply. I first came across the problem while testing the php sites and hence felt that this could be a php issue. However as u have rightly pointed out, it is also prevalent in other sites as well.
As far as i know, the total number of bytes for the page should be equal to the Content-Length field value mentioned in the Response Header( if the content length field is present).
I am trying to look into the details of the http protocol.
How do web browsers treat the random data bytes ?. One more serious problem was that in one of links which sent down an image, the random data bytes were part of the actual image data. This further aggravates the problem.
Any pointers on how to avoid retrieving the extra data will be helpful.
Thanks
Shashi.
Thanks for the reply. I first came across the problem while testing the php sites and hence felt that this could be a php issue. However as u have rightly pointed out, it is also prevalent in other sites as well.
As far as i know, the total number of bytes for the page should be equal to the Content-Length field value mentioned in the Response Header( if the content length field is present).
I am trying to look into the details of the http protocol.
How do web browsers treat the random data bytes ?. One more serious problem was that in one of links which sent down an image, the random data bytes were part of the actual image data. This further aggravates the problem.
Any pointers on how to avoid retrieving the extra data will be helpful.
Thanks
Shashi.
-
shashishaw
- Forum Newbie
- Posts: 3
- Joined: Wed Mar 22, 2006 4:40 am
Hi,
I've found from the link http://developers.sun.com/techtopics/mo ... /chunking/ , that the random characters are nothing but the size of the chunks in which the data coming down is divided.
I've found from the link http://developers.sun.com/techtopics/mo ... /chunking/ , that the random characters are nothing but the size of the chunks in which the data coming down is divided.
So they're not random at all then..shashishaw wrote:Hi,
I've found from the link http://developers.sun.com/techtopics/mo ... /chunking/ , that the random characters are nothing but the size of the chunks in which the data coming down is divided.