milov.nl

Interaction design • webdevelopment • web art • photography

milov.nl : forum : coding : 'perl content-type: text/plain'

perl content-type: text/plain user 4574, 051127 04:45
quick question, i have the
print("Content-type: text/plain \n\n");
 
but a browser alert pops up asking if i should download the file. i want the text to be displayed on the browser. is that a webserver thing or a web browser thing?

24.229.231.248.res-cmts.mtp.ptd.net
Re: perl content-type: text/plain Milo, 051127 09:06
Careful, I believe the correct headername is actually Content-Type (note the capital T).
milov.demon.nl
Re: perl content-type: text/plain Jan!, 051128 22:41
user 4574: remove the space after "text/plain" and before "\n\n"
milov: the headers are case-insensitive: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

I agree that capitalizing looks better, though.
d54C0B3C3.access.telenet.be
Re: perl content-type: text/plain Milo, 051129 15:55
Case-insensitive? Wow, had no idea. I vaguely remember reading lots of advice to use Content-Type instead of Content-type in case of problems.

Anyway, I'll be using CoNtEnT-TyPe from now on... :)
xdsl-169-250.caveonet.nl
Re: perl content-type: text/plain Jan!, 051201 15:55
"CoNtEnT-TyPe: image/jpeg; subject=bReEzAh; q=0.1", dan? :-)
213-193-181-61.adsl.easynet.be
Pages: 1