Requests_Cookie_Jar::before_redirect_check

Advertisement

Summery Summery

Parse all cookies from a response and attach them to the response

Syntax Syntax

Requests_Cookie_Jar::before_redirect_check( $return )

Source Source

File: wp-includes/Requests/Cookie/Jar.php

	public function before_redirect_check(Requests_Response &$return) {
		$url = $return->url;
		if (!$url instanceof Requests_IRI) {
			$url = new Requests_IRI($url);
		}

		$cookies = Requests_Cookie::parse_from_headers($return->headers, $url);
		$this->cookies = array_merge($this->cookies, $cookies);
		$return->cookies = $this;
	}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.