httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Beard <j...@cyberxape.com>
Subject Re: HTTP-headers in ErrorDocuments
Date Thu, 27 Jun 2002 16:15:27 GMT
Check out the Header directive. I don't know if
you use it to conditionally add a header though
(i.e. only for 404's). But if you are going to
do it globally, this may work. Just be sure to
build apache with mod_headers.

You can also write a custom module to build into
Apache. If this doesn't work.

Another way is to have Tomcat and the servlet API
to inject the appropriate header. This implies that
all of your content is generated by Tomcat.

Lastly, I recommend you update you web server if
it's exposed to the internet and if you are really
running 1.3.24. There is a vulernablility in versions
prior to the latest.

HTH.

--Jeff

On Thu, 27 Jun 2002, Jussi Vuokko wrote:

>   Hello,
>
>   Is it possible to modify HTTP-headers for ErrorDocuments?
>
>   We are running some software with Apache/JServ. My problem is that I'd
> like to add P3P HTTP-header for every response, including error documents.
> This works fine for static pages with httpd.conf's "Header append", but
> when you're using servlets, JServ does some wild 302 redirs and Apache
> doesn't seem to include user defined headers within these responses.
>
>   Here we go:
>
> --- clip - clip ---
>
> juiba:/home/jussiv# telnet barfoo 80
> Trying 192.168.42.145...
> Connected to 192.168.42.145.
> Escape character is '^]'.
> GET /foo/bar/foobar? HTTP/1.1
> Host: barfoo
>
> HTTP/1.1 302 Found
> Date: Thu, 27 Jun 2002 14:54:26 GMT
> Server: Apache/1.3.24 (Unix) Debian GNU/Linux mod_ssl/2.8.7 OpenSSL/0.9.6c ApacheJServ/1.1.2
> Set-Cookie: JServSessionIdfoo_bar=skcknlopd1; path=/
> Location: /foo/bar/foobar?&JServSessionIdfoo_bar=skcknlopd1
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=iso-8859-1
>
> 14e
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>302 Found</TITLE>
> </HEAD><BODY>
> <H1>Found</H1>
> The document has moved <A HREF="/foo/bar/foobar?&amp;JServSessionIdfoo_bar=skcknlopd1">here</A>.<P>
> <HR>
> <ADDRESS>Apache/1.3.24 Server at barfoo Port 80</ADDRESS>
> </BODY></HTML>
>
> 0
>
> GET /foo/bar/foobar?&JServSessionIdfoo_bar=skcknlopd1 HTTP/1.1
> Host: barfoo
>
> HTTP/1.1 200 OK
> Date: Thu, 27 Jun 2002 14:55:07 GMT
> Server: Apache/1.3.24 (Unix) Debian GNU/Linux mod_ssl/2.8.7 OpenSSL/0.9.6c ApacheJServ/1.1.2
> P3P: policyref="http://barfoo/w3c/p3policy.xml",CP="ALL IND DSP COR ADM CONo CUR CUSo
IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=iso-8859-1
>
> 4e8
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
> <html>
> FooBar!
> </html>
>
> 0
>
> Connection closed by foreign host.
> juiba:/home/jussiv#
>
> --- clip - clip ---
>
>   Any ideas?
>
>   -jussi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

--
Jeff Beard | Systems Architect, Programmer, Sysadmin
Contact    | jeff at cyberxape dot com
Location   | In front of the computer, Boulder, CO, USA


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message