Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Add Content-Length properly (#59)
Browse files Browse the repository at this point in the history
* Add headers proeprly

* Bump to 1.0.3
  • Loading branch information
binarylogic committed Feb 3, 2017
1 parent 71a4cc1 commit af559fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/timber/integrations/event_plug.ex
Expand Up @@ -140,9 +140,7 @@ defmodule Timber.Integrations.EventPlug do
# to be a binary
bytes = IO.iodata_length(conn.resp_body)
status = Plug.Conn.Status.code(conn.status)
headers =
conn.resp_headers
|> Map.put("content-length", bytes)
headers = conn.resp_headers ++ [{"content-length", Integer.to_string(bytes)}]

event = HTTPServerResponseEvent.new(
headers: headers,
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Expand Up @@ -10,7 +10,7 @@ defmodule Timber.Mixfile do

@source_url "https://github.com/timberio/timber-elixir"
@homepage_url "https://github.com/timberio/timber-elixir"
@version "1.0.2"
@version "1.0.3"

# Project manifest for Mix
#
Expand Down

0 comments on commit af559fd

Please sign in to comment.