Follow-up to HTTPCLIENT-1276 Contributed by Francois-Xavier Bonnet <francois-xavier.bonnet at centraliens.net>