site specific referrer

Dawit Alemayehu adawit at kde.org
Sun Jul 3 00:48:23 BST 2005


On Saturday 02 July 2005 09:49, Cristian Boya de Groot wrote:
> I've been looking all over the kio_http/khtml/konqueror etc. code to find a
> way to set a site specific (fake) Referer, just like the site specific
> User-Agents. I think I've understood from the code that the kio_http has a
> useragent "metaData" as well as a "referer" metaData, but I can't seem to
> find where in the code the User-Agent gets read from the config-file
> (kio_httprc) and set as metaData for the slave. I would like to add the
> same thing for the Referer.
>
> What I did find out was that if I add a section with a referrer value to
> the kio_httprc file, like this (I tested with my own server):
>
> [127.0.0.1]
> referrer=http://www.fake.com/

You have to then update force any running http io-slave to re-read the config 
file:


for i in `dcop konqueror-*`
do 
 dcop $i KIO::Scheduler reparseSlaveConfiguration ""
done

OR use kdcop to do the same thing. 

Obviously it works for the user agent plug-in, because it issues this same 
command in the program. See 

kdeaddons/konq-plugins/uachanger/uachangerplugin.cpp

-- 
Regards,
Dawit A.
"Practice what you preach, preach what you practice"




More information about the kfm-devel mailing list