mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
Dependency updates and update version number
This commit is contained in:
24
vendor/symfony/http-foundation/Response.php
vendored
24
vendor/symfony/http-foundation/Response.php
vendored
@@ -21,6 +21,7 @@ class Response
|
||||
const HTTP_CONTINUE = 100;
|
||||
const HTTP_SWITCHING_PROTOCOLS = 101;
|
||||
const HTTP_PROCESSING = 102; // RFC2518
|
||||
const HTTP_EARLY_HINTS = 103; // RFC8297
|
||||
const HTTP_OK = 200;
|
||||
const HTTP_CREATED = 201;
|
||||
const HTTP_ACCEPTED = 202;
|
||||
@@ -327,7 +328,7 @@ class Response
|
||||
}
|
||||
|
||||
// headers
|
||||
foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) {
|
||||
foreach ($this->headers->allPreserveCase() as $name => $values) {
|
||||
foreach ($values as $value) {
|
||||
header($name.': '.$value, false, $this->statusCode);
|
||||
}
|
||||
@@ -336,15 +337,6 @@ class Response
|
||||
// status
|
||||
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode);
|
||||
|
||||
// cookies
|
||||
foreach ($this->headers->getCookies() as $cookie) {
|
||||
if ($cookie->isRaw()) {
|
||||
setrawcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
|
||||
} else {
|
||||
setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -372,7 +364,7 @@ class Response
|
||||
|
||||
if (function_exists('fastcgi_finish_request')) {
|
||||
fastcgi_finish_request();
|
||||
} elseif ('cli' !== PHP_SAPI) {
|
||||
} elseif (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
|
||||
static::closeOutputBuffers(0, true);
|
||||
}
|
||||
|
||||
@@ -519,13 +511,19 @@ class Response
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the response is worth caching under any circumstance.
|
||||
* Returns true if the response may safely be kept in a shared (surrogate) cache.
|
||||
*
|
||||
* Responses marked "private" with an explicit Cache-Control directive are
|
||||
* considered uncacheable.
|
||||
*
|
||||
* Responses with neither a freshness lifetime (Expires, max-age) nor cache
|
||||
* validator (Last-Modified, ETag) are considered uncacheable.
|
||||
* validator (Last-Modified, ETag) are considered uncacheable because there is
|
||||
* no way to tell when or how to remove them from the cache.
|
||||
*
|
||||
* Note that RFC 7231 and RFC 7234 possibly allow for a more permissive implementation,
|
||||
* for example "status codes that are defined as cacheable by default [...]
|
||||
* can be reused by a cache with heuristic expiration unless otherwise indicated"
|
||||
* (https://tools.ietf.org/html/rfc7231#section-6.1)
|
||||
*
|
||||
* @return bool true if the response is worth caching, false otherwise
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user