Add content-type to ERROR frames.

This commit is contained in:
Tony Garnock-Jones 2009-01-29 14:09:16 +00:00
parent 28d74ac382
commit edba0d0732
1 changed files with 2 additions and 1 deletions

View File

@ -276,7 +276,8 @@ send_frame(Command, Headers, Body, State) ->
send_error(Message, Detail, State) ->
error_logger:error_msg("STOMP error frame sent:~nMessage: ~p~nDetail: ~p~n",
[Message, Detail]),
send_frame("ERROR", [{"message", Message}], Detail, State).
send_frame("ERROR", [{"message", Message},
{"content-type", "text/plain"}], Detail, State).
send_error(Message, Format, Args, State) ->
send_error(Message, lists:flatten(io_lib:format(Format, Args)), State).