Re: Flush headers ?

André Warnier (tomcat) <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 06.02.2017 18:33, Ben RUBSON wrote:
> Hi,
>
> I'm using mod_perl2 and I'm trying to flush headers before the body content.
>
> $r->content_type('application/zip');
> $r->headers_out->add('Content-Disposition' => 'attachment');
> $r->rflush;
> long_operation();
>
> Unfortunately this does not work.

When you say "this does not work", can you be more explicit ?
If you trace the browser request/response headers, what does it show exactly ?

>
> The following works, but of course corrupts my output :
>
> $r->content_type('application/zip');
> $r->headers_out->add('Content-Disposition' => 'attachment');
> print "\0";
> $r->rflush;
> long_operation();
>
> Any clue ?
>
> Many thanks !
>
> Ben
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.