~ft/gemnine

7eb61c82c8f04b7f4a93ecbed287b48b51583620 — Sigrid Solveig Haflínudóttir 4 months ago a811d49
differentiate between network errors and error responses
1 files changed, 4 insertions(+), 1 deletions(-)

M main.c
M main.c => main.c +4 -1
@@ 125,7 125,10 @@ nextreq:
			if(wait)
				close(open("/dev/text", OWRITE|OTRUNC));
			if(r->code < 20 || r->code >= 30){
				fprint(2, "%U: %d %s\n", url, r->code, r->meta[0] ? r->meta : r->status);
				if(r->code > 0)
					fprint(2, "%U: %d %s\n", url, r->code, (r->meta && r->meta[0]) ? r->meta : r->status);
				else
					fprint(2, "%U: %r\n", url);
				if(!wait)
					exits("failed");
			}else{