knutin / elli

Simple, robust and performant Erlang web server
MIT License
663 stars 79 forks source link

Handle connections sending http_response #70

Closed sthadka closed 11 years ago

sthadka commented 11 years ago

Certain misconfigured proxy servers send http_response packets. They typically look like

<0.19681.8077> CRASH REPORT Process <0.19681.8077> with 0 neighbours crashed with reason: 
no case clause matching {ok,{http_response,{1,1},200,<<"OK">>},
<<"Connection: Keep-Alive\r\nContent-Length: 12\r\nDate: Wed, 28 Aug 2013 19:25:52 GMT\r\n
Access-Control-Allow-Origin: *\r\nVary: Accept-Encoding\r\nContent-Type: application/json\r\n\r\n">>}
in elli_http:get_request/4 line 313

This patch handles such connections and ignores them.