   end
 
   defp payload(%{headers: headers, body: iodata}) do
+    # Assume well formed message so don't handle error case
     payload_headers =
-      case content_length(headers) do
-        nil ->
+      case fetch_content_length(headers) do
+        {:ok, nil} ->
           case :erlang.iolist_size(iodata) do
             0 ->
               []

  defp decode_payload(headers) do
    case Enum.split_with(headers, fn {key, _value} -> key == "transfer-encoding" end) do
      {[{"transfer-encoding", "chunked"}], headers} ->
        {headers, true, :chunked}

      {[], headers} ->
        case content_length(headers) do
          nuffink when nuffink in [nil, 0] ->
            {headers, false, {:complete, ""}}

          bytes ->
            {headers, true, {:bytes, bytes}}
        end
    end
  end

         headers: [{"accept", "text/plain"}],
         method: :GET,
         mount: [],
         path: [],
         query: nil,
         raw_path: "/",
         scheme: :http
       }, :close, {:complete, ""}, ""}}

       iex> "GET / HTTP/1.1\r\nhost: example.com\r\nconnection: keep-alive\r\naccept: text/plain\r\n\r\n"
       ...> |> Raxx.HTTP1.parse_request(scheme: :http)
       {:ok,
        {%Raxx.Request{
