Backoport fix for FakeHTTPClient

Change-Id: I92073985441a3d1723440eeaee4c9d3c41f1bb3c
Fixes: bug #1184827