diff --git a/lib/plug_require_header.ex b/lib/plug_require_header.ex index 637bb86..dabb924 100644 --- a/lib/plug_require_header.ex +++ b/lib/plug_require_header.ex @@ -97,7 +97,7 @@ defmodule PlugRequireHeader do conn else conn - |> put_resp_header("Content-Type", content_type_for(format)) + |> put_resp_header("content-type", content_type_for(format)) |> send_resp(status, format_message(message, format)) |> halt end diff --git a/test/plug_require_header_test.exs b/test/plug_require_header_test.exs index c8bde55..4eaf769 100644 --- a/test/plug_require_header_test.exs +++ b/test/plug_require_header_test.exs @@ -103,6 +103,6 @@ defmodule PlugRequireHeaderTest do end defp content_type(response) do - hd get_resp_header(response, "Content-Type") + hd get_resp_header(response, "content-type") end end