now enforce http range request check on *sonic server as well.

This commit is contained in:
Fufu Fang 2019-10-25 09:43:10 +01:00
parent 1105f8a0ba
commit 3bd7e67041
No known key found for this signature in database
GPG Key ID: 0F6BB5EF6F8BB729
1 changed files with 4 additions and 5 deletions

View File

@ -718,13 +718,12 @@ long path_download(const char *path, char *output_buf, size_t size,
transfer_blocking(curl);
/* Check for range seek support */
if (!CONFIG.sonic_mode) {
if (!strcasestr((header.data), "Accept-Ranges: bytes")) {
fprintf(stderr, "Error: This web server does not support HTTP \
if (!strcasestr((header.data), "Accept-Ranges: bytes")) {
fprintf(stderr, "Error: This web server does not support HTTP \
range requests\n");
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
free(header.data);
long http_resp;