mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
Added the Host field in the HTTP request.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3586 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1db88fbdcb
commit
2f6396e310
@ -154,9 +154,12 @@ connect2Server(char *host, int port) {
|
||||
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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user