[Moved]Browser : authentification failure when redirect to absolute url
-
Hello all,
I developed a browser in pyQt.
For restricted area on a website, I have a problem.I have a website with htaccess with 2 pages :
-
http://www.toto.fr/page1.html
@<html>
<body>
the web page 1
</body>
</html>@ -
http://www.toto.fr/page2.html
@<html>
<body>
the web page 2
</body>
</html>@
When I load page1.html, my script loads the page correctly : the script sets automatically my login/password automatically with success.
But, when there is a javascript redirection to go to http://www.toto.fr/page2.html,
@window . location='http://www.toto.fr/page2.html'@
I have an error: "Authorization Required".On the other side, if the redirection is :
@window . location='./page1.html'@
The page is loaded with success.This is a part of my python code:
@[...]qu=QUrl('http://www.toto.fr/page1.html')
qu.setUserName('toto')
qu.setPassword('123456')
nr=QNetworkRequest(qu)
self.mainFrame().load(nr,2)[...]@
For information, I had tested with basic browsers and the redirection is done without input a second time my login/password.
That's why, I think it is possible to do this automatically.Thanks for your help.
DefrglyPS : Sorry for my poor english.
-