diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-07-20 18:12:27 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-08-07 15:20:01 +0200 |
commit | e42f12c6bec41a9d6c7f0f3c67b7fd9607b7457e (patch) | |
tree | ebc30c7897ed62650f0f078f8fd4d7425c306fcf /source4/librpc | |
parent | 7b86da08ea760ac5198a9ca13a349c9536aba1a7 (diff) | |
download | samba-e42f12c6bec41a9d6c7f0f3c67b7fd9607b7457e.tar.gz |
s4:lib/http: let http_read_response_send/recv() also consume the body if it fits into a max value
We need to consume full HTTP responses from the socket during the
authentication exchanges, otherwise our HTTP parser gets out of sync for
the next requests.
This will be important for gensec mechs which use an even number
for authentication packets.
I guess this should be done just based on the Content-Length value and
not based on the response code.
So far I saw bodies with 200 and 401 codes.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_roh_channel_out.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_roh_channel_out.c b/source4/librpc/rpc/dcerpc_roh_channel_out.c index b370e564ee1..8a337ad167f 100644 --- a/source4/librpc/rpc/dcerpc_roh_channel_out.c +++ b/source4/librpc/rpc/dcerpc_roh_channel_out.c @@ -482,7 +482,8 @@ struct tevent_req *roh_recv_out_channel_response_send(TALLOC_CTX *mem_ctx, } subreq = http_read_response_send(state, ev, - roh->default_channel_out->streams.active); + roh->default_channel_out->streams.active, + 0); /* we'll get the content later */ if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } |