+ case 416:
+ if (!quiet)
+ fprintf(stderr, "File download already fully retrieved; nothing to do.\n");
+ request_done(cl);
+ break;
+ case 206:
+ if (!cur_resume) {
+ if (!quiet)
+ fprintf(stderr, "Error: Partial content received, full content requested\n");
+ error_ret = 8;
+ request_done(cl);
+ break;
+ }
+
+ blobmsg_parse(&policy, 1, &attr, blob_data(cl->meta), blob_len(cl->meta));
+ if (!attr) {
+ if (!quiet)
+ fprintf(stderr, "Content-Range header is missing\n");
+ error_ret = 8;
+ break;
+ }
+
+ if (sscanf(blobmsg_get_string(attr), "bytes %"PRIu64"-%"PRIu64"/%"PRIu64,
+ &resume_offset, &resume_end, &resume_size) != 3) {
+ if (!quiet)
+ fprintf(stderr, "Content-Range header is invalid\n");
+ error_ret = 8;
+ break;
+ }