[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Content-Type: doesnot/work

Posted on 1998-09-01
2
Medium Priority
?
205 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
Six Sigma Control Plans
Suggested Courses

873 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