You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jay Janssen <jj...@pinnsoft.com> on 1999/07/06 17:47:38 UTC

general/4703: Byteserving issue less than 2k file

>Number:         4703
>Category:       general
>Synopsis:       Byteserving issue less than 2k file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Jul  6 08:50:00 PDT 1999
>Last-Modified:
>Originator:     jjanssen@pinnsoft.com
>Organization:
apache
>Release:        1.3.6
>Environment:
Redhat 6.0:
Linux p171057.sctcorp.com 2.2.7-1.8 #1 Sun May 23 18:03:10 PDT 1999 i686 unknown
>Description:
I am currently implementing a program that generates pdf files on the fly and displays them to the user through their web browser.  I have noticed that when the pdf I generate is less than ~2k, IE loads acrobat reader, but gives me a blank screen.  But, when the pdf is over 2k and up (3M is the biggest I've tested with) it works just fine.  Of course, with Netscape it seems to be fine.

When I load such a pdf (<2k) non-dynamically (i.e., a file already created) it also works fine.  Hence, the problem is related to the server not knowing the file size of the pdf when I generate it dynamically.

Here are some headers I sniffed:

---- This one is two small and doesn't load in the plugin
HTTP/1.1 200 OK^M
Date: Tue, 06 Jul 1999 15:36:44 GMT^M
Server: Apache/1.3.6 (Unix)  (Red Hat/Linux)^M
Keep-Alive: timeout=15, max=100^M
Connection: Keep-Alive^M
Transfer-Encoding: chunked^M
Content-Type: application/pdf^M
^M
776^M
%PDF-1.2
1 0 obj
<<

-- This is the same file, but with my 'fix' of padding the header so the file ---- is bigger than 2k.
HTTP/1.1 200 OK^M
Date: Tue, 06 Jul 1999 15:38:25 GMT^M
Server: Apache/1.3.6 (Unix)  (Red Hat/Linux)^M
Keep-Alive: timeout=15, max=100^M
Connection: Keep-Alive^M
Transfer-Encoding: chunked^M
Content-Type: application/pdf^M
^M
8c3^M
%PDF-1.2
1 0 obj
<<

-- This one is a direct file download.  This is the same file from
-- the first log up above, except downloaded non-dynamically and it works
-- fine
HTTP/1.1 200 OK^M
Date: Tue, 06 Jul 1999 15:47:34 GMT^M
Server: Apache/1.3.6 (Unix)  (Red Hat/Linux)^M
Last-Modified: Tue, 06 Jul 1999 15:43:03 GMT^M
ETag: "165003-776-37822407"^M
Accept-Ranges: bytes^M
Content-Length: 1910^M
Keep-Alive: timeout=15, max=98^M
Connection: Keep-Alive^M
Content-Type: application/pdf^M
^M
%PDF-1.2
1 0 obj
<<

Any ideas why it won't load the smaller pdf dynamically?  I agree that it's entirely possible that IE is to blame, but I was just wondering if you had seen anything like this and could possibly be a server issue.

>How-To-Repeat:

>Fix:

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]