TYPO3
7.6
|
Public Member Functions | |
sendRequest (HTTP_Request2 $request) | |
getInfo () | |
Public Member Functions inherited from HTTP_Request2_Adapter | |
sendRequest (HTTP_Request2 $request) | |
Protected Member Functions | |
createCurlHandle () | |
workaroundPhpBug47204 ($ch, &$headers) | |
callbackReadBody ($ch, $fd, $length) | |
callbackWriteHeader ($ch, $string) | |
callbackWriteBody ($ch, $string) | |
Protected Member Functions inherited from HTTP_Request2_Adapter | |
calculateRequestLength (&$headers) | |
Static Protected Member Functions | |
static | wrapCurlError ($ch) |
Protected Attributes | |
$response | |
$eventSentHeaders = false | |
$eventReceivedHeaders = false | |
$position = 0 | |
$lastInfo | |
Protected Attributes inherited from HTTP_Request2_Adapter | |
$request | |
$requestBody | |
$contentLength | |
Static Protected Attributes | |
static | $headerMap |
static | $sslContextMap |
static | $errorMap |
Static Protected Attributes inherited from HTTP_Request2_Adapter | |
static | $bodyDisallowed = array('TRACE') |
static | $bodyRequired = array('POST', 'PUT') |
|
protected |
Callback function called by cURL for reading the request body
resource | $ch | cURL handle |
resource | $fd | file descriptor (not used) |
integer | $length | maximum length of data to return |
Definition at line 436 of file Curl.php.
References elseif.
|
protected |
Callback function called by cURL for saving the response body
resource | $ch | cURL handle (not used) |
string | $string | part of the response body |
HTTP_Request2_MessageException |
Definition at line 550 of file Curl.php.
References HTTP_Request2_Exception\MALFORMED_RESPONSE.
|
protected |
Callback function called by cURL for saving the response headers
resource | $ch | cURL handle |
string | $string | response header (with trailing CRLF) |
Definition at line 470 of file Curl.php.
References Net_URL2\resolve().
|
protected |
Creates a new cURL handle and populates it with data from the request
Definition at line 220 of file Curl.php.
References HTTP_Request2\AUTH_BASIC, HTTP_Request2\AUTH_DIGEST, HTTP_Request2_Adapter\calculateRequestLength(), elseif, HTTP_Request2\METHOD_GET, HTTP_Request2\METHOD_HEAD, HTTP_Request2\METHOD_POST, HTTP_Request2\METHOD_PUT, HTTP_Request2_Exception\MISCONFIGURATION, HTTP_Request2_Exception\MISSING_VALUE, and workaroundPhpBug47204().
Referenced by sendRequest().
getInfo | ( | ) |
sendRequest | ( | HTTP_Request2 | $request | ) |
Sends request to the remote server and returns its response
HTTP_Request2 | $request | HTTP request message |
HTTP_Request2_Exception |
Definition at line 161 of file Curl.php.
References HTTP_Request2_Adapter\$request, $response, createCurlHandle(), HTTP_Request2\getCookieJar(), HTTP_Request2\getUrl(), HTTP_Request2_Exception\MISCONFIGURATION, and HTTP_Request2\setLastEvent().
|
protected |
Workaround for PHP bug #47204 that prevents rewinding request body
The workaround consists of reading the entire request body into memory and setting it as CURLOPT_POSTFIELDS, so it isn't recommended for large file uploads, use Socket adapter instead.
resource | $ch | cURL handle |
array | &$headers | Request headers |
Definition at line 400 of file Curl.php.
References HTTP_Request2_Adapter\$requestBody, HTTP_Request2\AUTH_DIGEST, and elseif.
Referenced by createCurlHandle().
|
staticprotected |
Creates a subclass of HTTP_Request2_Exception from curl error data
resource | $ch | curl handle |
|
staticprotected |
|
protected |
Definition at line 105 of file Curl.php.
Referenced by sendRequest().