removed cache breaking behavior

pull/630/head
n0nag0n 3 days ago
parent f4115927fb
commit 2c9b02ec28

@ -212,7 +212,7 @@ class Request
} }
} }
// Check PUT, PATCH, DELETE for application/x-www-form-urlencoded data // Check PUT, PATCH, DELETE for application/x-www-form-urlencoded data
} else if (in_array($this->method, [ 'PUT', 'DELETE', 'PATCH' ], true) === true) { } elseif (in_array($this->method, [ 'PUT', 'DELETE', 'PATCH' ], true) === true) {
$body = $this->getBody(); $body = $this->getBody();
if ($body !== '') { if ($body !== '') {
$data = []; $data = [];

@ -432,11 +432,6 @@ class Response
} }
if ($this->headersSent() === false) { if ($this->headersSent() === false) {
// If you haven't set a Cache-Control header, we'll assume you don't want caching
if ($this->getHeader('Cache-Control') === null) {
$this->cache(false);
}
$this->sendHeaders(); $this->sendHeaders();
} }

@ -268,9 +268,6 @@ class ResponseTest extends TestCase
'HTTP/1.1 200 OK', 'HTTP/1.1 200 OK',
'Content-Type: text/html', 'Content-Type: text/html',
'X-Test: test', 'X-Test: test',
'Expires: Mon, 26 Jul 1997 05:00:00 GMT',
'Cache-Control: no-store, no-cache, must-revalidate, max-age=0',
'Pragma: no-cache',
'Content-Length: 9' 'Content-Length: 9'
], $sent_headers); ], $sent_headers);
} }

Loading…
Cancel
Save