Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.8K
Vistas
Invalid HTTP request received with Fast API

I have a React front end making requests to my Discord.py bot running FastAPI. All is well on my testing environment, but when I deploy to my remote host uvicorn complains about

    WARNING:  Invalid HTTP request received.
Traceback (most recent call last):
  File "/home/container/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
    event = self.conn.next_event()
  File "/home/container/h11/_connection.py", line 443, in next_event
    exc._reraise_as_remote_protocol_error()
  File "/home/container/h11/_util.py", line 76, in _reraise_as_remote_protocol_error
    raise self
  File "/home/container/h11/_connection.py", line 425, in next_event
    event = self._extract_next_receive_event()
  File "/home/container/h11/_connection.py", line 367, in _extract_next_receive_event
    event = self._reader(self._receive_buffer)
  File "/home/container/h11/_readers.py", line 68, in maybe_read_from_IDLE_client
    raise LocalProtocolError("illegal request line")
h11._util.RemoteProtocolError: illegal request line
2022-01-15 22:59:11,310 - Invalid HTTP request received.
Traceback (most recent call last):
  File "/home/container/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
    event = self.conn.next_event()
  File "/home/container/h11/_connection.py", line 443, in next_event
    exc._reraise_as_remote_protocol_error()
  File "/home/container/h11/_util.py", line 76, in _reraise_as_remote_protocol_error
    raise self
  File "/home/container/h11/_connection.py", line 425, in next_event
    event = self._extract_next_receive_event()
  File "/home/container/h11/_connection.py", line 367, in _extract_next_receive_event
    event = self._reader(self._receive_buffer)
  File "/home/container/h11/_readers.py", line 68, in maybe_read_from_IDLE_client
    raise LocalProtocolError("illegal request line")
h11._util.RemoteProtocolError: illegal request line

Also, if I make the request via Postman, everything works just fine again. Is this an issue with my host, or with some uvicorn config I am missing?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

change url from https to http when microservice does not support HTTPS

for ex: https://stackoverflow.com/a/66442651/10850556

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda