igrigorik/em-http-request — Issue #150: HttpResponseHeader#http_reason ignores provided reason string
Author: paulbellamy
Created: 2011-10-31 15:38:12+00:00
State: open

EM-Http-Request says the http reason is 'unknown' even if the response provides a specific reason.

For example, if the response says it is '422 Unprocessable Entity', the reason is still shown as 'unknown', even though the HTTP response included a reason.

At first pass looks like the http_parser gem doesn't return the provided reason back to em-http-request, which sucks. Not sure what the best fix for this is.

I realize that 422 is listed as 'unknown' because it is not in lib/em-http/http_status_codes.rb (which is one issue), but if the HTTP response provides it, em-http-request should be able to fallback to that.