You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jussi Vuokko <ju...@smilehouse.com> on 2002/07/01 09:47:04 UTC

Re: HTTP-headers in ErrorDocuments

On Fri, 28 Jun 2002, Jeff Beard wrote:

> On Fri, 28 Jun 2002, Jussi Vuokko wrote:
> >   Ok, it seems to work fine when mod_headers is statically linked.
> > Why it won't work when your're having mod_headers as DSO (or: is it
> > possible to make it work that way somehow)?

> That's odd. Don't mean to offend, but the correct LoadModule stanza
> is in the httpd.conf, right?

LoadModule headers_module /usr/lib/apache/1.3/mod_headers.so
Header set 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"'

  Seems like it.

  -jussi


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


Re: HTTP-headers in ErrorDocuments

Posted by Jussi Vuokko <ju...@smilehouse.com>.
On Tue, 2 Jul 2002, Rodent of Unusual Size wrote:

> Aha.  Now I've got it.  H'm.  I'll cogitate on this; it does seem perhaps
> suboptimal.  In the meantime, in what scope does your Header directive appear?

  Globally (main server configuration).

  -jussi


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


Re: HTTP-headers in ErrorDocuments

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Jussi Vuokko wrote:
> 
> On Mon, 1 Jul 2002, Rodent of Unusual Size wrote:
> > 
> > Okey, so you're using Header and not seeing it in the response header
> > for a normal document.
> 
>   Um, no. As you can see:
	:
>   First one - the normal document - does contain the P3P header. Second
> one - the 404 error document - doesn't. And that's the problem.

Aha.  Now I've got it.  H'm.  I'll cogitate on this; it does seem perhaps
suboptimal.  In the meantime, in what scope does your Header directive appear?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

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


Re: HTTP-headers in ErrorDocuments

Posted by Jussi Vuokko <ju...@smilehouse.com>.
On Mon, 1 Jul 2002, Rodent of Unusual Size wrote:

> > Actually the question is: Why doesn't the Header directive apply if I'm
> > not using the ErrorDocument directive. :-)

> Okey, so you're using Header and not seeing it in the response header
> for a normal document.

  Um, no. As you can see:

--- clip -- clip ---

GET / HTTP/1.1
Host: barfoo

HTTP/1.1 200 OK
Date: Tue, 02 Jul 2002 08:19:30 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"
Last-Modified: Thu, 07 Feb 2002 18:55:41 GMT
ETag: "57cb-100e-3c62cdad"
Accept-Ranges: bytes
Content-Length: 4110
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
Found.
</html>

GET /asdkjl HTTP/1.1
Host: barfoo

HTTP/1.1 404 Not Found
Date: Tue, 02 Jul 2002 08:19:48 GMT
Server: Apache/1.3.24 (Unix) Debian GNU/Linux mod_ssl/2.8.7 OpenSSL/0.9.6c ApacheJServ/1.1.2
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

114
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /asdkjl was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.24 Server at barfoo Port 80</ADDRESS>
</BODY></HTML>

0

--- clip -- clip ---

  First one - the normal document - does contain the P3P header. Second 
one - the 404 error document - doesn't. And that's the problem.

  -jussi


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


Re: HTTP-headers in ErrorDocuments

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Jussi Vuokko wrote:
> 
> Actually the question is: Why doesn't the Header directive apply if I'm
> not using the ErrorDocument directive. :-)

Okey, so you're using Header and not seeing it in the response header
for a normal document.  That shouldn't happen, if things are scoped
properly.  If the documents in question are being handled by some
app-server tyupe of thing that likes to think it has Absolute Power(tm)
over all aspects of the response, all bets are off..
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

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


Re: HTTP-headers in ErrorDocuments

Posted by Jussi Vuokko <ju...@smilehouse.com>.
On Mon, 1 Jul 2002, Rodent of Unusual Size wrote:

> If you're not using ErrorDocument, how do you know the Header
> directive doesn't apply to them?

  Actually the question is: Why doesn't the Header directive apply if I'm 
not using the ErrorDocument directive. :-) If there is a way how the 
ErrorDocument directive can be used in this case, please let me know.

  -jussi


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


Re: HTTP-headers in ErrorDocuments

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Jussi Vuokko wrote:
> 
> On Mon, 1 Jul 2002, Rodent of Unusual Size wrote:
> 
> > > Thanks. However, I think that this won't solve the Problem because I
> > > have been testing this one with bunch of simple text strings and all
> > > of them appear in normal HTTP response (200, etc.). I'm still looking
> > > a way to tell Apache that also ErrorDocuments should contain these
> > > home-made headers.
> 
> > (Sorry if I'm asking questions that have already been answered..)
> > What is a sample ErrorDocument line that isn't behaving as you'd like?
> 
> Well, I'm not using ErrorDocument directive because I didn't find any
> use of it

If you're not using ErrorDocument, how do you know the Header
directive doesn't apply to them?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

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


Re: HTTP-headers in ErrorDocuments

Posted by Jussi Vuokko <ju...@smilehouse.com>.
On Mon, 1 Jul 2002, Rodent of Unusual Size wrote:

> > Thanks. However, I think that this won't solve the Problem because I
> > have been testing this one with bunch of simple text strings and all
> > of them appear in normal HTTP response (200, etc.). I'm still looking
> > a way to tell Apache that also ErrorDocuments should contain these
> > home-made headers.

> (Sorry if I'm asking questions that have already been answered..)
> What is a sample ErrorDocument line that isn't behaving as you'd like?

  Well, I'm not using ErrorDocument directive because I didn't find any 
use of it (I thought about making cgi-script for 302 which would add this 
header, but I'm not sure if it's gonna work: JServ generates the Location 
header and I think that this information is something that this script 
can't fetch). Eh?

  -jussi


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


Re: HTTP-headers in ErrorDocuments

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Jussi Vuokko wrote:
> 
> Thanks. However, I think that this won't solve the Problem because I
> have been testing this one with bunch of simple text strings and all
> of them appear in normal HTTP response (200, etc.). I'm still looking
> a way to tell Apache that also ErrorDocuments should contain these
> home-made headers.

(Sorry if I'm asking questions that have already been answered..)

What is a sample ErrorDocument line that isn't behaving as you'd like?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

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


Re: HTTP-headers in ErrorDocuments

Posted by Jussi Vuokko <ju...@smilehouse.com>.
On Mon, 1 Jul 2002, Rodent of Unusual Size wrote:

> > Header set 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"'

> Um, Apache isn't the shell; you can't go around swapping single and double
> quotation marks indiscriminately.  It doesn't understand ticks.  Try this
> instead (untested):
> Header set 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\""

  Thanks. However, I think that this won't solve the Problem because I 
have been testing this one with bunch of simple text strings and all  
of them appear in normal HTTP response (200, etc.). I'm still looking a 
way to tell Apache that also ErrorDocuments should contain these home-made 
headers.

  -jussi


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


Re: HTTP-headers in ErrorDocuments

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Jussi Vuokko wrote:
> 
> Header set 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"'

Um, Apache isn't the shell; you can't go around swapping single and double
quotation marks indiscriminately.  It doesn't understand ticks.  Try this
instead (untested):

Header set 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\""
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

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