handle many HTTP response possibilities