cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bernhard huber" <bernhard.hu...@gmx.at>
Subject Re: Request headers
Date Mon, 26 Jul 2004 10:10:40 GMT
hi,
what about using this kind of snippet?

<map:select type="header">
    <map:parameter name="header-name" value="accept"/>
    <map:when test="application/xhtml+xml">
      ...
    </map:when>
    <map:otherwise>
      ...
    </map:otherwise>
</map:select>

you may want to read the wiki, too,
see http://wiki.apache.org/cocoon/HeaderSelector

regards bernhard

> (switching to the developers list)
> 
> >>>>> "Ralph" == Ralph Goers <Ralph.Goers@dslextreme.com> writes:
> 
>     Ralph> What about the HeaderSelector?
> 
> Yes.
> I couldn't find it at first, as it is not listed in the navigation
> pane of the selectors page of the user manual.
> 
> But it appears not to be exactly what I want.
> Looking at the source code, it implements Selector.
> 
> But I want to be able to select whether or not the "Accept" header
> contains the string "application/xhtml+xml" (so as to be able to do
> some limited content negotiation).
> 
> So I think I need a version of header selector that implements
> NamedPatternsSelector, or AbstractRegexpSelector.
> 
> I think I could easily implement such a selector. I could call it
> ContentTypeSelector, specifically matching on the "Accept" header, but
> perhaps something more general might be useful. What do people think?
> -- 
> Colin Paul Adams
> Preston Lancashire
> 

-- 
250 MB Mailbox, 100 FreeSMS/Monat, 1000 MB Online-Festplatte
Jetzt GMX TopMail kostenlos testen http://www.gmx.net/de/go/topmail


Mime
View raw message