I am writing a mod_perl2 apache handler... I was performing some form data parsing and feeding the data to mysql database. I was also working on a progress indicator. This is where im having the problem. I cant seem to figure out how to get apache to dynamically feed the status messages directly to the browser / client. Ill try to elaborate on this. I want the page that is generated to have status messages print, to correspond to the give tasks that are being performed and their resulting success or failure. Of course i can generate the output and print it to the client, but it ALL gets printed at once, on task completion. Quite a bit of time passes by whenthe script is running and i would like the messages to be printed progressivly as the script executes. I have seen this feature used on other sites and i have analyzed the output given by the servers. It seems as if the server prints the content length before each line. Im not sure where my problem lies... STDOUT buffering ? or using the RequestIO modules $r->puts() or $r->write() methods. Or perhaps setting the content length for each line / message printed ? I have googled for hours, experimented and have gotten nowhere. Any ideas are appreciated.

In reply to mod_perl progressive STDOUT indicator by Arm123

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.