Response Headers on Apache

Response Headers on Apache

Post by Martin F Arli » Mon, 25 Jan 1999 04:00:00



Hi

I'm using Apache in a test environment and want to turn off some of
the response headers (e.g., Last-Modified and ETag).  I've tried using
`Header set' as well as 'Header unset' to do this but the server
appears to override this.  Does anyone know how I can disable the
Last-Modified and ETag headers?

Thanks

Martin

 
 
 

Response Headers on Apache

Post by Marc Slemk » Mon, 25 Jan 1999 04:00:00



Quote:>Hi
>I'm using Apache in a test environment and want to turn off some of
>the response headers (e.g., Last-Modified and ETag).  I've tried using
>`Header set' as well as 'Header unset' to do this but the server
>appears to override this.  Does anyone know how I can disable the
>Last-Modified and ETag headers?

You can not without hacking the source and/or making your own module.

(well, you can reduce the headers some but doing something like
changing your document to be parsed by mod_include, but that is just
a side effect)

 
 
 

Response Headers on Apache

Post by Michael Fu » Tue, 26 Jan 1999 04:00:00



Quote:> I'm using Apache in a test environment and want to turn off some of
> the response headers (e.g., Last-Modified and ETag).  I've tried using
> `Header set' as well as 'Header unset' to do this but the server
> appears to override this.  Does anyone know how I can disable the
> Last-Modified and ETag headers?

One way, if it's acceptable, would be to enable SSI for the documents
in question.  For example:

    AddHandler server-parsed .html

If you do this you should see only the following headers:

    Date:
    Server:
    Connection:
    Content-Type:

--
Michael Fuhr
http://www.fuhr.net/~mfuhr/

 
 
 

1. Apache 1.2b3 & Location response header

I'm trying to utilize the Location response header.  I'm running Apache
1.23b on a FreeBSD box w/ Netscape 3.0.  I've followed the syntax of a
few CGI FAQ's.  One in particular states...

BEGIN FAQ QUOTE:

Q4.23: Why doesn't:

print "Location: http://host/page.html\n"

work? Why does it only work the first time and get the redirects wrong
later?

A CGI program can only send one Location header. You also cannot send a
MIME content type if you want the
server to perform redirection. For example, this is not valid, though it
may work with some servers:

     #!/usr/local/bin/perl

     .
     .
     .
     print "Content-type: text/plain\n"
     print "Location: http://some.machine/some.doc\n\n"";

END FAQ QUOTE

I created a simple perl CGI script to test out this response header;
however, the server chokes and returns the following error...

BEGIN SERVER ERROR:

Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.


of the time the error occurred, and
anything you might have done that may have caused the error.

END SERVER ERROR

BEGIN MY SIMPLE PERL TEST SCRIPT:

#!/usr/local/bin/perl

print "Location:  lila.east.isi.edu/~moulton/env.html\n";

END MY SIMPLE PERL TEST SCRIPT

I am uncertain if this has to do with the server or with the Netscape
3.0 browser that I'm using.  From the lack of documentation of this
"Location" response header I'm figuring its pretty new.  I've got three
books on CGI development and only one mentions the "Location" response
header (in small detail).

I'm sure this is simply operator error; however, I've seen no concrete
documentation on how to properly use the "Location" response header.  Is
there any documentation on which response headers Apache supports and
how to utilize them?  Anyone know of an exceptionally good CGI FAQ to
boot?

Sincerely,

--
*****************************************************************
** Thomas Moulton                                              **
** ----------------------------------------------------------- **

*****************************************************************

2. Does setitimer(ITIMER_REAL,...) work?

3. Howto rewrite HTTP response headers with Apache?

4. Migration to 4.3.2 AND MUCH MORE

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

6. phillips 200][ (2) cdrom

7. inconsistencies in header responses using Apache 2.0.35 on Windows 2000 and Solaris 8

8. Solaris 8 Jumpstart

9. Apache 1.3.x: What headers are added just before response is sent?

10. Apache : Setting response headers conditionally

11. apache header header

12. Baffling iPlanet header response

13. extra "100 Continue" response headers from CGI script?