You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dale Ghent <da...@elemental.org> on 2001/07/09 21:24:59 UTC

2.0.20/SSI problem?

I just compiled .20 up from the tarball, and all seems great except when
it comes to serving SSI (.shtml) pages.

It looks like the SSI parsing goes okay, but the Content-Type header
that's being returned is "text/plain" instead of the expected "text/html",
thus causing the browser to show the page in it's source form.

I'm using the stock httpd.conf, with the SSI-related config container
uncomented and "IncludesNoExec" added to the relevant directorie's
Options. The shtml pages in question exist on a name-based vhost that's
tacked onto the bottom of the config and has no directive in it that would
seem to get in the way for SSI being read. The same config runs just fine
on 1.3.x

/dale



Re: 2.0.20/SSI problem?

Posted by Ian Holsman <ia...@cnet.com>.
On 09 Jul 2001 15:24:59 -0400, Dale Ghent wrote:
> 
> I just compiled .20 up from the tarball, and all seems great except when
> it comes to serving SSI (.shtml) pages.
> 
> It looks like the SSI parsing goes okay, but the Content-Type header
> that's being returned is "text/plain" instead of the expected "text/html",
> thus causing the browser to show the page in it's source form.
> 

Hi Dale,
I just pulled the latest CVS and I get text/html in the header.
My config 
...
Options FollowSymLinks +Includes
...
AddType text/html .shtml
<FilesMatch "\.shtml(\..+)?$">
    SetOutputFilter INCLUDES
</FilesMatch>


> I'm using the stock httpd.conf, with the SSI-related config container
> uncomented and "IncludesNoExec" added to the relevant directorie's
> Options. The shtml pages in question exist on a name-based vhost that's
> tacked onto the bottom of the config and has no directive in it that would
> seem to get in the way for SSI being read. The same config runs just fine
> on 1.3.x
> 
> /dale
> 
--
Ian Holsman
Performance Measurement & Analysis
CNET Networks    -    415 364-8608


Re: 2.0.20/SSI problem?

Posted by rb...@covalent.net.
On Mon, 9 Jul 2001, Dale Ghent wrote:

> On Mon, 9 Jul 2001, Dale Ghent wrote:
>
> |
> | I just compiled .20 up from the tarball, and all seems great except when
> | it comes to serving SSI (.shtml) pages.
> |
> | It looks like the SSI parsing goes okay, but the Content-Type header
> | that's being returned is "text/plain" instead of the expected "text/html",
> | thus causing the browser to show the page in it's source form.
>
> Cliff suggested that I add an "AddType text/html .shtml" to my config, and
> boom, it worked.
>
> I guess that I'm under the impression that mod_include should set the
> Content-Type? Or is this AddType statement just missing from
> http-std.conf?

This is just missing from the standard config file.

Ryan

_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------


Re: 2.0.20/SSI problem?

Posted by Cliff Woolley <cl...@yahoo.com>.
On Mon, 9 Jul 2001, Dale Ghent wrote:

> I guess that I'm under the impression that mod_include should set the
> Content-Type?

In theory, it's possible to parse non-html documents with mod_include.  In
that case, you'd want to have explicit control over the content type
rather than leaving it up to mod_include to set it for you.

> Or is this AddType statement just missing from http-std.conf?

Yep.  It was there in 1.3's default config file (commented out)...

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: 2.0.20/SSI problem?

Posted by Dale Ghent <da...@elemental.org>.
On Mon, 9 Jul 2001, Dale Ghent wrote:

|
| I just compiled .20 up from the tarball, and all seems great except when
| it comes to serving SSI (.shtml) pages.
|
| It looks like the SSI parsing goes okay, but the Content-Type header
| that's being returned is "text/plain" instead of the expected "text/html",
| thus causing the browser to show the page in it's source form.

Cliff suggested that I add an "AddType text/html .shtml" to my config, and
boom, it worked.

I guess that I'm under the impression that mod_include should set the
Content-Type? Or is this AddType statement just missing from
http-std.conf?

/dale


Re: 2.0.20/SSI problem?

Posted by Cliff Woolley <cl...@yahoo.com>.
On Mon, 9 Jul 2001, Dale Ghent wrote:

> It looks like the SSI parsing goes okay, but the Content-Type header
> that's being returned is "text/plain" instead of the expected "text/html",
> thus causing the browser to show the page in it's source form.

As I mentioned off-list, all you have to do is add an addtype line to your
config:

AddType text/html .shtml

We might want to add that to the default config file.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA