comparison stream/http.c @ 30103:f7af93ece976

Add a hack for broken youtube servers not returning Accept-Ranges.
author reimar
date Wed, 30 Dec 2009 20:50:03 +0000
parents 4f740437ed2b
children 31b7d4637b50
comparison
equal deleted inserted replaced
30102:9b479e2f365d 30103:f7af93ece976
768 // Check if we can make partial content requests and thus seek in http-streams 768 // Check if we can make partial content requests and thus seek in http-streams
769 if( http_hdr!=NULL && http_hdr->status_code==200 ) { 769 if( http_hdr!=NULL && http_hdr->status_code==200 ) {
770 char *accept_ranges; 770 char *accept_ranges;
771 if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL ) 771 if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
772 seekable = strncmp(accept_ranges,"bytes",5)==0; 772 seekable = strncmp(accept_ranges,"bytes",5)==0;
773 else if (strcmp(http_get_field(http_hdr, "Server"), "gvs 1.0") == 0)
774 seekable = 1; // HACK for youtube incorrectly claiming not to support seeking
773 } 775 }
774 776
775 print_icy_metadata(http_hdr); 777 print_icy_metadata(http_hdr);
776 778
777 // Check if the response is an ICY status_code reason_phrase 779 // Check if the response is an ICY status_code reason_phrase