       ...> |> Raxx.HTTP1.parse_request(:http)
       {:more, "GET /path?qs HTTP/1.1\\r\\nhost: exa"}
 
+      # Missing host header
+      iex> "GET /path?qs HTTP/1.1\\r\\naccept: text/plain\\r\\n\\r\\n"
+      ...> |> Raxx.HTTP1.parse_request(:http)
+      {:error, :no_host_header}
+
+      # Invalid start line
+      iex> "!!!BAD_REQUEST_LINE\\r\\n"
+      ...> |> Raxx.HTTP1.parse_request(:http)
+      {:error, {:invalid_line, "!!!BAD_REQUEST_LINE\\r\\n"}}
+
+      # Invalid header line
+      iex> "GET / HTTP/1.1\\r\\n!!!BAD_HEADER\\r\\n\\r\\n"
+      ...> |> Raxx.HTTP1.parse_request(:http)
+      {:error, {:invalid_line, "!!!BAD_HEADER\\r\\n"}}
+
   """
   def parse_request(buffer, scheme) when is_atom(scheme) do
     case :erlang.decode_packet(:http_bin, buffer, []) do


      {:ok, {:http_header, _, key, _, value}, rest} ->
        parse_headers(rest, [{String.downcase("#{key}"), value} | headers])

      {:more, :undefined} ->
        {:more, :undefined}

    {payload_headers, body} = payload(response)
    connection_headers = connection_headers(Keyword.get(options, :connection))
    headers = connection_headers ++ payload_headers ++ response.headers
    head = [status_line(response), header_lines(headers), @crlf]
    {head, body}
  end

