content-type not set

content-type not set

Post by Markus Rietzle » Tue, 13 Feb 2001 21:38:45



when or how will set the correct content-type when a cgi-script is
executed?
even if i use

    print "Content-type: text/html\n\n";

at the very start of my perl-script the content-type is (sometimes) not
set correctly. internet explorer will say "unkown" on the
property-screen of the generated screen.

markus

 
 
 

content-type not set

Post by Alan J. Flavel » Tue, 13 Feb 2001 22:01:52



> when or how will set the correct content-type when a cgi-script is
> executed?

Your script.

Quote:> even if i use

>     print "Content-type: text/html\n\n";

> at the very start of my perl-script the content-type is (sometimes) not
> set correctly.

I think you may be mistaken...

Quote:> internet explorer will say "unkown" on the
> property-screen of the generated screen.

IE does not conform to the HTTP protocol specification.  If you are
trying to test for conformance to specifications, use something else.
If you are also trying to work with IE (until they finally decide to
conform with the standards-track IETF specification, see also the
draft http://www.w3.org/TR/2001/NOTE-cuap-20010206 at the W3C) then
you might need some extra actions, but this doesn't take away the need
to conform with the published interworking specifications.

As always, you'd get a better answer if you would provide a URL that
exhibits the behaviour of which you are complaining.

 
 
 

content-type not set

Post by Markus Rietzle » Tue, 13 Feb 2001 22:58:53


thanx so far.

i also thought that my script will set the content-type. but although i wirte
the content-type line at the beginning of my output. this is the
server-output of my script

HTTP/1.1 200 OK
Date: Mon, 12 Feb 2001 13:03:11 GMT
Server: Apache/1.3.17 (Unix) mod_jk mod_perl/1.25
Connection: close
Content-Type: text/html

<html>
(...)

i know IE and microsoft are a special subject. but even good old netscape
can't recognize the scripts output as html... (the script runs in our
intranet so there is no public url to show...)

my problem with this is, that we have several windows terminal server clients
(citrix) how relay on the correct content-type. so with content-type set to
unknown the page will not be displayed...

markus



> > when or how will set the correct content-type when a cgi-script is
> > executed?

> Your script.

> > even if i use

> >     print "Content-type: text/html\n\n";

> > at the very start of my perl-script the content-type is (sometimes) not
> > set correctly.

> I think you may be mistaken...

> > internet explorer will say "unkown" on the
> > property-screen of the generated screen.

> IE does not conform to the HTTP protocol specification.  If you are
> trying to test for conformance to specifications, use something else.
> If you are also trying to work with IE (until they finally decide to
> conform with the standards-track IETF specification, see also the
> draft http://www.w3.org/TR/2001/NOTE-cuap-20010206 at the W3C) then
> you might need some extra actions, but this doesn't take away the need
> to conform with the published interworking specifications.

> As always, you'd get a better answer if you would provide a URL that
> exhibits the behaviour of which you are complaining.

 
 
 

content-type not set

Post by Bill Mosele » Wed, 14 Feb 2001 02:42:44


On Mon, 12 Feb 2001 14:58:53 +0100 Markus Rietzler

Quote:> thanx so far.

> i also thought that my script will set the content-type. but although i wirte
> the content-type line at the beginning of my output. this is the
> server-output of my script

> HTTP/1.1 200 OK
> Date: Mon, 12 Feb 2001 13:03:11 GMT
> Server: Apache/1.3.17 (Unix) mod_jk mod_perl/1.25
> Connection: close
> Content-Type: text/html

There's your content type.  Why do you think it's not being set?  
Remember that the server parses the headers you send in your CGI script
-- so they may not output in the same order you send them.

--
Bill Moseley

 
 
 

content-type not set

Post by Sanjay Agrawa » Fri, 16 Feb 2001 02:51:55


Looks good to me.

Try modifying it to Content-type: text/html

also, try putting a bogus header after the content-type.

Sanjay

 
 
 

1. Setting Header Content-Type on Apache

Hello !

Our web server provides documents in hebrew.
We were using the meta tag in the html to change the charset to
iso-8859-8 . Though, it appears that Netscape browsers 3.x and 4.x have
a bug which causes documents, in which a switch in the charset was made
using the meta tag, to be redrawn . It looks like the page reloads
twice.

After looking into the problem we though that if we cane change the
header Content-Type which the server sends to include charset iso-8859-8
it will not have to redraw the page. Indeed, on CGI scripts, in which we
can set the headers, this solution worked.
My question is how can I set the default header that Apache sends to be
Content-Type: text/html; charset=iso-8859-8 Instead of the usual one ?


TIA,
Ehud Regev
Hebrew University of Jerusalem

2. UATA Hd and Linux Fdisk

3. How to set Content-Type: text/html; version=3.0

4. Linux advocates - Listen to this speech!!!

5. APACHE: Setting the Content-Type from HTML

6. StarOffice installation - help!

7. Apache not sending Content-type: headers. Why?

8. Reading is much more interesting than TV (1386/1708)

9. konsole_grantpty not installed root-suid Content-Type: text/plain; charset=us-ascii

10. Help: (mail) content-length/type headers not set

11. Capturing Content-Type header on Apache

12. COMMERCIAL: Drivers v1.0.7 for LML33 cards available Content-Type: text/plain; charset=us-ascii

13. Dedicated Linux Employment Site Content-Type: text/plain; charset=us-ascii