diff --git a/library/Requests/IRI.php b/library/Requests/IRI.php index 44a95171b..8dc2fa284 100644 --- a/library/Requests/IRI.php +++ b/library/Requests/IRI.php @@ -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 && diff --git a/tests/IRI.php b/tests/IRI.php index 8df8567d2..77f241726 100644 --- a/tests/IRI.php +++ b/tests/IRI.php @@ -333,11 +333,6 @@ public function testInvalidAbsolutizeBase() $this->assertFalse(Requests_IRI::absolutize('://not a URL', '../')); } - public function testInvalidAbsolutizeRelative() - { - $this->assertFalse(Requests_IRI::absolutize('http://example.com/', 'http://example.com//not a URL')); - } - public function testFullGamut() { $iri = new Requests_IRI();