[MPlayer-dev-eng] [PATCH 3/7] Use authorization field to pass server authentication through proxy

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Nov 18 22:32:50 CET 2010


On Thu, Nov 18, 2010 at 09:34:24PM +0100, Clément Bœsch wrote:
> diff --git a/stream/network.c b/stream/network.c
> index 02ddcc8..6b7117c 100644
> --- a/stream/network.c
> +++ b/stream/network.c
> @@ -209,7 +209,12 @@ http_send_request( URL_t *url, off_t pos ) {
>  			mp_msg(MSGT_NETWORK, MSGL_ERR, "Invalid URL '%s' to proxify\n", url->file+1);
>  			goto err_out;
>  		}
> -		http_set_uri( http_hdr, server_url->url );
> +		snprintf(str, sizeof(str), "%s://%s:%d%s",
> +				server_url->protocol,
> +				server_url->hostname,
> +				server_url->port ? server_url->port : 80,
> +				server_url->file);
> +		http_set_uri(http_hdr, str);

What's your opinion on removing user/password from ->url in
url_new instead?
I think it is quite ugly, but I guess I am fine with it if
you think it's the best solution.
I do feel a bit uncomfortable about using fixed-size, on-stack
destination, URLs can get quite gigantic...


More information about the MPlayer-dev-eng mailing list