"bytes $from-$to/$document_size" */
| 914 | |
| 915 | /* "bytes $from-$to/$document_size" */ |
| 916 | static void parse_content_range(URLContext *h, const char *p) |
| 917 | { |
| 918 | HTTPContext *s = h->priv_data; |
| 919 | const char *slash, *end; |
| 920 | |
| 921 | if (!strncmp(p, "bytes ", 6)) { |
| 922 | p += 6; |
| 923 | s->off = strtoull(p, NULL, 10); |
| 924 | if ((end = strchr(p, '-')) && strlen(end) > 0) |
| 925 | s->range_end = strtoull(end + 1, NULL, 10) + 1; |
| 926 | if ((slash = strchr(p, '/')) && strlen(slash) > 0) |
| 927 | s->filesize_from_content_range = strtoull(slash + 1, NULL, 10); |
| 928 | } |
| 929 | if (s->seekable == -1 && (!s->is_akamai || s->filesize != 2147483647)) |
| 930 | h->is_streamed = 0; /* we _can_ in fact seek */ |
| 931 | } |
| 932 | |
| 933 | static int parse_content_encoding(URLContext *h, const char *p) |
| 934 | { |