[Catalyst] RESTful perl implementations...
A. Pagaltzis
pagaltzis at gmx.de
Wed Sep 27 06:47:04 CEST 2006
* Garrett Goebel <ggoebel at goebel.ws> [2006-09-26 16:20]:
> Readonly my @ok_methods => (qw/GET POST PUT DELETE/);
>
> my @allow_methods = grep { exists $self->attributes->{$_} } @ok_methods;
If you intend to publish this code somewhere, please don’t do
this. Preventing typos is a noble intention, but HTTP doesn’t end
at GET/POST/PUT/DELETE. At the very least, the list should also
include HEAD, OPTIONS, TRACE and CONNECT by default, which would
be the complete set of verbs from RFC 2616 (HTTP/1.1). Including
the base WebDAV verbs (PROPFIND, PROPPATCH, MKCOL, COPY, MOVE,
LOCK and UNLOCK; cf. RFC 2518) as well would probably be a good
idea, and the list should definitely be configurable in any case.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Catalyst
mailing list