Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mime header problem

Status
Not open for further replies.

1DMF

Programmer
Joined
Jan 18, 2005
Messages
8,795
Location
GB
I have moved my site to another host, my perl code doesn't work properly as when i issue the "print Content-type: text/html"; command, this is actually appearing on the page messing everything up.

I asked the host if anything might be auto-issuing the mime header and this is the response...

As far as I am aware of, IIS does not send an ‘automatic’ mime header. The only time I have seen this happen is in an ASP page where the mime type is set, but the page has already started being output, therefore it is too late to change any of the headers. Ensure that page output buffer is being cached in your Perl script, so that you can change the mime type of the page later in the code if necessary

can some help explain what could be causing the problem, I have moved from a windows box running IIS & ActiveState PERL v5.8 , to exactly the same environment, nothing in my scripts has changed, so why is the header being outputed twice?

and how do i stop it.

thanks,

1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
well I found this in the PERL documentation
If you see HTTP header information appearing in the body of a client browser that accesses scripts served by PerlEx, you should change the EnableCGIHeader registry entry to 0.
The script will then be responsible for outputting all HTTP headers.
----------------------------------------
EnableCGIHeader
DWORD Value. Determines whether PerlEx adds HTTP headers or not.

Can take the values of 0 and 1. The default value is 1 (on).

When EnableCGIHeader is set to 1, PerlEx will emit Server: and Date: HTTP header lines.

If you are using Server Side Includes in the documents which you are serving with PerlEx, set EnableCGIHeader to 0 (off).

If you see HTTP header information appearing in the body of the client browser, you should change EnableCGIHeader registry entry to 0.

If EnableCGIHeader is set to 0, you are responsible for outputting all HTTP headers.

This registry entry is optional. If not set, it defaults to 1.

It can be set both at the top level and within registry keys for Interpreter Classes.

However I have changed the registry entry and re-booted the server and am still getting the same problem.

Any ideas anyone?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top