cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregor J. Rothfuss" <gre...@apache.org>
Subject Re: Matching on HTTP method?
Date Wed, 15 Dec 2004 17:51:34 GMT
Andrzej Jan Taramina wrote:
> Is there any easy way in a Sitemap to match against the HTTP Method of the 
> request.  That is, whether it was a Get/Post/Put/Delete/Head/etc?
> 
> I suppose I could write an extended matcher that does this....but figured 
> that maybe someone already has one out there?

you could try using a selector like thus:

  <match pattern="*.xls">
    <select type="request-method">
      <when test="GET">
         <generate src="{1}.xml"/>
         <transform src="xml2poi.xls"/>
         <serialize type="hssf"/>
      </when>
      <when test="PUT">
         <generate type="xls2poi"/>
         <transform src="poi2sourcewrite"/>
         <transform type="sourcewrite"/>
         <serialize type="dummyserializer"/>
      </when>
      [...]
</match>


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


Mime
View raw message