You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Cahya Wirawan <cw...@email.archlab.tuwien.ac.at> on 2002/11/13 12:01:09 UTC

[users@httpd] pdf with byterange doesn't work, or why content-length is removed by mod_proxy

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.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org