Re: KIO::Job::addMetaData confusion
On Monday 05 December 2005 15:36, John Hawkes-Reed wrote:[color=blue]
> I'm fiddling with some code to (attempt to) talk to the Atom API in Movable
> Type. Atom seems to require that authentication gugna is attached to each
> http transaction.
> Now, to my (obviously wrong) mind, I'd expect something like this to work:
> KURL server = "http://www.libeljournal.com/cgi-bin/mt-atom.cgi/weblog";
> [ Ugly code to construct SHA + nonce and call it 'authStr' ]
> KIO::TransferJob *job = KIO::get( server, true, false );
> job->addMetaData( "UserAgent", "Pobble 0.1" );
> job->addMetaData( "Authorization", "WSSE profile=\"UsernameToken\"");
> job->addMetaData( "X-WSSE", authStr);
> ... But since only the 'UserAgent' string turns up in the ethereal dump, I'm
> getting it horribly wrong.
> Does 'addMetaData' allow arbitrary pairs, or will it only work with headers
> that it knows about?[/color]
Metadata is for communication between the job and the slave, not (only) for
setting HTTP headers.
Setting HTTP headers must be done with the metadata "customHTTPHeader"
where the value is a \r\n-separated string containing all the custom headers you
want to set.
Apparently that one is missing from kio/DESIGN.metadata...
Please tell me if it works and I'll add it there :)
David Faure, [email]email@example.com[/email], sponsored by Trolltech to work on KDE,
Konqueror ([url]http://www.konqueror.org[/url]), and KOffice ([url]http://www.koffice.org[/url]).
>> Visit [url]http://mail.kde.org/mailman/listinfo/kde-devel#unsub[/url] to unsubscribe <<[/color][/color]