Skip to content

[Bug]: A2A jsonrpc returning Content-Type: text/plain i.s.o application/json #264

@DanielvNiek

Description

@DanielvNiek

What happened?

I expect the A2A jsonrpc endpoint to return Content-Type: application/json, but its returning text/plain. This prevents Microsoft Copilot from accepting responses from it.

Relevant log output

curl -v -X POST "http://localhost:8080/a2a/invoke" -d '{"jsonrpc": "2.0","id": 123, "method": "message/send", "params": {"message": {"parts":[{"kind":"text","text": "hi"}],"contextId": "123"}}}'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Host localhost:8080 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:8080...
* Connected to localhost (::1) port 8080
> POST /a2a/invoke HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/8.7.1
> Accept: */*
> Content-Length: 138
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 138 bytes
< HTTP/1.1 200 OK
< Date: Mon, 09 Mar 2026 07:21:31 GMT
< Content-Length: 700
< Content-Type: text/plain; charset=utf-8
<
{"jsonrpc":"2.0","id":123,"result":{"kind":"task","id":"019cd178-e6a3-7e57-8913-ae1f2955de08","artifacts":[{"artifactId":"019cd178-f747-7309-8378-57d3f427d03d","parts":[{"kind":"text","text":"Hello! I am here to help you find the current time in any city around the world. Since there are no previous requests pending, please let me know which city you would like to know the time for!"}]}],"contextId":"123","history":[{"kind":"message","messageId":"","contextId":"123","parts":[{"kind":"text","text":"hi"}],"role":""}],"metadata":{"adk_app_name":"hello_time_agent","adk_session_id":"123","adk_user_id":"A2A_USER_123"},"status":{"state":"completed","timestamp":"2026-03-09T09:21:31.719226+02:00"}}}
* Connection #0 to host localhost left intact

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions