[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

Jakob van Bethlehem jakob at jet-stream.nl
Wed Oct 9 17:18:16 CEST 2013


On 9 okt. 2013, at 13:50, Michael Niedermayer <michaelni at gmx.at> wrote:

> 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

Will fix. I tried breaking stuff up a bit in logical pieces, but I guess it is better to send this patches as one patch.
would 'component' in this case be libavformat or libavformat/http.c ?

Jakob

> 
> 
>> 
>> 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
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list