This commit is contained in:
Michael Klishin 2015-09-17 01:25:36 +03:00
parent d3e97cdff0
commit 75d18d2eab
1 changed files with 2 additions and 5 deletions

View File

@ -239,11 +239,8 @@ serialize_header({K, V}) when is_integer(V) -> hdr(escape(K), integer_to_list(V)
serialize_header({K, V}) when is_boolean(V) -> hdr(escape(K), boolean_to_list(V));
serialize_header({K, V}) when is_list(V) -> hdr(escape(K), escape(V)).
boolean_to_list(V) when is_boolean(V) ->
case V of
true -> "true";
_ -> "false"
end.
boolean_to_list(true) -> "true";
boolean_to_list(_) -> "false".
hdr(K, V) -> [K, ?COLON, V, ?LF].