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

wasm: NetworkReply with empty data generates runtimeError

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.3, 6.6.0 Beta2, 6.7.0 FF
    • 6.5.1
    • Network
    • None
    • WebAssembly
    • 103ffe1b5 (dev), cbf5a4050 (6.6), 4f3c5a629 (6.5)

    Description

      on firefox, a PUT request with a response with a 0 content-length generates a critical error and exit the application:

      Application exit (RuntimeError: integer divide by zero)

       

      in file:

      qtbase/src/network/access/qnetworkreplywasmimpl.cpp

      in function

      void QNetworkReplyWasmImplPrivate::emitDataReadProgress(qint64 bytesReceived, qint64 bytesTotal)

       

      if we  replace

      percentFinished = (bytesReceived / bytesTotal) * 100;

      by

      percentFinished = bytesTotal ? (bytesReceived / bytesTotal) * 100 : 100;

      it fix the bug

       

       

      Attachments

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

        Activity

          People

            lpotter Lorn Potter
            jeandof Jean-Dominique Favreau
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes