[MPlayer-dev-eng] http stream basic auth base64_encode() fix

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Tue Feb 28 20:48:25 CET 2006


On Tuesday, 28 February 2006 at 19:15, Jeff D'Angelo wrote:
> On Tue, 28 Feb 2006, Dominik 'Rathann' Mierzejewski wrote:
> 
> > On Tuesday, 28 February 2006 at 18:15, Jeff D'Angelo wrote:
> > > So that it conforms to RFC 2045:
> > >
> > > <http://jeffdangelo.org/patches/>
> > > MPlayer-1.0pre7try2.http_basic_auth_base64_encode.patch
> > > MPlayer-cvs-main-20060228.http_basic_auth_base64_encode.patch
> > >
> > > The two patch files are the same patch, but diffed against each of
> > > MPlayer-1.0pre7try2 and today's main CVS copy, libmpdemux/http.c version
> > > 1.34; both work equally well with the line offsets.  These were done diff
> > > -r -u, let me know if you prefer -c format.
> >
> > We prefer -u, thanks.
> >
[...]
> Password was so chosen, so that:
> 
> a) total number of characters (username, ':', password) % 3 = 1, thus
>    the basic auth base64 encoding would end in two '=' chars
> 
> b) '?' and '>' chars were placed at end of base64 encode input
>    octet tripplets so that I could demonstrate the '+' and '/'
>    characters in the encoding
> 
> Let me know when you are done testing.

I can confirm that with this patch, authentication does indeed work with
that server, while it doesn't without it.

However, using http://user:pass@url/ syntax still doesn't work. Could you
look at that, while you're at it?

I've checked the relevant RFC and it looks like your patch is correct.

I'd say it's good to commit as long as you remove your name from the
comments. Don't worry about attribution, it'll go into the CVS log.

And since this fixes half of http://bugzilla.mplayerhq.hu/show_bug.cgi?id=390,
it will probably be mentioned in the ChangeLog as well.

> Thanks for the quick response!

You're welcome.

R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and oppression
to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan




More information about the MPlayer-dev-eng mailing list