# HG changeset patch # User alex # Date 1173188321 0 # Node ID a7abdfdb5ed7550019e0ab908cdc36da0705bc81 # Parent 54f814d6708cb8e9c4ea0f8dd14f0c069e7bcc43 handle http error codes diff -r 54f814d6708c -r a7abdfdb5ed7 http.c --- a/http.c Mon Mar 05 17:54:49 2007 +0000 +++ b/http.c Tue Mar 06 13:38:41 2007 +0000 @@ -169,6 +169,9 @@ #ifdef DEBUG printf("http_code=%d\n", s->http_code); #endif + /* error codes are 4xx and 5xx */ + if (s->http_code >= 400 && s->http_code < 600) + return -1; } else { while (*p != '\0' && *p != ':') p++;