From: Rudolf Polzer Date: Wed, 17 Aug 2011 19:58:41 +0000 (+0200) Subject: fix urllib, now it actually can POST properly X-Git-Tag: xonotic-v0.5.0~126 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40597cfa61dcd0a6d06c41ae4e05bb394a24882d;p=xonotic%2Fxonotic-data.pk3dir.git fix urllib, now it actually can POST properly --- diff --git a/qcsrc/common/urllib.qc b/qcsrc/common/urllib.qc index 7a5f33347..5a24a0fc4 100644 --- a/qcsrc/common/urllib.qc +++ b/qcsrc/common/urllib.qc @@ -67,7 +67,7 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass) { entity e; float i; - if(strstrofs(url, "://", -1)) + if(strstrofs(url, "://", 0) >= 0) { switch(mode) { @@ -178,8 +178,9 @@ void url_fclose(entity e, url_ready_func rdy, entity pass) return; } } + print(ftos(i), "\n"); - if(!uri_postbuf(e.url_url, e.url_id + MIN_URL_ID, "text/plain", "\n", e.url_wbuf)) + if(!uri_postbuf(e.url_url, i + MIN_URL_ID, "text/plain", "\n", e.url_wbuf)) { buf_del(e.url_wbuf); rdy(e, pass, URL_READY_ERROR);