Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47889

(De)serializing QWebHistory corrupts POST data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P2: Important P2: Important
    • None
    • 4.8.6, 5.2.1, 5.5.0
    • WebKit
    • None

      When serializing a page's QWebHistory into a QDataStream and deserializing it into a new QWebPage, POST data gets corrupted.

      An example project is available at https://github.com/OtterBrowser/test-qtwebkit - when visiting e.g. http://httpbin.org/forms/post and entering "test" as customer name, the data looks right:

        "form": {
          "comments": "", 
          "custemail": "", 
          "custname": "test", 
          "custtel": "", 
          "delivery": ""
        }, 
      

      However after clicking clone, the sent data is corrupted:

        "form": {
          "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001": ""
        }, 
      

      I confirmed via Wireshark this is what's actually sent out.

      It doesn't happen when doing the same with QtWebEngine, but I still consider that too immature/incomplete to switch to it, at least until Qt 5.6 (but probably longer).

      I also attached a minimal PyQt example.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            annulen Konstantin Tokarev
            the compiler Florian Bruhin
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes