[mythtv] Qt based replacement for wget
Holger Buchfink
avalanche at beyondmonkey.com
Wed Apr 20 00:52:59 UTC 2005
Isaac Richards wrote:
> I just wish the Qt http classes supported authentication.. I think the
> existing httpcomms class does all this but the session-ids.
Hmm, never looked into that, but I couldn't resist doing a quick google
and found this interesting snippet. Can it be that simple?
// base64 authentication header
if ( endpoint_.hasPassword() && endpoint_.hasUser() )
{
QCString auth = QCodecs::base64Encode( QCString( endpoint_.user() +
":" + endpoint_.password() ) );
header.setValue( "Authorization", QString( "Basic " ).append( auth.data() ) );
}
I think it really is that simple, of course I haven't tried it out..
http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#BasicAA
Now what's that shiny looking thing over there...
Holger
More information about the mythtv-dev
mailing list