Return empty binary for 304 (#9800)

This commit is contained in:
Yoshiyuki Kurauchi 2021-06-19 11:50:28 +09:00 committed by GitHub
parent 73350073b2
commit 513e242a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,5 +244,7 @@ validate_headers(_, Req) -> {true, Req}.
prepare_body(204, Body) when map_size(Body) == 0; length(Body) == 0 ->
<<>>;
prepare_body(304, Body) when map_size(Body) == 0; length(Body) == 0 ->
<<>>;
prepare_body(_Code, Body) ->
jsx:encode(Body).