hi list

i've a handler which controlls access to dowonloadable files. The proble i 
have is now, that IE (project designed only for this browser) prints one or 
twoo times the same "File download"-window where you can choose between 
open or save if you choose open. If you choose save all is going well.

i had to force a download, because of some pdf-problems (on some systems, 
the acrobat reader-plugin doesn't print the content - in the server-logs 
was all ok.) so that's why there's 'application/octet-stream' and 
"Content-Disposition" => "attachment;"

Perhaps this could be an ie-problem, but since I've to solve it with 
mod_perl i thougt that one of you could know a solution ...


<code-snip>

if (exists($requestvars{'If-Modified-Since'}))
     {
         if (&changed)
             {
                 $r->content_type($contenttypes{$datype});
                 if ($contenttypes{$datype} eq 'application/octet-stream')
                     {
                         $r->header_out("Content-Disposition" => 
"attachment;");
                     };
                 $r->status(HTTP_NOT_MODIFIED);
                 $r->send_http_header();
                 return OK;
             };
     };
$r->content_type($contenttypes{$datype});
$r->update_mtime($data[0]);
$r->set_last_modified();
if ($contenttypes{$datype} eq 'application/octet-stream')
     {
         $r->header_out("Content-Disposition" => "attachment;");
     };
$r->send_http_header();
return OK if $r->header_only;
$r->send_fd($file);
return OK;
.
.
.
</code-snip>

any ideas ?  what I'm doing wrong?

Thanks in advance!!

Thomas Bach

<><><><>
think karo .. www.bkaro.net

Reply via email to