Skip to content
Permalink
Browse files

Merge pull request #240 from rmccue/double-slash-path

Allow paths starting with a double-slash
  • Loading branch information...
rmccue committed Sep 18, 2016
2 parents f7cb82b + 73a75ac commit 1c39a78bd77d3cbca5a243179bde508e2f161aa3
Showing with 1 addition and 9 deletions.
  1. +1 −4 library/Requests/IRI.php
  2. +0 −5 tests/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 &&
@@ -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();

0 comments on commit 1c39a78

Please sign in to comment.
You can’t perform that action at this time.