Solved

Content-Type: doesnot/work

Posted on 1998-09-01
2
190 Views
Last Modified: 2010-03-05
If someone can help me with this, I will give them all the points i have left.

I have written a few scripts that work fine in Internet explorer - however - when run on netscape they screw up (well it appears they do)

Whenever I get the input from a form, i use the get method, and before I start printing any HTML I am putting the expected - print "Content-type: text/html\n\n"; at the start. THIS DOES NOT WORK. In explorer, I get the words 'Content-type: text/html' at the top left of the page. and then I get the correct output from the rest of the code.

In netscape, I get a dialog telling me that I am trying to download a file of MIME type application/x-perl, when I am trying to display a text/html file (which I have told the HTTP header. I can then save or open the file - or cancel. The file is the output that should have gone to screen.

WHAT IS WRONG!?????

Please Help
0
Comment
Question by:infoatags
2 Comments
 

Accepted Solution

by:
matthewallum earned 160 total points
ID: 1204657
Im guessing here that you are running PERL on a Windows machine.
What you need to do is add this line just before the print "Content-type: text/html\n\n" ;

print "HTTP/1.0 200 OK\r\n" if $ENV{PERLXS} eq "PerlIS";

For some reason (I cant rember what) you need to pass extra header info on a windows server running PERL. This should fix your problem
0
 

Author Comment

by:infoatags
ID: 1204658
U BLOODY LEGEND!!!Why were you not around a week ago??
Can I get your email address if I have further questions (though I doubt I will)
email me at john@activegs.com.au if I can get ur email addr.

Thanks heaps
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question