summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-11-01 17:17:13 +0100
committerfranck cuny <franck@lumberjaph.net>2010-11-01 17:17:13 +0100
commit3c77176f1113da3dd36074e742b332e441c86573 (patch)
tree8b839d8a4640a555802bccb27504c9df2f2ceb7e
parentdon't trace yet (diff)
parentregex to check method (diff)
downloadnet-http-spore-3c77176f1113da3dd36074e742b332e441c86573.tar.gz
Merge branch 'master' of github.com:franckcuny/net-http-spore
* 'master' of github.com:franckcuny/net-http-spore:
  regex to check method
-rw-r--r--lib/Net/HTTP/Spore/Meta/Method.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Meta/Method.pm b/lib/Net/HTTP/Spore/Meta/Method.pm
index 6e68b82..db990ff 100644
--- a/lib/Net/HTTP/Spore/Meta/Method.pm
+++ b/lib/Net/HTTP/Spore/Meta/Method.pm
@@ -144,7 +144,7 @@ sub wrap {
           : delete $method_args{payload};
 
         if ( $payload
-            && ( $method->method ne 'POST' || $method->method ne 'PUT' ) )
+            && ( $method->method !~ /^P(?:OS|U)T$/i ) )
         {
             die Net::HTTP::Spore::Response->new( 599, [],
                 { error => "payload requires a PUT or POST method" },