What are these weird lines in HTTP protocol? -


i'm reading source website building legit connection, in java:

        final socket sock = new socket(hostname, 80);         printwriter writer = new printwriter(sock.getoutputstream(), true);             writer.println("get /path http/1.1");             writer.println("host: " + hostname);             writer.println(); //...             while (!sock.isclosed() && (line = reader.readline()) != null) {                 system.out.println(line);             } 

and works good, except there weird lines in output not there when browse website - say- firefox.

the problem lines of source interrupted random different information , don't know why information ruin source.

<div clas 16d0 s="span5"> 

or

<td style="text-align:c 2000 enter; vertical-align:middle">information</td> 

what , how fix it?

looks server sending chunked data. can send http/1.0 instead of 1.1? should ensure no chunking performed on response.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -