Return-Path: Delivered-To: apmail-modperl-archive@apache.org Received: (qmail 22254 invoked by uid 500); 4 Jun 2001 16:00:44 -0000 Mailing-List: contact modperl-help@apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@apache.org Received: (qmail 22236 invoked from network); 4 Jun 2001 16:00:40 -0000 Date: Mon, 4 Jun 2001 11:00:31 -0500 From: will trillich To: modperl@apache.org Subject: Re: HTTP 1.1 Message-ID: <20010604110031.A16317@serensoft.com> Mail-Followup-To: modperl@apache.org References: <2334178956.20010604195359@zr.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <2334178956.20010604195359@zr.ru>; from z88-list-26@zr.ru on Mon, Jun 04, 2001 at 07:53:59PM +0400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Mon, Jun 04, 2001 at 07:53:59PM +0400, Ruslan V. Sulakov wrote: > Strange numbers appeares, when I use HTTP 1.1 protocol to get response from my mod_perl server. > The test.pl script: > use strict; > use Apache::Request(); > my $r = shift; > my $apr = Apache::Request->new($r); > $apr->send_http_header('text/html'); > print "1234567"; > > Now look to HTTP 1.1. response of this script: > # telnet xx.xx.ru 81 > Trying xxx.xxx.xxx.xxx... > Connected to xx.xx.ru. > Escape character is '^]'. > GET /test.pl HTTP/1.1 > Accept: */* > Host: xx.xx.ru > > HTTP/1.1 200 OK > Date: Mon, 04 Jun 2001 14:49:24 GMT > Server: Apache/1.3.12 (Unix) mod_perl/1.24 > Transfer-Encoding: chunked > Content-Type: text/html > > 1 > 1234567 > 0 > What does mean number 1 before line "1234567"? And what does mean 0 after all? > Is there a way to cut off the line with number "1" and cut off the line with number "0"? > I need only line "1234567" in response! It is vital for me! > > ------------ > Now look what will be, if I ask HTTP version 1.0: > bsd2# telnet xx.xx.ru 80 > Trying 212.188.13.65... > Connected to xx.xx.ru. > Escape character is '^]'. > GET /test.pl HTTP/1.0 > Accept: */* > Host: xx.xx.ru > > HTTP/1.1 200 OK > Date: Mon, 04 Jun 2001 15:39:16 GMT > Server: Apache/1.3.9 (Unix) mod_perl/1.21 rus/PL28.18 > Connection: close > Content-Type: text/html; charset=koi8-r > > 1234567 > > > Thats all right with HTTP/1.0! No additional lines in output and no Header "Transfer-Encoding: chunked" in response. > ------------------------ > But I need , it to be all right in case of HTTP/1.1 ! > > Is there any ideas? here's the key the the answer you're looking for: Transfer-Encoding: chunked for wise browsing software, these numbers are used in re-constructing the original html from the chunks as they arrive. if you're just sending your stuff to an average joe running a standard web browser, they should all understand this stuff out of the box. if you're doing something fancy (proxy filter, maybe?) perhaps you need to check the specs for the HTTP/1.1 protocols and accomodate them. :) -- #95: We are waking up and linking to each other. We are watching. But we are not waiting. -- www.cluetrain.com will@serensoft.com http://sourceforge.net/projects/newbiedoc -- we need your brain! http://www.dontUthink.com/ -- your brain needs us!