Giter Site home page Giter Site logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
Small typhos:

    /**
     * Determine the endpoint URI
     */
    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'];
        }else{
            $port =$_SERVER['SERVER_PORT'];
        }
    }
    // SERVER_NAME
    if (isset($_SERVER['X_FORWARDED_FOR'])) {
        $hostname=$_SERVER['X_FORWARDED_FOR'];
    }else{
        $hostname =$_SERVER['SERVER_NAME'];
    }
    return $protocol .'://'. $hostname .':'. $port . $_SERVER['SCRIPT_NAME'];
}

    /**
     * Determine the namespace
     */
    public function DetermineNameSpace(){
            // SERVER_NAME
        if (isset($_SERVER['X_FORWARDED_FOR'])) {
            $hostname=$_SERVER['X_FORWARDE_FOR'];
        }else{
            $hostname =$_SERVER['SERVER_NAME'];
        }
        return 'http://'.$hostname.str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']);
    }

Original comment by [email protected] on 24 Aug 2012 at 7:18

from php-wsdl-creator.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
Now also as Patch file

On more issue found: Line764 cause at demo.php 
//if(is_null($class)&&$this->IsOnlyGlobal()){
+       if(!isset($class)&&$this->IsOnlyGlobal()){ 

Tested with PHP Version 5.3.8, Apache, win7 

Original comment by [email protected] on 26 Aug 2012 at 12:55

Attachments:

from php-wsdl-creator.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
I'd prefer to init the $class variable with NULL, but thanks anyway!

The XFF header (as all X-headers) is a very special thing - and it could be 
faked, so I'd prefer to set the PhpWsdl->EndPoint and PhpWsdl->NameSpace 
manually in this case. I had a look at the Apache documentation:

http://httpd.apache.org/docs/trunk/mod/mod_proxy.html

There the XFF header is described as "The IP address of the client"!? Are you 
sure you receive the server name when accessing this header?

Original comment by [email protected] on 26 Aug 2012 at 6:49

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from php-wsdl-creator.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#forwardreverse

X-Forwarded-Host is correct not X-Forwarded-For

Still this works as expected now in our reverse Proxy scenario

I correct it to that, thanks

Original comment by [email protected] on 26 Aug 2012 at 8:48

from php-wsdl-creator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.