Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl-CGI: Return HTML and then a file problem

Reply
Thread Tools

Perl-CGI: Return HTML and then a file problem

 
 
jon rogers
Guest
Posts: n/a
 
      07-02-2003
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


 
Reply With Quote
 
 
 
 
Zak McGregor
Guest
Posts: n/a
 
      07-02-2003
On Wed, 02 Jul 2003 16:27:02 +0200, jon rogers <"jon rogers"
<>> wrote:

Hi

> Is there some way of "resetting" the Content-Type: string sent to
> Apache, or some other way around the problem?


Not a perl question. Ask in comp.infosystems.www.authoring.cgi or
somewhere else relevant to server-side http issues. But the short answer
is "No".

Ciao

Zak

--
================================================== ======================
http://www.carfolio.com/ Searchable database of 10 000+ car specs
================================================== ======================
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save and then display msword documents as html, filtered html, single file .mht or pdf. AAaron123 ASP .Net 1 11-17-2009 10:02 AM
How does one play a .wav file and then another and then another...? ted.j.conway@gmail.com Javascript 4 01-17-2006 03:28 AM
Help. SessionID is x then y then x then y BodiKlamph@gmail.com ASP General 0 09-03-2005 03:02 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM
I am having a problem in my asp in the recorsets running at iis 6.0 and sql 2000. Sometimes it return Either BOF or EOF is True with no reason. and then start working again Gabriel Mejía ASP General 17 02-22-2005 08:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57