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

WASM: QNetworkRequest, parameters encoded in URL are ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.12.0
    • Network
    • None
    • Fedora 28 / Firefox 63.0.3
      emsdk-1.38.21-64bit
    • WebAssembly
    • 87b20009cc63d3a51e2eb93cd8492c77157b283b

    Description

      The attached example calls "http://urlecho.appspot.com/echo?body=HelloWorld" once the button "Go" is clicked. The result should be "HelloWorld".
      If I build the example for Linux it does just that.

      If I build the example with emscripten and run it in Firefox the get request returns "None".

      I had a look at the implementation in the file "Qt/5.12.0/Src/qtbase/src/network/access/qnetworkreplywasmimpl.cpp".
      In the line 321 it strips the request url from its parameters:

          if (request.url().hasQuery()) { //strip query from url
              extraDataString = request.url().query(QUrl::FullyEncoded);
              QString urlStr = request.url().toString();
              url.setUrl(urlStr.left(urlStr.indexOf("?")));
          } else {
              url = request.url();
          }
      

      For testing I removed this and rebuilt Qt and the example started working in the Browser as well.

      Attachments

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

        Activity

          People

            lpotter Lorn Potter
            Marscho Marscho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes