500 Internal Server Error is a server error, ie. the problem is on the server side, not client side. You need to check the server logs to see what the problem is.
The headers are fine. If the headers were wrong, you would get 400 Bad Request or some other 4xx error instead.