Remove code preventing protocol downgrades

main
Chris Smith 9 years ago
parent ce1eda25f3
commit ffab235edd

@ -331,14 +331,15 @@ class RemoteFilesystem
throw $e; throw $e;
} }
if ('http' === parse_url($targetUrl, PHP_URL_SCHEME) && 'https' === $this->scheme) { // TODO: Disabled because this is (probably) different behaviour to PHP following for us.
// Do not allow protocol downgrade. // if ('http' === parse_url($targetUrl, PHP_URL_SCHEME) && 'https' === $this->scheme) {
// TODO: Currently this will fail if a request goes http -> https -> http // // Do not allow protocol downgrade.
$e = new TransportException('The "'.$this->fileUrl.'" file could not be downloaded, not permitting protocol downgrade'); // // TODO: Currently this will fail if a request goes http -> https -> http
$e->setHeaders($http_response_header); // $e = new TransportException('The "'.$this->fileUrl.'" file could not be downloaded, not permitting protocol downgrade');
$e->setResponse($result); // $e->setHeaders($http_response_header);
throw $e; // $e->setResponse($result);
} // throw $e;
// }
if ($this->io->isDebug()) { if ($this->io->isDebug()) {
$this->io->writeError(sprintf('Following redirect (%u)', $this->redirects)); $this->io->writeError(sprintf('Following redirect (%u)', $this->redirects));

Loading…
Cancel
Save