VirtualBox

Changeset 58238 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 14, 2015 1:21:32 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103403
Message:

FE/Qt: Networking cleanup/rework (part 3): Use more abstract binary type of request/reply instead of text one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r58237 r58238  
    356356    m_reply.clear();
    357357
     358    /* Prepare result: */
     359    int rc = 0;
     360
    358361    /* Perform blocking HTTP GET request: */
    359     char *pszResponse;
    360     /** @todo r=bird: Use RTHttpGetBinary? */
    361     int rc = RTHttpGetText(m_hHttp, m_request.url().toString().toUtf8().constData(), &pszResponse);
     362    void   *pvResponse = 0;
     363    size_t  cbResponse = 0;
     364    rc = RTHttpGetBinary(m_hHttp, m_request.url().toString().toUtf8().constData(), &pvResponse, &cbResponse);
    362365    if (RT_SUCCESS(rc))
    363366    {
    364         m_reply = QByteArray(pszResponse);
    365         RTHttpFreeResponseText(pszResponse);
    366     }
    367 
     367        m_reply = QByteArray((char*)pvResponse, cbResponse);
     368        RTHttpFreeResponse(pvResponse);
     369    }
     370
     371    /* Return result: */
    368372    return rc;
    369373}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette