Simplify
This commit is contained in:
parent
d3e97cdff0
commit
75d18d2eab
|
|
@ -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].
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue