Fix 'HTTPRequestException' object has no attribute 'req' #4866