cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Ulrich Niedermann <n...@n-dimensional.de>
Subject [C2] Sitemap Components, Content-Negotiation and Caching
Date Sat, 05 May 2001 23:22:06 GMT
Hi all,

if you think this is not relevant before the beta release, please tell
me. If this issue is not just a matter of missing docs or lack of
understanding by myself, I think this could cause a minor but
necessary change to some interfaces within the components' request
handling. 

The Problem
===========

Multiple sitemap components within a pipeline may consider multiple
aspects ("dimensions") of a request. A HTTP server must/should tell
the client (be it user agent or cache) which aspects the delivered
data depends on. The means to tell this is the HTTP/1.1 "Vary:"
header.

However, there seems to be no mechanism in Cocoon 2 by which the
components can set the "Vary:" header in a cooperative fashion to
correctly reflect all considered aspects.

Reference and Notions
=====================

RFC 2616 Chapter 14.44 Vary http://www.rfc-editor.org/rfc/rfc2616.txt

The different aspects according to which a resource may be rendered
are called dimensions in these RFCs. These dimensions usually are HTTP
headers ("Accept", "Accept-Language", "Accept-Encoding",
"User-Agent"), but also a "*" for non-HTTP dependencies are allowed in
a "Vary:" header. 

How I arrived with this
=======================

During the last few days I wanted to implement HTTP/1.1 content
negotiation for selecting the correct language using Cocoon 2. 

I searched the C2 source tree for "Vary" and "negot" and came up with 
2 references to "Vary", one each in HostSelectorFactory and
BrowserSelectorFactory. 

But I think it is perfectly reasonable to have a resource with
language-dependent content and user-agent-dependent HTML code. This
could be achieved using org.apache.cocoon.acting.LangSelect and a
BrowserMatcherFactory or BrowserSelectorFactory.

As I understand HTTP, this should be signalled by issuing a HTTP
header "Vary: Accept-Language, User-Agent".

But how could/should different sitemap components (selectors,
generators, actions, transformers, matchers) achieve this?

I'm afraid I don't understand the sitemap/component architecture well
enough to answer that question by myself. Can you?

Conclusion
==========

Draw you own :-)

Gruß,

Uli

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message