Version 5.0.0 beta 9
This commit is contained in:
1 parent
214f649f1d
commit
56979f8ee8
202 files changed
+4403
-1123
No files matched your search
@@ -83,7 +83,7 @@ class Response
|
||||
}
|
||||
|
||||
$firstLineBreak = mb_strpos( $content, "\n" );
|
||||
if ( preg_match( "/^HTTP\/(.+?) (\d+?) (.+?)$/", mb_substr( $content, 0, $firstLineBreak ), $matches ) )
|
||||
if ( preg_match( "/^HTTP\/(.+?) (\d+?) (.+?)$/", \substr( $content, 0, $firstLineBreak ), $matches ) )
|
||||
{
|
||||
$this->httpResponseVersion = $matches[1];
|
||||
$this->httpResponseCode = $matches[2];
|
||||
@@ -93,12 +93,12 @@ class Response
|
||||
/* If we have received a 1xx response code, that means it's not the final response */
|
||||
if ( mb_substr( $this->httpResponseCode, 0, 1 ) == 1 OR ( $this->httpResponseCode == 200 AND trim( $this->httpResponseText ) == 'Connection established' ) )
|
||||
{
|
||||
$content = trim( mb_substr( $content, $firstLineBreak ) );
|
||||
$content = trim( \substr( $content, $firstLineBreak ) );
|
||||
}
|
||||
/* Or a 3xx response with another response */
|
||||
elseif ( mb_substr( $this->httpResponseCode, 0, 1 ) == 3 AND preg_match( "/^HTTP\//m", mb_substr( $content, $firstLineBreak ) ) )
|
||||
elseif ( mb_substr( $this->httpResponseCode, 0, 1 ) == 3 AND preg_match( "/^HTTP\//m", \substr( $content, $firstLineBreak ) ) )
|
||||
{
|
||||
$_content = trim( mb_substr( $content, $firstLineBreak ) );
|
||||
$_content = trim( \substr( $content, $firstLineBreak ) );
|
||||
if ( $_content )
|
||||
{
|
||||
$content = $_content;
|
||||
@@ -112,7 +112,7 @@ class Response
|
||||
while ( TRUE );
|
||||
|
||||
/* Split into headers and content */
|
||||
$split = preg_split( "/\r\n\r\n/", mb_substr( $content, $firstLineBreak ), 2 );
|
||||
$split = preg_split( "/\r\n\r\n/", \substr( $content, $firstLineBreak ), 2 );
|
||||
if ( isset( $split[1] ) )
|
||||
{
|
||||
$this->content = $split[1];
|
||||
|
||||
Reference in new issue
Block a user