Skip to content

Commit

Permalink
Don't restrict parsing the request body to PUT and POST requests
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed Dec 29, 2011
1 parent 505bb86 commit 0bd6314
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/Twiggy/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0bd6314

Please sign in to comment.