My bad!
After struggling a lot with this issue, it turns out I had a WordPress Maintenance Mode plugin enabled. As long as it allows administrators to access the website when they're logged in, the bad request/response was coming from the plugin because the server could not be reached on a 503 error status.
When Maintenance mode is disabled, the bad request/response is gone. This is the plugin's ordinary behavior, so no issues after all.