The server was not sending the 'Content-Length' header, which caused the client to be unable to determine when to terminate the request. After the required header was sent, the issue was resolved.