ASP.NET Core 2.1 Invalid Request Line Issue

It looks like you're hitting an HTTP endpoint over HTTPS.


Turns out it was an issue with the docker host (debian) and hanging sockets (netstat showing a lot of TIME_WAITs). Changed the app port to a different one and the malformed requests stopped.

A reboot or restart of the docker daemon would probably also fix it, but the uptime of our other containers is vital so we weren't able to test that.


I had same problem and in my case solution was in nginx configuration - I had proxy_pass set to https://localhost:4000 instead of http://localhost:4000