502 Bad Gateway The server returned an invalid or incomplete response

That’s not a valid response. There is not HTTP header at all.