maxwelldu / oauth-php

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

OAuthRequest.php: No Hostname/Port detected when using http://localhost:8888/Bla/index.php, for example. #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up your test system using 8888 as Apache port.
2. Create an index.php containing:
    require_once('oauth-php/OAuthServer.php');
    $_OAS = new OAuthServer();
    $token = $_OAS->requestToken();
    echo $token;
    return;
3. Try to access the index.php with no parameters.

What is the expected output? What do you see instead?
Expected output would be "OAuth Verification Failed: Can't verify request, 
missing 
oauth_consumer_key or oauth_token". What I'm seeing in PHP's error-log is: "PHP 
Fatal error: 
Uncaught exception 'OAuthException' with message 'Unsupported characters in 
host name' in 
/Users/devilx/Documents/Dropbox/Projects/M3/backend/oauth-php/OAuthRequest.php:5
22".

What version of the product are you using? On what operating system?
r64. Mac OS X with MAMP.

Please provide any additional information below.
See the attachment, I've just patched the according Library-file. Would be 
nice, if you would 
include it in your next release. Thank you. :-)

Original issue reported on code.google.com by mariu...@me.com on 18 Oct 2009 at 4:39

Attachments:

GoogleCodeExporter commented 9 years ago
I'm with the same problem. I guess I'll just use something other rather than 
port 81
for the api portion of my website.

Running Apache on SUSE Linux.

Original comment by henrique...@gmail.com on 20 Oct 2009 at 5:07

GoogleCodeExporter commented 9 years ago
Accepted and committed to the SVN. Thanks a lot for the patch :)

Original comment by brunobg%...@gtempaccount.com on 12 Jan 2010 at 6:58