Example #1
0
 /**
  * Parse all cookies from a response and attach them to the response
  *
  * @var Requests_Response $response
  */
 public function before_redirect_check(Requests_Response &$return)
 {
     $url = $return->url;
     if (!$url instanceof Requests_IRI) {
         $url = new Requests_IRI($url);
     }
     $cookies = Requests_Cookie::parseFromHeaders($return->headers, $url);
     $this->cookies = array_merge($this->cookies, $cookies);
     $return->cookies = $this;
 }
Example #2
0
 /**
  * Parse all cookies from a response and attach them to the response
  *
  * @var Requests_Response $response
  */
 public function before_redirect_check(Requests_Response &$return)
 {
     $cookies = Requests_Cookie::parseFromHeaders($return->headers);
     $this->cookies = array_merge($this->cookies, $cookies);
     $return->cookies = $this;
 }