From: Trey Campbell Date: 2004-02-23T12:25:01+09:00 Subject: Re: Puzzling... Ruby Tuesday wrote: >>The following works for me: >> >>#!C:/ruby/bin/ruby.exe >>print "Content-type: text/html\n\n" <<<<< >>print "1st line " >>print "2nd line " >>print "3rd line " >> >> > >The above works for me as well on both IE6 and Mozilla. But try to change >the header to the following: > > > >>#!C:/ruby/bin/ruby.exe >>print "Content-type: text/plain\n\n" <<<<<<< >>print "1st line " >>print "2nd line " >>print "3rd line " >> >> > >Again, both method works with Mozilla. So, I am begining to think that IE is >mis-behaving! Unfortunately, this is the basic RFC for header. > Please confirm. > >Thanks > > > Trying it with the following: #!C:/ruby/bin/ruby.exe print "Content-type: text/plain\n\n" print "1st line " print "2nd line " print "3rd line " Mozilla renders the page (as if it encountered a
 tag). IE shows a 
dialog offering to run the associated application (but warning that it 
might not be a good idea to do so). I wouldn't characterize that as 
misbehaving since that's what I'd expect it to do, or at least offer to 
do; it's just doing a better job of recognizing potential helper 
applications than Mozilla is.

Just change the extension to something that's not associated with a 
program (like .rbx) and it works the same as Mozilla. I used the name 
puzzle.rbx and got the same results in both browsers. Shouldn't be a 
problem if you're using the shebang line to run it as a CGI, not via the 
extension.

Cheers,
Trey