pdf with byterange doesn"t work, or why content-length is removed by mod_proxy
am 14.11.2002 17:32:41 von Cahya Wirawan
Hi,
I have problem with my apache 2.0.43, I use it for reverse proxy with
mod_proxy. the webserver behind my reverse proxy has alot of big pdf
files, and to make the client only load the necessary pages in pdf,
we use pdf with byterange. and works fine if the client connect
the webserver directly without reverse proxy, but if we use reverse
proxy between this webserver and the client, the client will
download the whole pdf file.
after I check the header, I found out that the Content-Length header
is removed by the reverse proxy.
here are the 2 headers from reverse proxy and direct conneciton:
1. direct connection:
$ lynx -head -dump http://direct.connection/~cahya/test.pdf
HTTP/1.1 200 OK
Date: Wed, 13 Nov 2002 10:55:37 GMT
Server: Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g DAV/2
Last-Modified: Tue, 12 Nov 2002 15:57:51 GMT
ETag: "79aa-433936-8ac3fdc0"
Accept-Ranges: bytes
Content-Length: 4405558
Connection: close
Content-Type: application/pdf
2. through reverse proxy:
$ lynx -head -dump http://through.reverseproxy/~cahya/test.pdf
HTTP/1.1 200 OK
Date: Wed, 13 Nov 2002 10:55:28 GMT
Server: Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g DAV/2
Last-Modified: Tue, 12 Nov 2002 15:57:51 GMT
ETag: "79aa-433936-8ac3fdc0"
Accept-Ranges: bytes
Content-Type: application/pdf
Connection: close
So I think, the client download the whole pdf file because of the missing
of this content-length header. Someone know about this problem?
I would very appreciate any help or hint,
thanks
Cahya Wirawan.
Re: pdf with byterange doesn"t work, or why content-length is removed by mod_proxy
am 14.11.2002 21:34:40 von Eli Marmor
As Jeff Trawick wrote before, this is a known issue, caused by a bug of
Internet Explorer; According to Microsoft Knowledge Base, IE can't deal
with PDF files properly without Content-Length.
You can read more about it at:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11978
Cahya Wirawan wrote:
>
> Hi,
> I have problem with my apache 2.0.43, I use it for reverse proxy with
> mod_proxy. the webserver behind my reverse proxy has alot of big pdf
> files, and to make the client only load the necessary pages in pdf,
> we use pdf with byterange. and works fine if the client connect
> the webserver directly without reverse proxy, but if we use reverse
> proxy between this webserver and the client, the client will
> download the whole pdf file.
> after I check the header, I found out that the Content-Length header
> is removed by the reverse proxy.
>
> here are the 2 headers from reverse proxy and direct conneciton:
>
> 1. direct connection:
>
> $ lynx -head -dump http://direct.connection/~cahya/test.pdf
> HTTP/1.1 200 OK
> Date: Wed, 13 Nov 2002 10:55:37 GMT
> Server: Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g DAV/2
> Last-Modified: Tue, 12 Nov 2002 15:57:51 GMT
> ETag: "79aa-433936-8ac3fdc0"
> Accept-Ranges: bytes
> Content-Length: 4405558
> Connection: close
> Content-Type: application/pdf
>
>
> 2. through reverse proxy:
>
> $ lynx -head -dump http://through.reverseproxy/~cahya/test.pdf
> HTTP/1.1 200 OK
> Date: Wed, 13 Nov 2002 10:55:28 GMT
> Server: Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g DAV/2
> Last-Modified: Tue, 12 Nov 2002 15:57:51 GMT
> ETag: "79aa-433936-8ac3fdc0"
> Accept-Ranges: bytes
> Content-Type: application/pdf
> Connection: close
>
> So I think, the client download the whole pdf file because of the missing
> of this content-length header. Someone know about this problem?
> I would very appreciate any help or hint,
> thanks
> Cahya Wirawan.
--
Eli Marmor
marmor@netmask.it
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.: +972-9-766-1020 8 Yad-Harutzim St.
Fax.: +972-9-766-1314 P.O.B. 7004
Mobile: +972-50-23-7338 Kfar-Saba 44641, Israel
Re: pdf with byterange doesn"t work, or why content-length is removed by mod_proxy
am 15.11.2002 00:41:44 von Cahya Wirawan
It is not really the same problem, the problem you mentioned has to do
with IE bug that show only blank page for pdf file, but in my case,
IE/netscape/mozilla can show the page normal, but it download the whole
pdf file at one time. but it should only download the page the user
at that moment read, and if the user read another page, it will download
the apropriate one. so the user can read the first page immidiatelly
without to wait till the whole file downloaded.
regards,
cahya
On Thu, Nov 14, 2002 at 10:34:40PM +0200, Eli Marmor wrote:
> As Jeff Trawick wrote before, this is a known issue, caused by a bug of
> Internet Explorer; According to Microsoft Knowledge Base, IE can't deal
> with PDF files properly without Content-Length.
>
> You can read more about it at:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11978
>
> Cahya Wirawan wrote:
> >
> > Hi,
> > I have problem with my apache 2.0.43, I use it for reverse proxy with
> > mod_proxy. the webserver behind my reverse proxy has alot of big pdf
> > files, and to make the client only load the necessary pages in pdf,
> > we use pdf with byterange. and works fine if the client connect
> > the webserver directly without reverse proxy, but if we use reverse
> > proxy between this webserver and the client, the client will
> > download the whole pdf file.
> > after I check the header, I found out that the Content-Length header
> > is removed by the reverse proxy.
> >
> > here are the 2 headers from reverse proxy and direct conneciton:
> >
> > 1. direct connection:
> >
> > $ lynx -head -dump http://direct.connection/~cahya/test.pdf
> > HTTP/1.1 200 OK
> > Date: Wed, 13 Nov 2002 10:55:37 GMT
> > Server: Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g DAV/2
> > Last-Modified: Tue, 12 Nov 2002 15:57:51 GMT
> > ETag: "79aa-433936-8ac3fdc0"
> > Accept-Ranges: bytes
> > Content-Length: 4405558
> > Connection: close
> > Content-Type: application/pdf
> >
> >
> > 2. through reverse proxy:
> >
> > $ lynx -head -dump http://through.reverseproxy/~cahya/test.pdf
> > HTTP/1.1 200 OK
> > Date: Wed, 13 Nov 2002 10:55:28 GMT
> > Server: Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g DAV/2
> > Last-Modified: Tue, 12 Nov 2002 15:57:51 GMT
> > ETag: "79aa-433936-8ac3fdc0"
> > Accept-Ranges: bytes
> > Content-Type: application/pdf
> > Connection: close
> >
> > So I think, the client download the whole pdf file because of the missing
> > of this content-length header. Someone know about this problem?
> > I would very appreciate any help or hint,
> > thanks
> > Cahya Wirawan.
>
> --
> Eli Marmor
> marmor@netmask.it
> CTO, Founder
> Netmask (El-Mar) Internet Technologies Ltd.
> __________________________________________________________
> Tel.: +972-9-766-1020 8 Yad-Harutzim St.
> Fax.: +972-9-766-1314 P.O.B. 7004
> Mobile: +972-50-23-7338 Kfar-Saba 44641, Israel