Changeset 1553

Show
Ignore:
Timestamp:
04/16/08 14:40:39 (1 month ago)
Author:
richi
Message:

peer: bugfix for ssl port

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/peer/http/stubHTTPURL.php

    r1491 r1553  
    2828        parent::__construct($url); 
    2929        if (isset($this->url['port']) == false) { 
    30             $this->url['port'] = ('https' == $this->getScheme()) ? 143 : 80; 
     30            $this->url['port'] = ('https' == $this->getScheme()) ? 443 : 80; 
    3131        } 
    3232         
     
    107107    /** 
    108108     * checks whether the url uses a default port or not 
    109      *  
     109     * 
    110110     * Default ports are 80 for http and 143 for https 
    111111     * 
  • trunk/src/test/php/net/stubbles/peer/http/stubHTTPURLTestCase.php

    r1491 r1553  
    3939        $this->assertTrue($http->hasDefaultPort()); 
    4040        $this->assertEquals('https://example.com/', $http->get()); 
    41         $this->assertEquals('https://example.com:143/', $http->get(true)); 
     41        $this->assertEquals('https://example.com:443/', $http->get(true)); 
    4242        $this->assertEquals('https', $http->getScheme()); 
    4343        $this->assertEquals('example.com', $http->getHost()); 
    44         $this->assertEquals(143, $http->getPort()); 
     44        $this->assertEquals(443, $http->getPort()); 
    4545        $this->assertEquals('/', $http->getPath()); 
    4646        $this->assertFalse($http->hasQuery());