Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates allowing parser to handle single label hosts. #23

Merged
merged 2 commits into from
May 15, 2014

Conversation

jeremykendall
Copy link
Contributor

Fixes #22.

Verified fix with updated tests, and additionally with the following script:

<?php

require_once __DIR__ . "/vendor/autoload.php";

use Aura\Uri\Url\Factory as UrlFactory;
use Aura\Uri\PublicSuffixList;

$psl = new PublicSuffixList(require_once __DIR__ . '/data/public-suffix-list.php');
$url_factory = new UrlFactory($_SERVER, $psl);
$url = $url_factory->newInstance('http://localhost/');
echo $url->__toString() . "\n";

Output:

$ php -f issue-22.php
http://localhost

pmjones pushed a commit that referenced this pull request May 15, 2014
Updates allowing parser to handle single label hosts.
@pmjones pmjones merged commit 95a88bd into auraphp:develop May 15, 2014
@pmjones
Copy link
Member

pmjones commented May 15, 2014

Dude, that was beautiful.

@jeremykendall
Copy link
Contributor Author

@pmjones Why thank you, sir :-)

@harikt
Copy link
Member

harikt commented May 16, 2014

Thank you @jeremykendall .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants