fix: ensure Content-Lenght is set in HTTP response to the browser to prevent unreliable chunked transfer