Permalink
Browse files

Bug fix: we were ignoring/incorrectly passing the response headers to…

… Yaws.
  • Loading branch information...
1 parent 9990774 commit 98bf70337107250e24876180534dcf0fd7493265 @davide davide committed Nov 9, 2009
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/server_gateways/ewgi_yaws.erl
@@ -68,13 +68,19 @@ handle_result(Ctx, Socket) ->
case ewgi_api:response_message_body(Ctx) of
PushStream when is_pid(PushStream) ->
PushStream ! {push_stream_data, ?MODULE, Socket},
- [{status, Code}, {streamcontent_from_pid, ContentType, PushStream}];
+ [{status, Code},
+ {allheaders, Acc},
+ {streamcontent_from_pid, ContentType, PushStream}];
Generator when is_function(Generator, 0) ->
YawsPid = self(),
spawn(fun() -> handle_stream(Generator, YawsPid) end),
- [{status, Code}, {streamcontent_with_timeout, ContentType, <<>>, infinity}];
+ [{status, Code},
+ {allheaders, Acc},
+ {streamcontent_with_timeout, ContentType, <<>>, infinity}];
Body ->
- [{status, Code}, {content, ContentType, Body}|Acc]
+ [{status, Code},
+ {allheaders, Acc},
+ {content, ContentType, Body}]
end.
get_yaws_headers(H) ->

0 comments on commit 98bf703

Please sign in to comment.