comparison vendor/symfony/browser-kit/Cookie.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 5fb285c0d0e3
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
19 class Cookie 19 class Cookie
20 { 20 {
21 /** 21 /**
22 * Handles dates as defined by RFC 2616 section 3.3.1, and also some other 22 * Handles dates as defined by RFC 2616 section 3.3.1, and also some other
23 * non-standard, but common formats. 23 * non-standard, but common formats.
24 *
25 * @var array
26 */ 24 */
27 private static $dateFormats = array( 25 private static $dateFormats = array(
28 'D, d M Y H:i:s T', 26 'D, d M Y H:i:s T',
29 'D, d-M-y H:i:s T', 27 'D, d-M-y H:i:s T',
30 'D, d-M-Y H:i:s T', 28 'D, d-M-Y H:i:s T',
60 if ($encodedValue) { 58 if ($encodedValue) {
61 $this->value = urldecode($value); 59 $this->value = urldecode($value);
62 $this->rawValue = $value; 60 $this->rawValue = $value;
63 } else { 61 } else {
64 $this->value = $value; 62 $this->value = $value;
65 $this->rawValue = urlencode($value); 63 $this->rawValue = rawurlencode($value);
66 } 64 }
67 $this->name = $name; 65 $this->name = $name;
68 $this->path = empty($path) ? '/' : $path; 66 $this->path = empty($path) ? '/' : $path;
69 $this->domain = $domain; 67 $this->domain = $domain;
70 $this->secure = (bool) $secure; 68 $this->secure = (bool) $secure;
80 } 78 }
81 } 79 }
82 80
83 /** 81 /**
84 * Returns the HTTP representation of the Cookie. 82 * Returns the HTTP representation of the Cookie.
85 *
86 * @return string The HTTP representation of the Cookie
87 *
88 * @throws \UnexpectedValueException
89 */ 83 */
90 public function __toString() 84 public function __toString()
91 { 85 {
92 $cookie = sprintf('%s=%s', $this->name, $this->rawValue); 86 $cookie = sprintf('%s=%s', $this->name, $this->rawValue);
93 87