Flush buffer combined with mod_deflate doesn't seem to work

Discussion in 'Perl Misc' started by Leif Wessman, Mar 12, 2007.

  1. Leif Wessman

    Leif Wessman Guest

    I'm trying to print a html header, then flush the buffer and then
    print the rest of the page. Like this:

    print "header\n";
    $| = 1;
    print "\n";
    sleep 10;
    $| = 0;
    print "content\n";

    header contains more than 8096 bytes (default buffer size according to
    http://httpd.apache.org/docs/2.0/mod/mod_deflate.html).

    This works fine (header shows immediately, content after 10 seconds)
    when _not_ using mod_deflate. When using mod_deflate both header and
    content shows after 10 seconds...

    What could be the problem?
     
    Leif Wessman, Mar 12, 2007
    #1
    1. Advertising

  2. Leif Wessman

    Guest

    "Leif Wessman" <> wrote:
    > I'm trying to print a html header, then flush the buffer and then
    > print the rest of the page. Like this:
    >
    > print "header\n";
    > $| = 1;
    > print "\n";
    > sleep 10;
    > $| = 0;
    > print "content\n";
    >
    > header contains more than 8096 bytes (default buffer size according to
    > http://httpd.apache.org/docs/2.0/mod/mod_deflate.html).
    >
    > This works fine (header shows immediately, content after 10 seconds)
    > when _not_ using mod_deflate. When using mod_deflate both header and
    > content shows after 10 seconds...
    >
    > What could be the problem?


    The problem is related to Apache or your web browser, not the Perl itself.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Mar 12, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian

    Response.Buffer and Resonse.Flush

    Brian, Nov 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,425
    Scott M.
    Nov 22, 2003
  2. Matthias Straka

    Minimum buffer length for Response.Flush?

    Matthias Straka, Sep 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    587
    Matthias Straka
    Sep 9, 2004
  3. Kiran

    socket buffer flush question

    Kiran, Jul 5, 2006, in forum: Python
    Replies:
    2
    Views:
    985
    Jim Segrave
    Jul 5, 2006
  4. Salvatore Sanfilippo

    mod_ruby + mod_deflate

    Salvatore Sanfilippo, Aug 1, 2007, in forum: Ruby
    Replies:
    2
    Views:
    100
    Salvatore Sanfilippo
    Aug 3, 2007
  5. Leif Wessman

    Auto flush doesn't work as expected

    Leif Wessman, Jun 15, 2006, in forum: Perl Misc
    Replies:
    2
    Views:
    173
    Leif Wessman
    Jun 16, 2006
Loading...

Share This Page