Created
October 6, 2020 09:23
-
-
Save simonamor/55b8925833dc415f29e927b58e94111c to your computer and use it in GitHub Desktop.
Patch for Catalyst::Request to allow reading body in begin() and still using body_data via Catalyst::Action::REST
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -u Catalyst/Request.pm.orig Catalyst/Request.pm | |
| --- Catalyst/Request.pm.orig 2020-10-06 10:17:47.549710876 +0100 | |
| +++ Catalyst/Request.pm 2020-10-06 10:17:31.352855930 +0100 | |
| @@ -130,6 +130,7 @@ | |
| if($match) { | |
| my $fh = $self->body; | |
| + seek($fh,0,0); | |
| local $_ = $fh; | |
| return $self->data_handlers->{$match}->($fh, $self); | |
| } else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment