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

QWebEngineUrlSchemeHandler and HTTP range request

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.2
    • WebEngine
    • None
    • Ubuntu 25.04

      I use a custom scheme, I reimplement method QWebEngineUrlSchemeHandler::requestStarted and I receive a range request

      I return my source file data as a QFile in the request reply and then Qt makes the job internally to return the requested "range" bytes. For unknown reason, some ranges fail while some ones succeed.

      So now, I search myself the requested range bytes and return them as a QBuffer in the request reply, problem is that Qt try to seek in my QBuffer to find the range and so makes an overflow error.

      I workaround this issue by prefilling my buffer with zeros so Qt does not fail to seek and finally all is ok.

      Is there any way to prevent Qt seeking in my buffer? In other words, is there any way to tell Qt that "I already made the range job just return the bytes from my buffer"?

        1. rangeRequest.zip
          3 kB
          Loic Martin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            apap_ Loic Martin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes