J
jon rogers
Hi
I run a couple of Perl-CGIs under the latest Apache on my Red Hat box. I
have now come across a problem.
From my script, I'd first like to return some HTML lines:
print "Content-Type: text/html\n\n<html><head><title>The TinyBox
pages</title>\n";
etc.
Then I'd like to return a file:
print "Content-Type:application/octet-stream
Content-Disposition:attachment; filename=results.apl
Content-Length:$content_length\n\n";
However, it seems that I cannot print
Content-Type:application/octet-stream after I have printed
Content-Type: text/html ; the file just gets printed to screen, instead of
the browser opening a file save requester.
Is there some way of "resetting" the Content-Type: string sent to Apache, or
some other way around the problem?
Thanks for your time,
JR
I run a couple of Perl-CGIs under the latest Apache on my Red Hat box. I
have now come across a problem.
From my script, I'd first like to return some HTML lines:
print "Content-Type: text/html\n\n<html><head><title>The TinyBox
pages</title>\n";
etc.
Then I'd like to return a file:
print "Content-Type:application/octet-stream
Content-Disposition:attachment; filename=results.apl
Content-Length:$content_length\n\n";
However, it seems that I cannot print
Content-Type:application/octet-stream after I have printed
Content-Type: text/html ; the file just gets printed to screen, instead of
the browser opening a file save requester.
Is there some way of "resetting" the Content-Type: string sent to Apache, or
some other way around the problem?
Thanks for your time,
JR