Changeset 1553
- Timestamp:
- 04/16/08 14:40:39 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/peer/http/stubHTTPURL.php
r1491 r1553 28 28 parent::__construct($url); 29 29 if (isset($this->url['port']) == false) { 30 $this->url['port'] = ('https' == $this->getScheme()) ? 143 : 80;30 $this->url['port'] = ('https' == $this->getScheme()) ? 443 : 80; 31 31 } 32 32 … … 107 107 /** 108 108 * checks whether the url uses a default port or not 109 * 109 * 110 110 * Default ports are 80 for http and 143 for https 111 111 * trunk/src/test/php/net/stubbles/peer/http/stubHTTPURLTestCase.php
r1491 r1553 39 39 $this->assertTrue($http->hasDefaultPort()); 40 40 $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)); 42 42 $this->assertEquals('https', $http->getScheme()); 43 43 $this->assertEquals('example.com', $http->getHost()); 44 $this->assertEquals( 143, $http->getPort());44 $this->assertEquals(443, $http->getPort()); 45 45 $this->assertEquals('/', $http->getPath()); 46 46 $this->assertFalse($http->hasQuery());
