Capturing Content-Type header on Apache

Capturing Content-Type header on Apache

Post by AtaruM » Fri, 28 Mar 1997 04:00:00



Hi everyone:
I am trying to capture the content-type header apache is sending out to
make sure it is sending out the correct mime type.

I am having a problem, for some reason Frontpage makes my index.htm file
on the root web "index.phtml", I don't know what that means, but I had to
add "addtype text/html .htm .phtml" to my srm.conf file. I added it with
and
without the initial period, and edited the mime.types file as well.

Well, for most browsers, it works, but one guy's netscape here keeps
thinking
it is application/x-httpd-phtml ?? When I telnet to port 80 and do a GET /
I
see the "Content-Type: text/html" header, so I don't know why it's not
working
for this guy. I reset the ini files for netscape and still get the error,
but only on
that one copy of netscape.

But really, how come I can't get the content-type header to show up in my
access_log file? I am using the mod-log-config (I think that is the name,
my telnet
is screwed right now) library and have tried the following:
%{Content-type}i %{Content-type}o", I tried capitalizing the T in type,
but
nothing. It keeps giving "-" dashes in place of the header in my
access_log file.

And why the heck is MS making my file "phtml", when it is just a static
html page? Geez, they won't support "shtml", but they*with all my
settings....

Thanks
Chris Buchholz

 
 
 

1. Apache 1.3.20: ap_send_http_header() sends Content-Type header when response contains no body

The following Apache 1.3.20 code in ap_send_http_header() always
generates a Content-Type message header, even when the response to to
have no body:

    if (r->byterange > 1)
        ap_table_setn(r->headers_out, "Content-Type",
                  ap_pstrcat(r->pool, "multipart", use_range_x(r) ?
"/x-" : "/",
                          "byteranges; boundary=", r->boundary,
NULL));
    else ap_table_setn(r->headers_out, "Content-Type",
make_content_type(r,
        r->content_type));

I would think that a Content-Type message header should not be
included in a response that has no body.  Is this a known problem in
ap_send_http_header()?

Thanks,
Geoff Alexander, Ph.D.
919/254-5216 T/L 444-5216
CMVC95 WebDAV Development
IBM Corporation
RTP, NC

2. Hardware requirements for Linux?

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

4. patch for S3Virge driver and Staroffice 5.0

5. Setting Header Content-Type on Apache

6. libc-5.2.16 getwd(), was 1.2.x + ELF + kswap pitfalls

7. Content-Type Header Field

8. eval

9. Apache and multipart/mixed Content-type

10. Apache content-type modification

11. VirtualHost enabled causes Apache to crash Content-Type: text/plain; charset=us-ascii

12. Apache 1.1.1 communicates incorrect content-type for .ps.gz files

13. Browser-dependent Content-Type with Apache 1.2