Skip to content

Commit b867a2a

Browse files
committed
also remove content-type and content-encoding when redirecting to GET
1 parent 70d8834 commit b867a2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Psr18/Client.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ protected function handleRedirect(RequestInterface $request, ResponseInterface $
303303
if (in_array($response->getStatusCode(), $options->redirectToGetStatusCodes)) {
304304
$request = $request->withMethod("GET")
305305
->withBody(new EmptyStream())
306-
->withoutHeader("Content-Length");
306+
->withoutHeader("Content-Length")
307+
->withoutHeader("Content-Type")
308+
->withoutHeader("Content-Encoding");
307309
return $this->doSendRequest($request, $options, $redirects + 1);
308310
}
309311

0 commit comments

Comments
 (0)