Permalink
Browse files

Account for returning a #delayed_resp{}

After the patch last week we're holding onto #delayed_resp{} records
longer. This unwraps the #mochiweb_response{} if we get one back from
the request handler.
  • Loading branch information...
1 parent 0c4b403 commit 6abe8e625304b46f5db9f2a46cb5470ee0f17b46 @davisp davisp committed with Robert Newson Oct 5, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/chttpd.erl
View
@@ -241,6 +241,8 @@ handle_request(MochiReq) ->
RequestTime = timer:now_diff(now(), Begin)/1000,
{Status, Code} = case Result of
+ {ok, #delayed_resp{resp=Resp}} ->
+ {ok, Resp:get(code)};
{ok, Resp} ->
{ok, Resp:get(code)};
{aborted, Resp, _} ->

0 comments on commit 6abe8e6

Please sign in to comment.