Running Keystone with WSGIChunkedRequest=On is not supported.
We have to make sure that we set the Content-Length header when getting
an admin token and checking revoked tokens, otherwise Keystone returns
a HTTP 411 error.
Same applies when checking revoked tickets.
Fixes: #11473
Backport: Hammer, Firefly
Signed-off-by: Hervé Rousseau <hroussea@cern.ch>
std::stringstream ss;
jf.flush(ss);
token_req.set_post_data(ss.str());
+ token_req.set_send_length(ss.str().length());
int ret = token_req.process("POST", token_url.c_str());
if (ret < 0)
return ret;
return -EINVAL;
url.append("v2.0/tokens/revoked");
req.append_header("X-Auth-Token", token);
+ req.set_send_length(0);
int ret = req.process(url.c_str());
if (ret < 0)
return ret;