fetch: print error messages on http error codes
authorFelix Fietkau <nbd@openwrt.org>
Tue, 6 May 2014 12:47:38 +0000 (14:47 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 6 May 2014 12:47:38 +0000 (14:47 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-fetch.c

index 7aa60ead94d80c373d532a17593cea215189cb7e..9672e07ecb0b447ef6ef93a1daec5dcd5e1c253a 100644 (file)
@@ -120,6 +120,8 @@ static void header_done_cb(struct uclient *cl)
                break;
 
        default:
+               if (!quiet)
+                       fprintf(stderr, "HTTP error %d\n", cl->status_code);
                request_done(cl);
                error_ret = 8;
                break;