HTTP 204 responses with payload produce 520 errors

204 (No Content) responses from origin web server turn into 520 errors when being proxied through Cloudflare. This only happens when the response contains a payload (one character is enough).

Current behavior:
The Cloudflare proxy responds with HTTP code 520 with a message in its body: “Web server is returning an unknown error”.

Expected behavior:
The Cloudflare proxy may forward or ignore the payload and respond normally with 204.

Example to reproduce: https://www.haus-und-grund-muenchen.de/cf-test-204-with-payload.php
This PHP script contains:

<?php http_response_code(204); echo '.'; However, the same script hosted at another domain and web server is responding fine. Both domains have very similar configuration and Caching enabled. Working example: https://pumsrvld.pumox.com/gp/with-payload.php This problem may be related to this recent incident: https://www.cloudflarestatus.com/incidents/hljt52nzcsnf

Sounds like your server could be overload, or incorrectly configured! What’s the domain name?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.