No subject

bogus at does.not.exist.com bogus at does.not.exist.com
Tue Aug 25 22:50:44 CEST 2009


So one WWW-Auth can contain multile auth methods, or multiple WWW-Auth
fields can be given. Very complex... :-(.

>> > + =A0 =A0/* TODO: Quote the quoted strings properly. */
>> > + =A0 =A0av_strlcatf(authstr, len, "username=3D\"%s\"", =A0 username);
>> > + =A0 =A0av_strlcatf(authstr, len, ", realm=3D\"%s\"", =A0 =A0digest->=
realm);
>> > + =A0 =A0av_strlcatf(authstr, len, ", nonce=3D\"%s\"", =A0 =A0digest->=
nonce);
>> > + =A0 =A0av_strlcatf(authstr, len, ", uri=3D\"%s\"", =A0 =A0 =A0uri);
>> > + =A0 =A0av_strlcatf(authstr, len, ", response=3D\"%s\"", response);
>> > + =A0 =A0if (digest->algorithm[0])
>> > + =A0 =A0 =A0 =A0av_strlcatf(authstr, len, ", algorithm=3D%s", =A0dige=
st->algorithm);
>> > + =A0 =A0if (digest->opaque[0])
>> > + =A0 =A0 =A0 =A0av_strlcatf(authstr, len, ", opaque=3D\"%s\"", digest=
->opaque);
>> > + =A0 =A0if (digest->qop[0]) {
>> > + =A0 =A0 =A0 =A0av_strlcatf(authstr, len, ", qop=3D\"%s\"", =A0 =A0di=
gest->qop);
>> > + =A0 =A0 =A0 =A0av_strlcatf(authstr, len, ", cnonce=3D\"%s\"", cnonce=
);
>> > + =A0 =A0 =A0 =A0av_strlcatf(authstr, len, ", nc=3D%s", =A0 =A0 =A0 =
=A0 nc);
>>
>> Spaces cost wiredata, bad idea.
>
> Hmm, do you mean that I should skip the spaces after the commas, to shrin=
k
> the amount of data to send?

Yes, sorry for being unclear.

>> I think algo should also be quoted (not sure, it's a while since I last
>> did this)
>
> Doesn't seem so according to the RFC...

You are in fact correct. :-).

>> > + =A0 =A0 =A0 =A0if (*inptr =3D=3D '\\') {
>> > + =A0 =A0 =A0 =A0 =A0 =A0if (!inptr[1]) {
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0inptr++;
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break;
>> > + =A0 =A0 =A0 =A0 =A0 =A0}
>> > + =A0 =A0 =A0 =A0 =A0 =A0*outptr++ =3D inptr[1];
>> > + =A0 =A0 =A0 =A0 =A0 =A0inptr +=3D 2;
>> > + =A0 =A0 =A0 =A0} else {
>>
>> Hm... \n or \r?
>
> No, this handles escaped quotes (or any other escaped char) within quoted
> strings, doesn't have anything to do with newline handling.

I meant, what if the input contains \n? It'd lead to a "n" being
placed in the buffer, a bit odd... Not what you'd expect, regardless
of whether normal input contains those chars.

Ronald



More information about the ffmpeg-devel mailing list