rajukumargupta / php-wsdl-creator

Automatically exported from code.google.com/p/php-wsdl-creator
GNU General Public License v3.0
0 stars 0 forks source link

Other port than 80/443 (standard port) #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am having an issue, when the webserver is not responding on the standard http 
or https port. In the DetermineEndPoint function there is not check on the 
port. So I've added it ;-)

public function DetermineEndPoint(){
    // HTTP / HTTPS
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
        $protocol = 'https';
    } else {
        $protocol = 'http';
    }

    // PORT
    if (isset($_SERVER['SERVER_PORT'])) {
        if (($protocol == 'https' && $_SERVER['SERVER_PORT'] != 443) ||
            ($protocol == 'http'  && $_SERVER['SERVER_PORT'] != 80)) {
            $port = ':'. $_SERVER['SERVER_PORT'];
        }
    }

    return $protocol .'://'. $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'];
}

Original issue reported on code.google.com by fuwi...@gmail.com on 10 Apr 2012 at 7:29

GoogleCodeExporter commented 9 years ago
Sorry for the big delay, I didn't receive the issue notify with email. I 
changed this issue as enhancement request and will add non-default port support 
in the release of version 2.4. Thanks for sharing your code!

Original comment by schickwa...@googlemail.com on 22 Aug 2012 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by schickwa...@googlemail.com on 22 Aug 2012 at 9:23

GoogleCodeExporter commented 9 years ago
Added in revision 44.

Original comment by schickwa...@googlemail.com on 26 Aug 2012 at 7:38