Skip to content

Commit

Permalink
Merge pull request #23 from monken/master
Browse files Browse the repository at this point in the history
Don't restrict parsing the request body to PUT and POST requests
  • Loading branch information
miyagawa committed Feb 21, 2012
2 parents 505bb86 + 0bd6314 commit c992337
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changes
@@ -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
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 c992337

Please sign in to comment.