summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-10-27 10:09:36 +0200
committerfranck cuny <franck@lumberjaph.net>2010-10-27 10:09:36 +0200
commit598755225ae86d5c2bf95610fa834ee89ea3107f (patch)
treec0aea72540ab621db79d35d5d50cb9578873f923
parentadd expected_status to top level (diff)
downloadnet-http-spore-598755225ae86d5c2bf95610fa834ee89ea3107f.tar.gz
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 8a1e0a4..4353b55 100644
--- a/lib/Net/HTTP/Spore/Meta/Method.pm
+++ b/lib/Net/HTTP/Spore/Meta/Method.pm
@@ -139,7 +139,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" },