[MPlayer-dev-eng] [PATCH 7/7] Support -user and -passwd parameter with http_proxy for server_url

Clément Bœsch ubitux at gmail.com
Mon Oct 18 12:05:57 CEST 2010


The http_proxy://l:p@proxy/http://user:passwd@host/ now works, but not
http_proxy://l:p@proxy/http://host/ -user user -passwd passwd, so the
patch fixes this.
---
 stream/network.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/stream/network.c b/stream/network.c
index a571e06..d78df29 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -262,6 +262,8 @@ http_send_request( URL_t *url, off_t pos ) {
 		http_add_basic_proxy_authentication( http_hdr, url->username, url->password );
 		if (server_url->username && server_url->password)
 			http_add_basic_authentication( http_hdr, server_url->username, server_url->password );
+		else if (network_username && network_password)
+			http_add_basic_authentication( http_hdr, network_username, network_password );
 	} else {
 		http_add_basic_authentication( http_hdr, url->username, url->password );
 	}
-- 
1.7.3.1



More information about the MPlayer-dev-eng mailing list