KIO HTTP: Post-Content type bug in http.c and SOAPAction header
Simon Hausmann
hausmann at kde.org
Sun Sep 29 23:05:57 BST 2002
On Sun, Sep 29, 2002 at 11:54:52PM +0200, Tim Jansen wrote:
> 2. I would like to add a new kind of metadata called "soapaction". It is the
> content of a "SOAPAction" header field, as required by SOAP 1.1. I know it is
> a little bit late to add a feature, but it is trivial and should not harm any
> other code.
>
> Here is the patch (1&2 combined):
>
> Index: kioslave/http/http.cc
> ===================================================================
> RCS file: /home/kde/kdelibs/kioslave/http/http.cc,v
> retrieving revision 1.543
> diff -u -3 -p -r1.543 http.cc
> --- kioslave/http/http.cc 2002/09/21 19:51:27 1.543
> +++ kioslave/http/http.cc 2002/09/29 21:17:47
> @@ -2170,8 +2170,17 @@ bool HTTPProtocol::httpOpen()
> if (!cookieStr.isEmpty())
> header += cookieStr + "\r\n";
>
> + QString soapAction = metaData("soapaction");
> + if (!soapAction.isEmpty())
> + {
> + header += "SOAPAction: ";
> + header += soapAction;
> + header += "\r\n";
> + }
> +
I think a cleaner solution would be something along the lines of
QString customHeader = metaData( "customHTTPHeader" );
if ( !customHeader.isEmpty() ) {
header += customHeader;
header += "\r\n";
}
and on the other side:
job->addMetaData( "customHTTPHeader", "SOAPAction: foobar" );
You get the idea :)
Simon
More information about the kde-core-devel
mailing list