Fixes instanceof check failing during file upload if upstream code also wraps the HTTP request.