Revert "Implemented strict http request serialization for APIs that forbid a session to be used in concurrent requests (e.g. dedimania)."
This reverts commit b0732bee96
.
Solution required PHP 7.0.7, thus breaking requirement of compatibility with PHP 5.4.
This commit is contained in:
@ -19,11 +19,6 @@ class Request extends EventDispatcher implements RequestInterface
|
||||
* @var Options Object containing options for current request
|
||||
*/
|
||||
protected $options = null;
|
||||
|
||||
/**
|
||||
* @var bool Whether requests to the target host should be serialized or not.
|
||||
*/
|
||||
protected $serializeRequests = false;
|
||||
|
||||
/**
|
||||
* Create new cURL handle
|
||||
@ -126,8 +121,7 @@ class Request extends EventDispatcher implements RequestInterface
|
||||
* @param \cURL\RequestsQueue $requestsQueue
|
||||
* @throws \cURL\Exception
|
||||
*/
|
||||
public function attachTo(RequestsQueue $requestsQueue)
|
||||
{
|
||||
public function attachTo(RequestsQueue $requestsQueue) {
|
||||
if (isset($this->queue)) {
|
||||
throw new Exception('Already bound to a RequestQueue.');
|
||||
}
|
||||
@ -135,24 +129,6 @@ class Request extends EventDispatcher implements RequestInterface
|
||||
$this->queue->attach($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to serialize requests to the same host or not.
|
||||
*
|
||||
* @param bool $serialize
|
||||
*/
|
||||
public function setSerialize($serialize = true)
|
||||
{
|
||||
$this->serializeRequests = $serialize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getSerialize()
|
||||
{
|
||||
return $this->serializeRequests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new RequestsQueue with single Request attached to it
|
||||
* and calls RequestsQueue::socketPerform() method.
|
||||
|
@ -217,12 +217,4 @@ class RequestsQueue extends EventDispatcher implements RequestsQueueInterface, \
|
||||
}
|
||||
return curl_multi_select($this->mh, $timeout) !== -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $option
|
||||
* @param $value
|
||||
*/
|
||||
public function setOption($option, $value) {
|
||||
curl_multi_setopt($this->mh, $option, $value);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user