[Catalyst] RESTful perl implementations...
Garrett Goebel
ggoebel at goebel.ws
Wed Sep 27 14:14:24 CEST 2006
On Sep 26, 2006, at 11:47 PM, A. Pagaltzis wrote:
> * 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.
I had thought about the HTTP/1.1 methods. However, I was only
concerned with the request methods used for creating RESTful
protocols. But I can see your point. I'll rework the code per your
suggestion.
thanks,
Garrett
More information about the Catalyst
mailing list