[FFmpeg-devel] [PATCH] Add support for digest auth in the http and rtsp protocols

Ronald S. Bultje rsbultje
Wed Mar 24 20:43:39 CET 2010


Hi,

On Wed, Mar 24, 2010 at 3:32 PM, Martin Storsj? <martin at martin.st> wrote:
> On Wed, 24 Mar 2010, Ronald S. Bultje wrote:
>> On Tue, Mar 23, 2010 at 12:36 PM, Martin Storsj? <martin at martin.st> wrote:
>> > +typedef struct {
>> > + ? ?HTTPAuthType auth_type;
>> > + ? ?HTTPAuthType best_seen_auth_type;
>> > +} HTTPAuthState;
>>
>> what's the difference between these two? Right now you're only using
>> one of them so it might be possible to remove one of the two.
>
> auth_type contains the currently chosen one - when starting to parse a set
> of http headers, best_seen_auth_type should be reset to none, so that we
> can choose the best one of the currently proposed alternatives. We can't
> use auth_type for this, since a successfully authenticated reply doesn't
> caontain any new WWW-Auth headers, and thus we'd lose the previous
> selection. And if we don't reset it to none before parsing, we wouldn't
> pick up a case where a server later would suggest a weaker one than the
> currently selected one.

Does that ever happen?

Ronald



More information about the ffmpeg-devel mailing list