Hi folks,

I have been battling this problem for a while now. Until recently, I thought
I had network issues, but in the end I wrote my email migration code in
python and managed to connect to the google services with no problems, so
before I write my own client in PHP, I thought I would run this issue past
your good selves to see if what I am saying makes sense and if there might
be a solution / workaround...

To the best of my knowledge, it appears that in order for M$ Isa Server to
pass an https connection through http-tunneling, it requires the address to
be sent in the following format:

www.google.com/accounts/ClientLogin:443

The Isa proxy seems to see this address and then allow an https
connection through an http-tunnel. However, if I have understood the zend
code correctly, the zend libraries use the protocol prefix to decide in what
manner to treat the connection, forcing me to try:

https://www.google.com/accounts/ClientLogin:443

or

https://www.google.com*/accounts/ClientLogin<https://www.google.com/accounts/ClientLogin>
*

Neither of these uris seem to work for making an http-tunneled connection
with the Isa proxy server. I think the problem code is in
Zend/Http/Client.php) :

    /**
     * Set the URI for the next request
     *
     * @param  Zend_Uri_Http|string $uri
     * @return Zend_Http_Client
     * @throws Zend_Http_Client_Exception
     */
    public function setUri($uri)
    {
        if (is_string($uri)) {
            $uri = Zend_Uri::factory($uri);
        }
        if (!$uri instanceof Zend_Uri_Http) {
            throw new Zend_Http_Client_Exception('Passed parameter is not a
valid HTTP URI.');
        }
        // We have no ports, set the defaults
        if (! $uri->getPort()) {
            $uri->setPort(($uri->getScheme() == 'https' ? 443 : 80));
        }
        $this->uri = $uri;
        return $this;
    }

The uri constructor method determines the scheme via the protocol prefix.
This is later used to set the port number to 443. See this routine in the
factory method of Zend/Uri.php:

$uri = explode(':', $uri, 2);
        $scheme = strtolower($uri[0]);
        $schemeSpecific = isset($uri[1]) ? $uri[1] : '';
        if (!strlen($scheme)) {
            throw new Zend_Uri_Exception('An empty string was supplied for
the scheme');
        }
        // Security check: $scheme is used to load a class file, so only
alphanumerics are allowed.
        if (!ctype_alnum($scheme)) {
            throw new Zend_Uri_Exception('Illegal scheme supplied, only
alphanumeric characters are permitted');
        }
        /**
         * Create a new Zend_Uri object for the $uri. If a subclass of
Zend_Uri exists for the
         * scheme, return an instance of that class. Otherwise, a
Zend_Uri_Exception is thrown.
         */
        switch ($scheme) {
            case 'http':
            case 'https':
                $className = 'Zend_Uri_Http';
                break;
            case 'mailto':
                // @todo
            default:
                throw new Zend_Uri_Exception("Scheme \"$scheme\" is not
supported");
        }


If anyone could spare 10mins to look at this I would really appreciate it.
Is there anyone else managing to connect via an Isa proxy? Is there any way
round this? I have tried hacking the code in various ways but it is not
working and I am thinking of writing my own client code in php to solve the
problem, but before I do that - can anybody help me?

Many thanks in advance,

dan :-)

Reply via email to