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. Disable automatic Encode URL
Forum Updated to NodeBB v4.3 + New Features

Disable automatic Encode URL

Scheduled Pinned Locked Moved Qt WebKit
15 Posts 4 Posters 11.8k 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.
  • K Offline
    K Offline
    Koshak01
    wrote on 18 Jan 2011, 13:23 last edited by
    #1

    when i set encoded url with percent % :

    webkit make double encode this url

    Can i disable this Feature ?

    dont talk me about qt is automatic - when i get BAN from yandex - yandex redirect me in Captcha Page - and webkit encode this url too and i get 404 error .

    foothold.ru - django/python web develop

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on 18 Jan 2011, 15:18 last edited by
      #2

      Where are you setting that url? Can you pastebin a snippet?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Koshak01
        wrote on 18 Jan 2011, 16:44 last edited by
        #3

        ок.

        http://pastebin.com/M0nii3vZ - this url i need to load

        http://pastebin.com/GPMk3Nun - this load ( double encode ) ((((

        i think, that i can disable autoencode feature in settings, but i cant found this ((((

        foothold.ru - django/python web develop

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on 18 Jan 2011, 16:48 last edited by
          #4

          Can you paste your code? My crystall ball is out of service.

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Koshak01
            wrote on 18 Jan 2011, 17:01 last edited by
            #5

            =))))

            self.browser.load(QUrl(self.lineedit.text()))

            self.lineedit.text() = http://pastebin.com/M0nii3vZ


            foothold.ru - django/python web develop

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Koshak01
              wrote on 18 Jan 2011, 17:02 last edited by
              #6

              in yandex i see in search string double encoded phrase ((((

              foothold.ru - django/python web develop

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on 18 Jan 2011, 17:06 last edited by
                #7

                Do you craeate a "QUrl":http://doc.qt.nokia.com/4.7/qurl.html on your own? If so, you should use static "fromEncoded() ":http://doc.qt.nokia.com/4.7/qurl.html#fromEncoded method.

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  Koshak01
                  wrote on 18 Jan 2011, 21:54 last edited by
                  #8

                  ok tnx

                  Can i catch redirect ? and rewrite url ( i deEncode url) ??

                  Tnx )

                  foothold.ru - django/python web develop

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on 18 Jan 2011, 22:02 last edited by
                    #9

                    A redirect URL should be handled and decoded correctly internally.

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      Koshak01
                      wrote on 18 Jan 2011, 22:08 last edited by
                      #10

                      when i connect to event downloadFinished, i see that url is double encoded, and redirect not work ((( -

                      can i connect to another event, catch redirect, correct url and continue request ?

                      foothold.ru - django/python web develop

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on 18 Jan 2011, 22:22 last edited by
                        #11

                        Are you sure the URL sent from the server is correct? Sounds like it is double encoded on that side. I never heard of any problems with redirection and webkit.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          Koshak01
                          wrote on 18 Jan 2011, 22:26 last edited by
                          #12

                          when redirect to another url and url has "%" webkit do encode and i get double encode ( yandex. say me 404 error ) ((((

                          when i get ban i post this url.

                          foothold.ru - django/python web develop

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on 18 Jan 2011, 22:30 last edited by
                            #13

                            Provide us a short, complete, compilable and working example app that demonstrates the bug. We'll have a look into it.

                            It does not help posting the URL here.

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              Koshak01
                              wrote on 18 Jan 2011, 22:43 last edited by
                              #14

                              ok. now i do this -

                              @

                              1. self.connect(self.page().networkAccessManager(), QtCore.SIGNAL("finished( QNetworkReply *)"), self.finishedURL)
                              2. on finishedURL:
                                oRedirect = oRequest.attribute(QNetworkRequest.RedirectionTargetAttribute).toUrl( )
                                if not oRedirect.isEmpty( ):
                                sUrl = str(oRedirect.toString( ))
                                .....
                                url processing and get captha image ....
                                @

                              now i cant get ban (((( - all ip is un-ban ))))

                              [EDIT: code formatting, Volker]

                              foothold.ru - django/python web develop

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                Murz
                                wrote on 9 Dec 2013, 08:53 last edited by
                                #15

                                I got the same issue - all clicked urls in QtWebKit object that contains percent (%) are broken in Qt WebKit, but works well on Rekonq browser (that use webkit).

                                As I see, QtWebKit replace in url all percent symbols to % construction and broke the url.

                                Koshak01, did you solve this problem?

                                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