CONNECT, Upgrade, and HTTP/2 bi-directional streaming.

Abierto
#436 9 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
api, networking

Línea de trabajo

El issue propone una API de transporte de bajo nivel que cubra CONNECT, HTTP Upgrade y el streaming bidireccional de HTTP/2, pero no indica archivos, pruebas ni puntos de entrada. Empieza revisando la API de transporte existente y el issue relacionado de WebSockets (#304); después, identifica los casos de uso y resuelve cómo deben exponer distintas interfaces de stream las respuestas CONNECT aceptadas y rechazadas. Se considerará terminado cuando haya un diseño de API acordado, junto con una implementación y pruebas para los protocolos descritos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Originally opened by @tomchristie on 2020-08-08 11:29:35 in encode/httpx

At some point we ought to consider a low-level Transport API for exposing the functionality offered by the HTTP CONNECT method, the HTTP Upgrade header, and HTTP/2's bi-directional streaming. (Eg. as used by gRPC)

All there of these essentially offer the same thing - a means of obtaining a raw connection over HTTP.
The connection itself might either be the actual TCP connection (HTTP/1.1) or just a single stream (HTTP/2), but this should be ~transparent to the user, except for the fact that we might want to expose some functionality such as "now start TLS on this connection" that is only appropriate in the HTTP/1.1 case.

One thing that's potentially a bit fiddly about the API, is that the connect request can either be accepted or rejected, and we've got different kinds of stream interfaces we want to expose in each case. (Ie if it's rejected, then we want to return a regular byte stream representing the HTTP response, otherwise we want to return some kind of Connection interface.)

This issue is related to WebSockets support (which uses the HTTP Upgrade mechanism), but I think we want to provide a dedicated API for that use case, rather than building our websockets support on top of a low level connect mechanism.

Would be useful to hear from any folks with use cases in this area.

Lenguaje dominante
Python
Estrellas
1.6k
Forks
103
Merge medio
1 d 19 h
PR fusionados (30 d)
25

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pydantic/httpx2

Todos los issues de pydantic/httpx2

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.