Skip to content

Commit

Permalink
Merge branch 'hotfix/3980' into develop
Browse files Browse the repository at this point in the history
Forward port zendframework#3980
  • Loading branch information
weierophinney committed Mar 12, 2013
2 parents 1473c22 + 61d0dba commit bda2e66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Uri/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Http extends Uri
/**
* @see Uri::$validHostTypes
*/
protected $validHostTypes = self::HOST_DNS_OR_IPV4_OR_IPV6;
protected $validHostTypes = self::HOST_DNS_OR_IPV4_OR_IPV6_OR_REGNAME;

/**
* User name as provided in authority of URI
Expand Down
1 change: 1 addition & 0 deletions library/Zend/Uri/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Uri implements UriInterface
const HOST_DNS_OR_IPV4_OR_IPV6 = 0x0B; //01011
const HOST_DNS_OR_IPVANY = 0x0F; //01111
const HOST_REGNAME = 0x10; //10000
const HOST_DNS_OR_IPV4_OR_IPV6_OR_REGNAME = 0x13; //10011
const HOST_ALL = 0x1F; //11111

/**
Expand Down
6 changes: 6 additions & 0 deletions tests/ZendTest/Uri/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,10 @@ public function testGetPortDoesntModifyUrlHttps()
$uri->getPort();
$this->assertEquals($origUri, $uri->toString());
}

public function testValidHostTypesWithUnderScore()
{
$uri = new HttpUri('http://zf2_app.local');
$this->assertTrue($uri->isValid());
}
}

0 comments on commit bda2e66

Please sign in to comment.