Skip to content

Commit

Permalink
Allow double slashes at the start of paths
Browse files Browse the repository at this point in the history
This appears to have originally been here due to a misreading of the
spec, and is causing a fair few issues.
  • Loading branch information
rmccue committed Sep 18, 2016
1 parent f7cb82b commit 873a846
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions library/Requests/IRI.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,7 @@ public function is_valid() {
$isauthority = $this->iuserinfo !== null || $this->ihost !== null || $this->port !== null;
if ($this->ipath !== '' &&
(
$isauthority && (
$this->ipath[0] !== '/' ||
substr($this->ipath, 0, 2) === '//'
) ||
$isauthority && $this->ipath[0] !== '/' ||
(
$this->scheme === null &&
!$isauthority &&
Expand Down

0 comments on commit 873a846

Please sign in to comment.