http.Client.Timeout is ignored by redirect-aware requests
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start with roundTripWithOptionalFollowRedirect and trace how redirect-aware helpers obtain and invoke the configured http.Client or transport. Reproduce the issue with a custom RoundTripper that waits on req.Context().Done() and a 10 ms client timeout. Done means the first redirect response remains inspectable while requests through WithHTTPClient or WithTimeout return at the configured deadline.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug
Requests made through the redirect-aware endpoint helpers do not honor the timeout configured on the client's http.Client.
roundTripWithOptionalFollowRedirect calls the configured transport directly. That preserves the ability to inspect 301/302 responses, but bypasses http.Client.Do, which is where http.Client.Timeout is applied. This affects helpers such as workflow log downloads, artifact downloads, archive links, and other callers of that helper when WithHTTPClient or WithTimeout is used.
Reproduction
Use a custom RoundTripper that waits for req.Context().Done() and a client timeout of 10 ms. On current master, the helper invokes the transport with the caller context and waits for the transport's full delay instead of returning a deadline error. The same request through the client's no-redirect http.Client returns context deadline exceeded at the configured timeout.
Expected behavior
Redirect-aware requests should preserve the existing no-follow behavior for the first response while honoring the configured HTTP client timeout.
- Lenguaje dominante
- Go
- Estrellas
- 11.3k
- Forks
- 2.5k
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 51
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/go-github
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Add actions policies endpoints Abierto
google/go-github#4583 · 2 comentarios · 1 reacción · 1 asignado ·
-
google/go-github#4526 · 1 comentario · 1 reacción · 1 asignado ·
Todos los issues de google/go-github
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
bug group: validation priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
codecheckers/chekhov#51 ·
-
Creating worktree from an existing remote branch with a slash in it, has unexpected behaviour Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100