Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP response mixed with previous response and output as plain text
    primarykey
    data
    text
    <p>We are running Apache 2.2.16 and PHP 5.3.3 with DomPDF to generate PDFs. After generating a PDF, the subsequent request occasionally returns a plain text response consisting partially of the HTML used to generate the PDF (i.e. from the previous request), mixed with the HTTP headers and response of the requested page. </p> <p>Apache is somehow mixing part of the response to the previous request with the new response. It seems like an output buffering issue, although I cannot replicate it locally using the same code. It also seems unrelated to gzip, as the problem still occurs with it disabled. I also tried in both Firefox and Chrome and experienced the same result.</p> <p><strong>UPDATE:</strong> If I turn keep-alive off, it solves the problem. However, I don't necessarily want to leave keep-alive off. There is obviously still an underlying problem with the output buffer or response not being cleared.</p> <p>Here are the request headers:</p> <pre><code>Request URL:https://asdf.com/checkout/5d86a9bdf455cdfd334494183559bf Request Method:GET Status Code:200 OK Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Connection:keep-alive Cookie:APP=636c8e6b58e991476ed7d38849bde0d4; _ Host:asdf.com Referer:https://asdf.com/get_pdf/33711 User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.34 Safari/536.11 </code></pre> <p>And the truncated response shown in the browser:</p> <pre><code>&lt;!-- truncated HTML from the previous page (i.e. PDF) --&gt; &lt;/p&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;HTTP/1.1 200 OK Date: Tue, 19 Jun 2012 18:06:13 GMT Server: Apache P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Vary: Accept-Encoding Content-Encoding: gzip Content-Length: 6457 Keep-Alive: timeout=7, max=96 Connection: Keep-Alive Content-Type: text/html; charset=UTF-8 ‹í]ksÛ¸’ýìü ŒfvmׯzP/?µëØNâÄI&lt;‘’ìL*å‚HHBD Z–gæ¿o7@I-BNrkë~ÐÜ;c‰&lt;xtŸF£›lŠÇ¿œ¿;ëüq}Aj’ëÏ®.ÏHa¯TúT=+•Î;çä_vÞ\‘J±L:’F1W\D4,•.ÞHa Ôø°TšL&amp;ÅIµ(d¿Ôy_ºÃ¾*Ø8ý¸§¬–Å@…Ö“c=àÝ(Œâ“ÝTLke4h=Ù:V\…¬õ{"‹Éßä2RLR_ñ[FN}_$‘âQÿ¸d`€1E v¾Ç¾%üö¤p&amp; I¤ö:Ó1+ß|;)(v§J8ØñTÆL$ª··_ ¥ÖqìK&gt;VDA“ù•ÞRs´@bé›ùÇ ýJïŠ}!ú!£c}1ÒÇJ!ïÆ¥¯ß&amp;§¥J±™~,ŽxTüZÇ &lt;!-- followed by a bunch more gzipped gibberish --&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload