replace content length header with user agent
return error if HTTP status codes are greater than 400