Skip to content

Commit

Permalink
no need to use so much code
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 18, 2016
1 parent 545da2a commit 56cef83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,5 +1,7 @@

7.07 2016-09-18
- Fixed bug in Mojo::UserAgent::Transactor where 303 redirects would not be
followed correctly with GET requests. (jberger)

7.06 2016-09-17
- Fixed bug where Mojolicious::Renderer would wrap text in layouts.
Expand Down
6 changes: 2 additions & 4 deletions lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -89,10 +89,8 @@ sub redirect {
$new->req($clone);
}
else {
my $method = uc $req->method;
my $headers
= $new->req->method(
$code == 303 ? 'GET' : $method eq 'POST' ? 'GET' : $method)
my $m = uc $req->method;
my $headers = $new->req->method($code == 303 || $m eq 'POST' ? 'GET' : $m)
->content->headers($req->headers->clone)->headers;
$headers->remove($_) for grep {/^content-/i} @{$headers->names};
}
Expand Down

0 comments on commit 56cef83

Please sign in to comment.