 
     response =
       if status_line.status_code > 100 and
-          not Map.has_key?(elem(response.headers.to, 2), "tag") do
+           not Map.has_key?(elem(response.headers.to, 2), "tag") do
         {display_name, uri, params} = response.headers.to
         params = Map.put(params, "tag", create_tag())
         response |> put_header(:to, {display_name, uri, params})

    do: [scheme, " ", do_one_per_line_value(Map.to_list(parameters), [])]

  defp do_one_per_line_value([], result), do: result
  defp do_one_per_line_value([{name, value}|tail], result) do
    do_one_per_line_value(tail, do_join([name, "=", value], result, ", "))
  end

  defp do_parameters(%{} = parameters),
    do: do_parameters(Map.to_list(parameters), [])
  defp do_parameters([], result), do: result
  defp do_parameters([{name, ""}|tail], result),
    do: do_parameters(tail, [";", name | result])
  defp do_parameters([{name, value}|tail], result),
    do: do_parameters(tail, [";", name, "=", value | result])

  defp do_join(head, [], _joiner), do: [head]

  end

  defp do_header_values([], values), do: values |> Enum.reverse()

  defp do_header_values([head | tail], values),
    do: do_header_values(tail, do_join(do_header_value(head), values, ", "))

  defp do_header_values(value, _), do: do_header_value(value)
