getHttpVersion() public method

Accessor for parsed HTTP protocol version.
public getHttpVersion ( ) : integer
return integer HTTP error code.
示例#1
0
 function testParseBasicHeaders()
 {
     $headers = new SimpleHttpHeaders("HTTP/1.1 200 OK\r\n" . "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n" . "Content-Type: text/plain\r\n" . "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\n" . "Connection: close");
     $this->assertIdentical($headers->getHttpVersion(), "1.1");
     $this->assertIdentical($headers->getResponseCode(), 200);
     $this->assertEqual($headers->getMimeType(), "text/plain");
 }