Menu

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

Fixed
nobody
None
Medium
Enhancement
2012-08-26
2012-04-10
Anonymous
No

Originally created by: fuwi...@gmail.com
Originally owned by: schickwa...@googlemail.com

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'];
}

Discussion

  • Anonymous

    Anonymous - 2012-08-22

    Originally posted by: schickwa...@googlemail.com

    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!

    Labels: -Type-Defect Type-Enhancement
    Owner: schickwa...@googlemail.com

     
  • Anonymous

    Anonymous - 2012-08-22

    Originally posted by: schickwa...@googlemail.com

    (No comment was entered for this change.)

    Status: Started

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.