# HG changeset patch # User bertrand # Date 1008701100 0 # Node ID cb985ea11ed556647582012f617345959937172b # Parent 7c4046c04be39ec004361ada090075055b3d50fa Added the Host field in the HTTP request. diff -r 7c4046c04be3 -r cb985ea11ed5 libmpdemux/network.c --- a/libmpdemux/network.c Tue Dec 18 17:29:27 2001 +0000 +++ b/libmpdemux/network.c Tue Dec 18 18:45:00 2001 +0000 @@ -154,9 +154,12 @@ int http_send_request( URL_t *url ) { HTTP_header_t *http_hdr; + char str[80]; int fd; http_hdr = http_new_header(); http_set_uri( http_hdr, url->file ); + snprintf(str, 80, "Host: %s", url->hostname ); + http_set_field( http_hdr, str); http_set_field( http_hdr, "User-Agent: MPlayer"); http_set_field( http_hdr, "Connection: closed"); if( http_build_request( http_hdr )==NULL ) {