handle empty bodied response

Sometimes the response body doesn't contain anything, handle this error
condition by retrying, and remaining within the constraints of the
timeout.
Manually merged PR from ephur. GitHub #237