Index: trunk/phase3/includes/WebResponse.php |
— | — | @@ -87,8 +87,9 @@ |
88 | 88 | */ |
89 | 89 | public function header( $string, $replace = true, $http_response_code = null ) { |
90 | 90 | $match = array(); |
91 | | - if ( preg_match( '~^HTTP/1.\d (\d+)\D*$~', $string, $match ) ) { |
92 | | - $this->code = intval( $match[1] ); |
| 91 | + if ( substr( $string, 0, 5 ) == 'HTTP/' ) { |
| 92 | + $parts = explode( ' ', $string, 3 ); |
| 93 | + $this->code = intval( $parts[1] ); |
93 | 94 | } else { |
94 | 95 | list( $key, $val ) = explode( ":", $string, 2 ); |
95 | 96 | |