From f807926f5e06f03c26afc0217f4af9864bf24a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 8 Oct 2014 16:05:27 +0200 Subject: report a permanent error instead of aborting on unknown error codes fixes #479 --- common/http_request_baton_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/http_request_baton_cocoa.mm b/common/http_request_baton_cocoa.mm index 623b2311be..a9992fad8c 100644 --- a/common/http_request_baton_cocoa.mm +++ b/common/http_request_baton_cocoa.mm @@ -103,7 +103,7 @@ void HTTPRequestBaton::start(const util::ptr &ptr) { } else if (code == 200) { baton->type = HTTPResponseType::Successful; } else { - assert(!"code must be either 200 or 304"); + baton->type = HTTPResponseType::PermanentError; } NSDictionary *headers = [(NSHTTPURLResponse *)res allHeaderFields]; -- cgit v1.2.1