summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/App.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index 5a9fb0c64fc..6185a35d1d7 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -157,7 +157,15 @@ class App {
* https://tools.ietf.org/html/rfc7230#section-3.3
* https://tools.ietf.org/html/rfc7230#section-3.3.2
*/
- if ($httpHeaders !== Http::STATUS_NO_CONTENT && $httpHeaders !== Http::STATUS_NOT_MODIFIED) {
+ $emptyResponse = false;
+ if (preg_match('/^HTTP\/\d\.\d (\d{3}) .*$/', $httpHeaders, $matches)) {
+ $status = (int)$matches[1];
+ if ($status === Http::STATUS_NO_CONTENT || $status === Http::STATUS_NOT_MODIFIED) {
+ $emptyResponse = true;
+ }
+ }
+
+ if (!$emptyResponse) {
if ($response instanceof ICallbackResponse) {
$response->callback($io);
} else if (!is_null($output)) {