PYQT4 referer in javascript still blank

Peter Irbizon peterirbizon at
Sat Nov 1 14:07:01 CET 2014

I am trying to set referrer for my script this way in PYQT4:

class NetworkManager(QNetworkAccessManager):
    def createRequest(self, op, req, outgoing_data):
        req.setRawHeader('Referer', '')
        req.setRawHeader('Accept-Language', 'en')
        return super(NetworkManager, self).createRequest(op, req,

but when I use javascript document.write('js ref: ' + document.referrer
+'<br>'); on my website it still returns empty line.
When I use php $_SERVER["HTTP_REFERER"] it returns correct referer.

How should I make it working for javascript as well?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list