Permalink
Browse files

Don't restrict parsing the request body to PUT and POST requests

  • Loading branch information...
1 parent 505bb86 commit 0bd6314a1c1b3b1fb5d6a365866c29416b701395 @monken monken committed Dec 29, 2011
Showing with 3 additions and 1 deletion.
  1. +2 −0 Changes
  2. +1 −1 lib/Twiggy/Server.pm
View
@@ -1,5 +1,7 @@
Revision history for Perl extension Twiggy
+ - Don't restrict parsing the request body to PUT and POST requests
+
0.1010 Mon Jan 17 17:04:14 PST 2011
- Returning CondVar as a PSGI response is deprecated. Will be removed in the next release
View
@@ -292,7 +292,7 @@ sub _run_app {
my($self, $app, $env, $sock) = @_;
unless ($env->{'psgi.input'}) {
- if ($env->{CONTENT_LENGTH} && $env->{REQUEST_METHOD} =~ /^(?:POST|PUT)$/) {
+ if ($env->{CONTENT_LENGTH}) {
$self->_read_chunk($sock, $env->{CONTENT_LENGTH}, sub {
my ($data) = @_;
open my $input, '<', \$data;

0 comments on commit 0bd6314

Please sign in to comment.