Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

http.Client.Timeout is ignored by redirect-aware requests

Aperta
#4,584 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/go-github

Tutte le issue di google/go-github

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.