Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [Moved]Browser : authentification failure when redirect to absolute url
Forum Updated to NodeBB v4.3 + New Features

[Moved]Browser : authentification failure when redirect to absolute url

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    defrgly
    wrote on last edited by
    #1

    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.
    Defrgly

    PS : Sorry for my poor english.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved