aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Http.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-05-11 16:18:01 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-05-13 08:11:24 +0200
commit12fa748c49773d57f03052ef3cee4c72a2d3cdcc (patch)
tree3f5b8ba180d5b23ead240d6acd54cdc05f689364 /lib/private/AppFramework/Http.php
parentab2df70e3ac0d8216c1986cc64aff83c215f1add (diff)
downloadnextcloud-server-12fa748c49773d57f03052ef3cee4c72a2d3cdcc.tar.gz
nextcloud-server-12fa748c49773d57f03052ef3cee4c72a2d3cdcc.zip
Move the notmodified check to middleware where it belongs
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/AppFramework/Http.php')
-rw-r--r--lib/private/AppFramework/Http.php19
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php
index 3c4a52fe37c..88e49816eb9 100644
--- a/lib/private/AppFramework/Http.php
+++ b/lib/private/AppFramework/Http.php
@@ -116,24 +116,7 @@ class Http extends BaseHttp {
* @param string $ETag the etag
* @return string
*/
- public function getStatusHeader($status, \DateTime $lastModified=null,
- $ETag=null) {
- if (!is_null($lastModified)) {
- $lastModified = $lastModified->format(\DateTime::RFC2822);
- }
-
- // if etag or lastmodified have not changed, return a not modified
- if ((isset($this->server['HTTP_IF_NONE_MATCH'])
- && trim(trim($this->server['HTTP_IF_NONE_MATCH']), '"') === (string)$ETag)
-
- ||
-
- (isset($this->server['HTTP_IF_MODIFIED_SINCE'])
- && trim($this->server['HTTP_IF_MODIFIED_SINCE']) ===
- $lastModified)) {
- $status = self::STATUS_NOT_MODIFIED;
- }
-
+ public function getStatusHeader($status) {
// we have one change currently for the http 1.0 header that differs
// from 1.1: STATUS_TEMPORARY_REDIRECT should be STATUS_FOUND
// if this differs any more, we want to create childclasses for this