diff options
author | franck cuny <franck@lumberjaph.net> | 2010-10-27 10:09:36 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-10-27 10:09:36 +0200 |
commit | 598755225ae86d5c2bf95610fa834ee89ea3107f (patch) | |
tree | c0aea72540ab621db79d35d5d50cb9578873f923 | |
parent | add expected_status to top level (diff) | |
download | net-http-spore-598755225ae86d5c2bf95610fa834ee89ea3107f.tar.gz |
regex to check method
-rw-r--r-- | lib/Net/HTTP/Spore/Meta/Method.pm | 2 |
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" }, |