REST transport ignores interceptor changes to URL-bound request fields
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start in RestTransport.getTask, where the protobuf builder is intercepted but the URL is built from taskQueryParams instead of the intercepted payload. Run the JUnit HTTP-server regression, which expects GET /tasks/changed and currently gets /tasks/original. Then check the other operations that put IDs or filters into the URL. Done means the URL follows the post-interceptor payload for GetTask and the other affected operations, with the regression passing.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
The ClientCallInterceptor.intercept contract permits returning a modified payload, but the HTTP+JSON RestTransport builds resource paths and query strings from the original method arguments rather than the post-interceptor payload. An interceptor can therefore change the task ID in the payload and still send the request to the original task.
On main 897835ef664fb5c9fc4e1f5388e88a49c93e743c, a GetTask interceptor like the following receives the protobuf request builder:
@Override
public PayloadAndHeaders intercept(String method, Object payload,
Map<String, String> headers, AgentCard card, ClientCallContext context) {
((org.a2aproject.sdk.grpc.GetTaskRequest.Builder) payload).setId("changed");
return new PayloadAndHeaders(payload, headers);
}
Call getTask(new TaskQueryParams("original"), null) with this interceptor and capture the request using a local HTTP server. Expected: GET /tasks/changed. Actual: GET /tasks/original, despite the interceptor returning the modified builder. A JUnit HTTP-server regression reproduces this as expected: </tasks/changed> but was: </tasks/original>.
RestTransport.getTask creates and intercepts a protobuf builder, but constructs the URL using taskQueryParams. Other operations that encode IDs or filters into their URL also appear to construct those from the original arguments; each should be checked rather than assuming only GetTask is affected. This can matter for interceptors that rewrite a target or apply a filter, not just logging.
For context, #1327 adds fields to the GetTask payload visible to interceptors but does not make modified fields drive the URL. I have not checked every operation's replacement-payload semantics; this report's demonstrated case is a mutation of the supplied builder.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- Java
- Estrellas
- 514
- Forks
- 200
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 53
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 a2aproject/a2a-java
-
Document 1.x is the actively supported stream, and not 0.3.xPosiblemente ocupada @Linux2010 la tomó hace 2 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
a2aproject/a2a-java#1321 ·
Los mantenedores suelen responder en 1 día
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorQuizá libre de nuevo @ravismash la tomó hace 9 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
a2aproject/a2a-java#1298 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
fix: handle blank push notification config id consistently across transportsPosiblemente ocupada @prachisinghal-1 la tomó hace 23 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
a2aproject/a2a-java#1012 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
a2aproject/a2a-java#464 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksQuizá libre de nuevo @tanish111 la tomó hace 390 días y no hay ningún pull request abierto. Abiertosample
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
a2aproject/a2a-java#375 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de a2aproject/a2a-java
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/skywalking#14239 ·
Los mantenedores suelen responder en 1 día
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Posiblemente ocupada @dbusche la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
h2database/h2database#4580 ·
Los mantenedores suelen responder en 1 día
-
vips-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Stirling-Tools/JPDFium#300 ·
Los mantenedores suelen responder en 1 día
-
hermes-queue
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Los mantenedores suelen responder en 1 día
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test changePosiblemente ocupada @totally-not-ai la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
vaadin/use-cases#452 · 1 comentario ·
Los mantenedores suelen responder en 1 día