Solved

Content-Type: doesnot/work

Posted on 1998-09-01
2
180 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now