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

QML XMLHttpRequest often failed when using WIFI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.4
    • None
    • window 10
    • Windows

    Description

      Everything is ok, if I use  wired network. but if  I use wireless network. I can't post  message. (OK seldom happens)

                  var mycontent = "username=nametest&password=onlyfortees";
                  var myhttptemp = new XMLHttpRequest();
                  var loginUrl = "http://192.168.1.11/testserver/login";
                  myhttptemp.open("POST", loginUrl, false); 
                  myhttptemp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                  myhttptemp.setRequestHeader("Content-length", mycontent.length);
                  myhttptemp.setRequestHeader("Connection", "Keep-Alive");
                  myhttptemp.send(mycontent);
                  if(myhttptemp.status === 200)
                  {
                      console.log("myhttptemp===========");     //wired network
                  }
                  else
                  {
                      console.log("failed");    //wireless network  myhttptemp.status is 0  
                  }
      

      somthing like QTBUG-49751 but my version is 5.9.4

      Attachments

        Activity

          People

            ablasche Alex Blasche
            mars Mars Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: