[FFmpeg-devel] [PATCH 1/3] Introduce auth_phase flag, which will be true if authorization needs to be sent, but the type of authorization is not known yet Partial fix #3036

Michael Niedermayer michaelni at gmx.at
Wed Oct 9 13:50:25 CEST 2013


On Wed, Oct 09, 2013 at 10:25:32AM +0200, Jakob van Bethlehem wrote:
> From: "J. van Bethlehem" <jakob at jet-stream.nl>
> 

the format of git commit messages is
<component name>: short one line description

longer description


> 
> Signed-off-by: J. van Bethlehem <jakob at jet-stream.nl>
> ---
>  libavformat/http.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/http.c b/libavformat/http.c
> index 1b21e47..5f016a7 100644
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -574,7 +574,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
>                          const char *proxyauth, int *new_location)
>  {
>      HTTPContext *s = h->priv_data;
> -    int post, err;
> +    int post, err, auth_phase;
>      char headers[4096] = "";
>      char *authstr = NULL, *proxyauthstr = NULL;
>      int64_t off = s->off;
> @@ -593,6 +593,13 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
>      }
>  
>      method = post ? "POST" : "GET";
> +
> +    /* If auth is non-NULL, yet auth_state.auth_type is HTTP_AUTH_NONE,
> +     * we have not yet sent any HTTP requests. In particular any
> +     * POST requests need to be postponed until auth_type has
> +     * been set to the right value
> +     */
> +    auth_phase = auth && s->auth_state.auth_type == HTTP_AUTH_NONE && s->http_code != 401;

this patch is not a self contained change, it introduces a never read
variable

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131009/5c8d93bb/attachment.asc>


More information about the ffmpeg-devel mailing list