Lines Matching defs:headers

64     public $headers = [];
72 public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false, $curl_options = [])
87 if (!is_array($headers)) {
88 $headers = [];
94 foreach ($headers as $key => $value) {
113 $this->headers = curl_exec($fp);
116 $this->headers = curl_exec($fp);
128 $this->headers = \SimplePie\HTTP\Parser::prepareHeaders($this->headers, $info['redirect_count'] + 1);
129 $parser = new \SimplePie\HTTP\Parser($this->headers);
131 $this->headers = $parser->headers;
134 if ((in_array($this->status_code, [300, 301, 302, 303, 307]) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) {
136 $location = \SimplePie\Misc::absolutize_url($this->headers['location'], $url);
138 $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options);
180 foreach ($headers as $key => $value) {
188 $this->headers = '';
190 $this->headers .= fread($fp, 1160);
194 $parser = new \SimplePie\HTTP\Parser($this->headers);
196 $this->headers = $parser->headers;
199 if ((in_array($this->status_code, [300, 301, 302, 303, 307]) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) {
201 $location = \SimplePie\Misc::absolutize_url($this->headers['location'], $url);
203 $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options);
207 if (isset($this->headers['content-encoding'])) {
209 switch (strtolower(trim($this->headers['content-encoding'], "\x09\x0A\x0D\x20"))) {