[Bug] Redirects not being followed
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start by comparing the redirect handling around commit d9180bb and the client options used by GraphClientFactory.create_with_default_middleware. Reproduce the Microsoft Graph driveItem content request, trace why the 302 Location response is not followed despite RedirectHandlerOption, and verify that redirects are followed again with a regression test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A bug has been introduced in version 1.13.0 of microsoft-kiota-http: redirects aren't being followed correctly.
For example, to download a driveItem from the MS Graph API (docs link) you make a call to /drives/{drive-id}/items/{item-id}/content and get back an empty 302 Found response with the Location header set to the actual download URL.
The below is an extract of the httpx logs from version 1.13.0. You can see the Location header is successfully returned, but no redirect is made.
DEBUG [2026-09-21 08:53:37] httpcore.http11 - send_request_headers.started request=<Request [b'GET']>
DEBUG [2026-09-21 08:53:37] httpcore.http11 - send_request_headers.complete
DEBUG [2026-09-21 08:53:37] httpcore.http11 - send_request_body.started request=<Request [b'GET']>
DEBUG [2026-09-21 08:53:37] httpcore.http11 - send_request_body.complete
DEBUG [2026-09-21 08:53:37] httpcore.http11 - receive_response_headers.started request=<Request [b'GET']>
DEBUG [2026-09-21 08:53:37] httpcore.http11 - receive_response_headers.complete return_value=(b'HTTP/1.1', 302, b'Found', [(b'Cache-Control', b'no-store, no-cache'), (b'Content-Type', b'application/octet-stream'), (b'Location', b'<link to the download location>'), (b'Strict-Transport-Security', b'max-age=31536000'), (b'request-id', b'44de6ff3-71fc-42e6-ad10-9670be4fcb0d'), (b'client-request-id', b'44de6ff3-71fc-42e6-ad10-9670be4fcb0d'), (b'x-ms-ags-diagnostic', b'{"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"DU2PEPF000107E5"}}'), (b'SPLogId', b'89553da2-e00b-3001-531f-268400ba5220'), (b'Date', b'Mon, 21 Sep 2026 08:53:37 GMT'), (b'Content-Length', b'0')])
INFO [2026-09-21 08:53:37] httpx - HTTP Request: GET https://graph.microsoft.com/v1.0//drives/<drive-id/items/<item-id>/content "HTTP/1.1 302 Found"
DEBUG [2026-09-21 08:53:37] httpcore.http11 - receive_response_body.started request=<Request [b'GET']>
DEBUG [2026-09-21 08:53:37] httpcore.http11 - receive_response_body.complete
DEBUG [2026-09-21 08:53:37] httpcore.http11 - response_closed.started
DEBUG [2026-09-21 08:53:37] httpcore.http11 - response_closed.complete
<END OF LOGS>
Even explicit setting the direct option when creating the various clients has no impact. i.e. if I do the following before making the call, the same error occurs.
auth_provider = AzureIdentityAuthenticationProvider(...)
client = GraphClientFactory.create_with_default_middleware(options=graph_request_adapter.options | {kioo.RedirectHandlerOption.get_key(): kioo.RedirectHandlerOption(should_redirect=True)})
adapter = msg.graph_request_adapter.GraphRequestAdapter(auth_provider, client=client)
ctx = msg.graph_service_client.GraphServiceClient(request_adapter=adapter)
...
I think this issue was caused by commit d9180bb. Tagging @rksharma-owg for visibility.
- Lenguaje dominante
- Python
- Estrellas
- 31
- Forks
- 39
- Merge medio
- 16 h 37 min
- PR fusionados (30 d)
- 42
Preparar el entorno
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 microsoft/kiota-python
-
help wanted type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/kiota-python#477 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
microsoft/kiota-python#745 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
microsoft/kiota-python#737 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
microsoft/kiota-python#722 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
httpx python library issuesAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
microsoft/kiota-python#533 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/kiota-python
Issues similares
-
deployment release-lag
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nolte/kamerplanter#2047 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-plugin-claude-subscription-directsdk#94 ·
Los mantenedores suelen responder en 1 día
-
Claiming namespace `reactogenic`Abiertonamespace operations
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
EclipseFdn/open-vsx.org#13702 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día