NET::ERR_INVALID_HTTP_RESPONSE — Chrome received a response from server that does not parse as valid HTTP. Causes: Content-Length does not match body size, invalid headers (pseudo-headers in HTTP/1.1), reverse proxy cuts stream mid-response, backend application crashed mid-write.
Below: causes, fixes, FAQ.
Free online tool — HTTP header checker: instant results, no signup.
curl -v http://127.0.0.1:8080/ (bypass nginx)proxy_read_timeout 60s;The NET::ERR_INVALID_HTTP_RESPONSE error indicates that the browser received an invalid HTTP response from the server. This can occur due to issues such as misconfigured server settings, network problems, or corrupted cache. To resolve it, check server configurations, inspect your firewall settings, and clear your browser’s cache. Ensure that your server is correctly responding to HTTP requests with valid status codes.
The NET::ERR_INVALID_HTTP_RESPONSE error can arise from various factors, including:
To troubleshoot, it is essential to pinpoint the exact cause. Start by checking server logs for any errors or warnings that may indicate misconfigurations. Use tools like cURL or Postman to manually send requests to your server and inspect the raw HTTP response.
Resolving the NET::ERR_INVALID_HTTP_RESPONSE error involves a systematic approach to identify and fix the underlying issues. Here are practical steps to follow:
curl -I http://yourdomain.comThis command retrieves the HTTP headers, allowing you to verify the response status code. Look for valid codes like 200 OK. If you see 4xx or 5xx codes, further investigation is required.
httpd.conf or .htaccess files for any misconfigurations. For instance, verify that the AllowOverride directive is set correctly to allow custom rules.iptables command to check current rules:sudo iptables -L -n -vBy following these steps, you should be able to identify and resolve the NET::ERR_INVALID_HTTP_RESPONSE error efficiently. If the problem continues, consider consulting server documentation or reaching out to your hosting provider for further assistance.
curl -v to the site → shows partial response + error. Compare with browser dev tools Network tab.
PHP outputs content, but echo between header() calls flushes buffer — headers already sent. Use output buffering: ob_start() + ob_end_flush().
Legacy app servers (IIS, Node cluster bugs) can send invalid chunks. Workaround: force Transfer-Encoding off with explicit Content-Length.
Enterno HTTP checker detects 502/partial responses. Scheduled monitor alerts on first fail.
Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.