redirect problem + solution


I'm using and qtwebkit which seem to have a problem with the 3xx HTTP-Status codes. It doesn't follow the "Location" header. In this post I explain my hackfix so that this works again.

Bug description

I use PyQt 4.9.6-r2 from the gentoo repository. And the from 4th May. When using ghost.load("http:/..") on a webpage which sends a 3xx status code with a location back, it won't automatically follow.

Update 18.6.2013: seems to work now. But I don't know what I've changed.


I think the quality of my fix is quite bad, but works and that is all I need :) [gist][/gist] So I looked at where added the decorator @can_load_page and copied the methods to add my decorator.

My decorator works recursively, but doesn't count the number of redirects.. Also it will break if the Server doesn't send the "Location" in it's header.. but you may get the idea.. and I assume that this bug will be fixed soon.