Add http response header so that the connection will be close after each Http request.

Without setting the Http Response Header(CONTET-LENGTH) the http request will not be close so other requests cannot be processed.
Also,  JavaScript function XMLHttpRequest might generate a CORS ERROR Without the Header(ACCESS_CONTROL_ALLOW_ORIGIN).

Thanks.