Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Account for iolist payloads, since that's what Misultin supplies

  • Loading branch information...
commit fb32ebba863770423c32a9b8e70dd458e75d0c79 1 parent 68457c3
@squaremo squaremo authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/sockjs_util.erl
View
6 src/sockjs_util.erl
@@ -35,9 +35,11 @@ eep0018(JSON, decode) -> json:decode(JSON).
jiffy(Thing, encode) ->
iolist_to_binary(jiffy:encode(Thing));
-jiffy(JSON, decode) ->
+jiffy(JSON, decode) when is_binary(JSON) ->
try jiffy:decode(JSON) of
V -> {ok, V}
catch
E -> E
- end.
+ end;
+jiffy(JSON, decode) ->
+ jiffy(iolist_to_binary(JSON), decode).
Please sign in to comment.
Something went wrong with that request. Please try again.