Skip to content

Commit

Permalink
Merge pull request #286 from wojtekmach/wm-avoid-reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
sneako committed Aug 5, 2024
2 parents 57e28a2 + 4bedff4 commit 58001fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/finch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ defmodule Finch do
{:cont, {status, headers ++ value, body, trailers}}

{:data, value}, {status, headers, body, trailers} ->
{:cont, {status, headers, [value | body], trailers}}
{:cont, {status, headers, [body | value], trailers}}

{:trailers, value}, {status, headers, body, trailers} ->
{:cont, {status, headers, body, trailers ++ value}}
Expand All @@ -495,7 +495,7 @@ defmodule Finch do
%Response{
status: status,
headers: headers,
body: body |> Enum.reverse() |> IO.iodata_to_binary(),
body: IO.iodata_to_binary(body),
trailers: trailers
}}
end
Expand Down

0 comments on commit 58001fb

Please # to comment.