Fixes from upstream

Needed to treat all http status codes starting with 2xx as success.