mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
Changed the proxy protocol to http_proxy.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4146 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a2cb625f19
commit
32d1e1014f
@ -63,7 +63,7 @@ asf_streaming_start( stream_t *stream ) {
|
|||||||
}
|
}
|
||||||
if( !strncasecmp( proto_s, "http", 4) ||
|
if( !strncasecmp( proto_s, "http", 4) ||
|
||||||
!strncasecmp( proto_s, "mms", 3) ||
|
!strncasecmp( proto_s, "mms", 3) ||
|
||||||
!strncasecmp( proto_s, "proxy", 5)
|
!strncasecmp( proto_s, "http_proxy", 10)
|
||||||
) {
|
) {
|
||||||
printf("Trying ASF/HTTP...\n");
|
printf("Trying ASF/HTTP...\n");
|
||||||
fd = asf_http_streaming_start( stream );
|
fd = asf_http_streaming_start( stream );
|
||||||
@ -398,7 +398,7 @@ asf_http_request(streaming_ctrl_t *streaming_ctrl) {
|
|||||||
http_set_field( http_hdr, "User-Agent: NSPlayer/4.1.0.3856" );
|
http_set_field( http_hdr, "User-Agent: NSPlayer/4.1.0.3856" );
|
||||||
|
|
||||||
// Check if we are using a proxy
|
// Check if we are using a proxy
|
||||||
if( !strcasecmp( url->protocol, "proxy" ) ) {
|
if( !strcasecmp( url->protocol, "http_proxy" ) ) {
|
||||||
server_url = url_new( (url->file)+1 );
|
server_url = url_new( (url->file)+1 );
|
||||||
if( server_url==NULL ) {
|
if( server_url==NULL ) {
|
||||||
printf("Invalid proxy URL\n");
|
printf("Invalid proxy URL\n");
|
||||||
@ -561,7 +561,7 @@ asf_http_streaming_start( stream_t *stream ) {
|
|||||||
done = 1;
|
done = 1;
|
||||||
if( fd>0 ) close( fd );
|
if( fd>0 ) close( fd );
|
||||||
|
|
||||||
if( !strcasecmp( url->protocol, "proxy" ) ) {
|
if( !strcasecmp( url->protocol, "http_proxy" ) ) {
|
||||||
if( url->port==0 ) url->port = 8080;
|
if( url->port==0 ) url->port = 8080;
|
||||||
} else {
|
} else {
|
||||||
if( url->port==0 ) url->port = 80;
|
if( url->port==0 ) url->port = 80;
|
||||||
|
@ -184,7 +184,7 @@ http_send_request( URL_t *url ) {
|
|||||||
|
|
||||||
http_hdr = http_new_header();
|
http_hdr = http_new_header();
|
||||||
|
|
||||||
if( !strcasecmp(url->protocol, "proxy") ) {
|
if( !strcasecmp(url->protocol, "http_proxy") ) {
|
||||||
proxy = 1;
|
proxy = 1;
|
||||||
server_url = url_new( (url->file)+1 );
|
server_url = url_new( (url->file)+1 );
|
||||||
http_set_uri( http_hdr, server_url->url );
|
http_set_uri( http_hdr, server_url->url );
|
||||||
@ -325,7 +325,7 @@ extension=NULL;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HTTP based protocol
|
// HTTP based protocol
|
||||||
if( !strcasecmp(url->protocol, "http") || !strcasecmp(url->protocol, "proxy") ) {
|
if( !strcasecmp(url->protocol, "http") || !strcasecmp(url->protocol, "http_proxy") ) {
|
||||||
//if( url->port==0 ) url->port = 80;
|
//if( url->port==0 ) url->port = 80;
|
||||||
|
|
||||||
fd = http_send_request( url );
|
fd = http_send_request( url );
|
||||||
|
Loading…
Reference in New Issue
Block a user