# HG changeset patch # User reimar # Date 1262278073 0 # Node ID e0d36dce5d85a020d2d388148882d1f4b2532486 # Parent 31b7d4637b50f95e4339138eb9f2e1b72f91afd2 Make code slightly more readable. diff -r 31b7d4637b50 -r e0d36dce5d85 stream/http.c --- a/stream/http.c Thu Dec 31 16:46:44 2009 +0000 +++ b/stream/http.c Thu Dec 31 16:47:53 2009 +0000 @@ -767,9 +767,9 @@ // Check if we can make partial content requests and thus seek in http-streams if( http_hdr!=NULL && http_hdr->status_code==200 ) { - char *accept_ranges; + const char *accept_ranges = http_get_field(http_hdr,"Accept-Ranges"); const char *server = http_get_field(http_hdr, "Server"); - if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL ) + if (accept_ranges) seekable = strncmp(accept_ranges,"bytes",5)==0; else if (server && strcmp(server, "gvs 1.0") == 0) seekable = 1; // HACK for youtube incorrectly claiming not to support seeking