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:
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: This problem may be related to this recent incident:

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.