Skip to content

Commit

Permalink
DD-1423 : protocol neutral to http
Browse files Browse the repository at this point in the history
  • Loading branch information
guardiola86 committed Jun 26, 2019
1 parent e2db472 commit 8c1a80f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Dennis/Link/Checker/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ public function getInfo($url) {
* @throws ResourceFailException
*/
protected function doInfoRequest($url) {
// If url is protocol neutral, force it to use https.
// If url is protocol neutral, force it to use http.
if (substr( $url, 0, 2 ) === "//") {
$url = ltrim($url, '//');
$url = 'https://' . $url;
$url = 'http://' . $url;
}
// Only redirect 301's so cannot use CURLOPT_FOLLOWLOCATION
$ch = curl_init();
Expand Down

1 comment on commit 8c1a80f

@alexharries
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok :)

Please sign in to comment.