[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KIO::Job::addMetaData confusion
From:       David Faure <faure () kde ! org>
Date:       2005-12-05 14:46:44
Message-ID: 200512051546.44767.faure () kde ! org
[Download RAW message or body]

On Monday 05 December 2005 15:36, John Hawkes-Reed wrote:
> 
> Hello.
> 
> 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?

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, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic