libcli/http: Optimise reading for content-length
authorNoel Power <noel.power@suse.com>
Fri, 22 Mar 2024 08:55:49 +0000 (08:55 +0000)
committerJule Anger <janger@samba.org>
Thu, 11 Apr 2024 09:42:10 +0000 (09:42 +0000)
commita05d96e4b967e26c92b1f175a1e9d11b54b339c7
treee9a3b81f6ba1d2e228313ebbf2d4d3ca437c1a55
parentc27ad381b393a437fd241405f7156997d343650c
libcli/http: Optimise reading for content-length

Instead of reading byte-by-byte we know the content length we
want to read so lets use it.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15611
(cherry picked from commit 5f03d84e3b52bf5a31a0f885cb83bdcb48ec96f7)
libcli/http/http.c