iron/iron — pull request #129 by SuprDewd (2014-08-11 13:46:46+00:00)
Title: (fix) Handle Request::from_http fail gracefully.

Request::from_http returns an Option. The main handle_request function calls Request::from_http, and unwraps it without checking if it failed or not. This leads to a 'task X failed at ...' in some cases (like when an HTTP 1.0 request is sent without a Host header).

I fixed this by making from_http return a Result instead of an Option to get more info about the failure, and then gracefully (at least compared to how it was) handle the failure in handle_request when it occurs.