Apply changes from https://github.com/runningskull/reqwest/commit/18e9eaf8d18278508d1598b31d4088a0b63c8b15