diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-09-01 15:39:59 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-01 15:39:59 +0200 |
commit | 87b3e28f06bc96c28fab65d8b297753f686ba58b (patch) | |
tree | 31667adc29374a1acfb61e68d40bd2ec806c3402 /tests | |
parent | 01152676cddc89d2f3796c0380e94b4ce2879bb6 (diff) | |
parent | f12caf930eb375ef60b741265fb331da4d615504 (diff) | |
download | nextcloud-server-87b3e28f06bc96c28fab65d8b297753f686ba58b.tar.gz nextcloud-server-87b3e28f06bc96c28fab65d8b297753f686ba58b.zip |
Merge pull request #18730 from owncloud/appframework_proper_304
Properly return 304 in AppFramework
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/appframework/http/HttpTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/appframework/http/HttpTest.php b/tests/lib/appframework/http/HttpTest.php index e9be3e73904..4bcc8305db4 100644 --- a/tests/lib/appframework/http/HttpTest.php +++ b/tests/lib/appframework/http/HttpTest.php @@ -65,6 +65,14 @@ class HttpTest extends \Test\TestCase { } + public function testQuotedEtagMatchReturnsNotModified() { + $http = new Http(array('HTTP_IF_NONE_MATCH' => '"hi"')); + + $header = $http->getStatusHeader(Http::STATUS_OK, null, 'hi'); + $this->assertEquals('HTTP/1.1 304 Not Modified', $header); + } + + public function testLastModifiedMatchReturnsNotModified() { $dateTime = new \DateTime(null, new \DateTimeZone('GMT')); $dateTime->setTimestamp('12'); |