You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Miles Egan <mi...@caddr.com> on 2003/06/02 18:20:57 UTC
any way to match on http request type
Is there any way to match/select in the pipeline for the HTTP method
used in the request? I'd like to write a pipeline for handling PUT
requests.
--
Miles Egan <mi...@caddr.com>
Re: any way to match on http request type
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 02.Jun.2003 -- 09:20 AM, Miles Egan wrote:
> Is there any way to match/select in the pipeline for the HTTP method
> used in the request? I'd like to write a pipeline for handling PUT
> requests.
Another possibility is to construct your own Matcher from the
(Caching)WildCardMatcher in o.a.c.matching.modular and the
RequestInputModule :
<!-- ... -->
<map:matchers default="wildcard">
<map:matcher name="host-matcher"
logger="sitemap.matcher.wildcard"
src="org.apache.cocoon.matching.modular.CachingWildcardMatcher">
<input-module name="request"/>
<parameter-name>serverName</parameter-name>
</map:matcher>
<!-- ... -->
</map:matchers>
<!-- ... -->
<map:match type="host-matcher" pattern="localhost">
<!-- ... -->
</map:match>
<!-- ... -->
The above snippet is taken from the mail block sample for sendmail and
checks for the server name. Adjusting it to your needs should be
trivial.
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: any way to match on http request type
Posted by Miles Egan <mi...@caddr.com>.
Perfect! Thanks.
On Mon, 2003-06-02 at 11:59, Alex Romayev wrote:
> Sorry. You need the RequestMethodSelector.
>
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/selection/RequestMethodSelector.html
>
> --- Miles Egan <mi...@caddr.com> wrote:
> > The problem is that I don't want to select on one of
> > the headers, but
> > the actual request method (GET/POST/PUT).
> >
> > On Mon, 2003-06-02 at 11:26, Alex Romayev wrote:
> > > Have you looked at the HeaderSelector?
> > >
> > > Miles Egan <mi...@caddr.com> wrote:Is there any
> > way to
> > > match/select in the pipeline for the HTTP method
> > > used in the request? I'd like to write a pipeline
> > for
> > > handling PUT
> > > requests.
> > --
> > Miles Egan <mi...@caddr.com>
> >
>
> > ATTACHMENT part 2 application/pgp-signature
> name=signature.asc
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
--
Miles Egan <mi...@caddr.com>
Re: any way to match on http request type
Posted by Alex Romayev <ro...@yahoo.com>.
Sorry. You need the RequestMethodSelector.
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/selection/RequestMethodSelector.html
--- Miles Egan <mi...@caddr.com> wrote:
> The problem is that I don't want to select on one of
> the headers, but
> the actual request method (GET/POST/PUT).
>
> On Mon, 2003-06-02 at 11:26, Alex Romayev wrote:
> > Have you looked at the HeaderSelector?
> >
> > Miles Egan <mi...@caddr.com> wrote:Is there any
> way to
> > match/select in the pipeline for the HTTP method
> > used in the request? I'd like to write a pipeline
> for
> > handling PUT
> > requests.
> --
> Miles Egan <mi...@caddr.com>
>
> ATTACHMENT part 2 application/pgp-signature
name=signature.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: any way to match on http request type
Posted by Miles Egan <mi...@caddr.com>.
The problem is that I don't want to select on one of the headers, but
the actual request method (GET/POST/PUT).
On Mon, 2003-06-02 at 11:26, Alex Romayev wrote:
> Have you looked at the HeaderSelector?
>
> Miles Egan <mi...@caddr.com> wrote:Is there any way to
> match/select in the pipeline for the HTTP method
> used in the request? I'd like to write a pipeline for
> handling PUT
> requests.
--
Miles Egan <mi...@caddr.com>
Re: any way to match on http request type
Posted by Alex Romayev <ro...@yahoo.com>.
Have you looked at the HeaderSelector?
Miles Egan <mi...@caddr.com> wrote:Is there any way to
match/select in the pipeline for the HTTP method
used in the request? I'd like to write a pipeline for
handling PUT
requests.
--
Miles Egan
> ATTACHMENT part 2 application/pgp-signature
name=signature.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org