?
Solved

Content-Type: doesnot/work

Posted on 1998-09-01
2
Medium Priority
?
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
matthewallum earned 640 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Six Sigma Control Plans
Suggested Courses

770 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