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
Unable to handle uri with colon. #1550
Comments
Please, check you full URI. Because a colon works well on both PHP 5.6 & 7.0:
|
Thanks for helping, @alexeyshockov. After your inspiration I've done some more debugs and find out the $uri passed in to the parse_url() function was the string "/document/demo/22:0", not the full string with host and port. As you may confirm the result in Repl.it, it seems like parse_url() had treated the colon as the delimiter for (host) and (port)
So, I end up with solving my case by passing in the full uri with host and ports included. But this is still a bug either of faulty implementation parse_url() from php, or an improper usage of parse_url() of guzzle. Should I change this issue into a bug report? |
There is already a long-standing bug report for that on PHP. IMO this can be closed as it should be fixed by php. Also the problem is more in https://github.com/guzzle/psr7 and not here. |
Agreed with Tobion -- this is a PHP stdlib issue. |
FWIW, the PHP bug is this: Previously reported in #55511 broken parse_url, but that was marked as Bogus. |
I "solve" this issue putting the URL like this:
for this:
|
I have an api with colon in the uri syntax ('/document/demo/22:0'), which is not able to be correctly parsed by guzzle.
It is likely to be the issue of php function parse_url() as the error says
"InvalidArgumentException: Unable to parse URI: /document/demo/22:0 in /var/www/html/demo/vendor/guzzlehttp/psr7/src/Uri.php:53 Stack trace: ..."
Not sure if this is a general issue or a special case in php7.
Versions:
guzzle 6.2.1
php 7.0.8-0ubuntu0.16.04.2
The text was updated successfully, but these errors were encountered: