You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a client send a get query with a body using chunked transfer encoding, linkerd-proxy forward the query without using chunk and without content-length header.
The backend server wants a body but does not see it as there is no content-length header.
How can it be reproduced?
We can forge query with curl :
# curl -H'Conten0/_mget -d '{"docs": [{"_id": "foo", "_index": "bar"]}' -vGET http://10.3.56.59:9200
* Trying 10.3.56.59...
* TCP_NODELAY set
* Connected to 10.3.56.59 (10.3.56.59) port 9200 (#0)
> GET /_mget HTTP/1.1
> Host: 10.3.56.59:9200
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Transfer-Encoding: chunked
>
> 2a
* upload completely sent off: 49 out of 42 bytes
< HTTP/1.1 400 Bad Request
< content-type: application/json; charset=UTF-8
< content-length: 203
< date: Thu, 22 Aug 2019 08:04:36 GMT
<
* Curl_http_done: called premature == 0
* Connection #0 to host 10.3.56.59 left intact
{"error":{"root_cause":[{"type":"parse_exception","reason":"request body or source parameter is required"}],"type":"parse_exception","reason":"request body or source parameter is required"},"status":400}
Bug Report
What is the issue?
When a client send a get query with a body using chunked transfer encoding, linkerd-proxy forward the query without using chunk and without content-length header.
The backend server wants a body but does not see it as there is no content-length header.
How can it be reproduced?
We can forge query with curl :
Logs, error output, etc
A capture using linkerd-debug container
Before the proxy :
After the proxy :
Environment
The text was updated successfully, but these errors were encountered: