TYPO3
7.6
|
Public Member Functions | |
__construct ($statusLine, $bodyEncoded=true, $effectiveUrl=null) | |
parseHeaderLine ($headerLine) | |
appendBody ($bodyChunk) | |
getEffectiveUrl () | |
getStatus () | |
getReasonPhrase () | |
isRedirect () | |
getHeader ($headerName=null) | |
getCookies () | |
getBody () | |
getVersion () | |
Static Public Member Functions | |
static | getDefaultReasonPhrase ($code=null) |
static | decodeGzip ($data) |
static | decodeDeflate ($data) |
Protected Member Functions | |
parseCookie ($cookieString) | |
Protected Attributes | |
$version | |
$code | |
$reasonPhrase | |
$effectiveUrl | |
$headers = array() | |
$cookies = array() | |
$lastHeader = null | |
$body = '' | |
$bodyEncoded | |
Static Protected Attributes | |
static | $phrases |
Definition at line 54 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
__construct | ( | $statusLine, | |
$bodyEncoded = true , |
|||
$effectiveUrl = null |
|||
) |
Constructor, parses the response status line
string | $statusLine | Response status line (e.g. "HTTP/1.1 200 OK") |
bool | $bodyEncoded | Whether body is still encoded by Content-Encoding |
string | $effectiveUrl | Effective URL of the response |
HTTP_Request2_MessageException | if status line is invalid according to spec |
Definition at line 212 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $bodyEncoded, $effectiveUrl, and HTTP_Request2_Exception\MALFORMED_RESPONSE.
appendBody | ( | $bodyChunk | ) |
Appends a string to the response body
string | $bodyChunk | part of response body |
Definition at line 339 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
|
static |
Decodes the message-body encoded by deflate
string | $data | deflate-encoded data |
HTTP_Request2_LogicException |
Definition at line 615 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References HTTP_Request2_Exception\MISCONFIGURATION.
|
static |
Decodes the message-body encoded by gzip
The real decoding work is done by gzinflate() built-in function, this method only parses the header and checks data for compliance with RFC 1952
string | $data | gzip-encoded data |
HTTP_Request2_LogicException | |
HTTP_Request2_MessageException | http://tools.ietf.org/html/rfc1952 |
Definition at line 481 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References HTTP_Request2_Exception\DECODE_ERROR, elseif, and HTTP_Request2_Exception\MISCONFIGURATION.
getBody | ( | ) |
Returns the body of the response
HTTP_Request2_Exception | if body cannot be decoded |
Definition at line 423 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $body, and getHeader().
getCookies | ( | ) |
Returns cookies set in response
Definition at line 412 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $cookies.
Referenced by HTTP_Request2_CookieJar\addCookiesFromResponse().
|
static |
Returns the default reason phrase for the given code or all reason phrases
int | $code | Response code |
Definition at line 194 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $code.
getEffectiveUrl | ( | ) |
Returns the effective URL of the response
This may be different from the request URL if redirects were followed.
Definition at line 352 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $effectiveUrl.
getHeader | ( | $headerName = null | ) |
Returns either the named header or all response headers
string | $headerName | Name of header to return |
Definition at line 397 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $headers.
Referenced by HTTP_Request2_Adapter_Socket\canKeepAlive(), Download\determineFilename(), getBody(), HTTP_Request2_Adapter_Socket\handleRedirect(), HTTP_Request2_Adapter_Socket\shouldUseProxyDigestAuth(), and HTTP_Request2_Adapter_Socket\shouldUseServerDigestAuth().
getReasonPhrase | ( | ) |
Returns the reason phrase
Definition at line 372 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $reasonPhrase.
getStatus | ( | ) |
Returns the status code
Definition at line 362 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $code.
Referenced by HTTP_Request2_Adapter_Socket\canKeepAlive(), HTTP_Request2_Adapter_Socket\handleRedirect(), HTTP_Request2_Adapter_Socket\shouldUseProxyDigestAuth(), and HTTP_Request2_Adapter_Socket\shouldUseServerDigestAuth().
getVersion | ( | ) |
Get the HTTP version of the response
Definition at line 462 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $version.
Referenced by HTTP_Request2_Adapter_Socket\canKeepAlive().
isRedirect | ( | ) |
Whether response is a redirect that can be automatically handled by HTTP_Request2
Definition at line 382 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
|
protected |
Parses a Set-Cookie header to fill $cookies array
string | $cookieString | value of Set-Cookie header |
http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html
Definition at line 290 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References elseif.
Referenced by parseHeaderLine().
parseHeaderLine | ( | $headerLine | ) |
Parses the line from HTTP response filling $headers array
The method should be called after reading the line from socket or receiving it into cURL callback. Passing an empty string here indicates the end of response headers and triggers additional processing, so be sure to pass an empty string in the end.
string | $headerLine | Line from HTTP response |
Definition at line 237 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
References $cookies, $lastHeader, elseif, and parseCookie().
|
protected |
Definition at line 107 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by getBody().
|
protected |
Definition at line 117 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by __construct().
|
protected |
Definition at line 67 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by getDefaultReasonPhrase(), and getStatus().
|
protected |
Definition at line 92 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by getCookies(), and parseHeaderLine().
|
protected |
Definition at line 80 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by __construct(), and getEffectiveUrl().
|
protected |
Definition at line 86 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by getHeader().
|
protected |
Definition at line 101 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by parseHeaderLine().
|
staticprotected |
Definition at line 125 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
|
protected |
Definition at line 74 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by getReasonPhrase().
|
protected |
Definition at line 60 of file vendor/pear/http_request2/HTTP/Request2/Response.php.
Referenced by getVersion().