richardtj / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

report "Unsupported characters in host name" #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write codes like  " $request = new OAuthRequester("       
https://www.googleapis.com/latitude/v1/currentLocation", 'GET', 
$tokenResultParams); "
2. please notice the blanks before "https" string

What is the expected output? What do you see instead?
it should ok,but report  "Unsupported characters in host name"

and finaly I find that this is the bug of builtin function parse_url's bug,you 
should trim the string passed to this function.

just modify the code at line 515 of /library/OAuthRequest.php, $ps = 
@parse_url(trim($this->uri));

Please provide any additional information below.

Original issue reported on code.google.com by subbor...@gmail.com on 3 May 2011 at 9:58