http.Client.Timeout is ignored by redirect-aware requests
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 11.3k
- Fork
- 2.5k
- Merge medio
- 1g 16h
- PR unite (30g)
- 51
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di google/go-github
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
google/go-github#4583 · 2 commenti · 1 reazione · 1 assegnatario ·
-
google/go-github#4526 · 1 commento · 1 reazione · 1 assegnatario ·
Tutte le issue di google/go-github
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
googleapis/librarian#7670 · 2 commenti ·