From: Rudolf Polzer Date: Fri, 28 Oct 2011 19:33:15 +0000 (+0200) Subject: handle HTTP error 422: Unprocessable Entity by NOT retrying the send to a second... X-Git-Tag: xonotic-v0.6.0~35^2~77 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4928e910e7e5bfcb086eed2922f45da492112db4;p=xonotic%2Fxonotic-data.pk3dir.git handle HTTP error 422: Unprocessable Entity by NOT retrying the send to a second receiving URL --- diff --git a/qcsrc/common/urllib.qc b/qcsrc/common/urllib.qc index 2f7d0ee3a..1bc065027 100644 --- a/qcsrc/common/urllib.qc +++ b/qcsrc/common/urllib.qc @@ -335,8 +335,16 @@ void url_fputs(entity e, string s) void url_multi_ready(entity fh, entity me, float status) { float n; - if(status == URL_READY_ERROR) + if(status == URL_READY_ERROR || status < 0) { + if(status == -422) // Unprocessable Entity + { + print("uri_multi_ready: got HTTP error 422, data is in unusable format - not continuing\n"); + me.url_ready(fh, me.url_ready_pass, status); + strunzone(me.url_url); + remove(me); + return; + } me.cnt += 1; n = tokenize_console(me.url_url); if(n <= me.cnt)