VirtualBox

Changeset 100669 in vbox for trunk


Ignore:
Timestamp:
Jul 20, 2023 2:58:53 PM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158509
Message:

IPRT/http-server: Only return a client response in rtHttpServerProcessRequest() if a handler method hasn't been called. Otherwise the handler is in charge of doing so. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/http-server.cpp

    r100368 r100669  
    12401240        enmSts = RTHTTPSTATUS_BADREQUEST;
    12411241
    1242     /* Make sure to return at least *something* to the client, to prevent hangs. */
    1243     if (enmSts == RTHTTPSTATUS_INTERNAL_NOT_SET)
    1244         enmSts = rtHttpServerRcToStatus(VERR_INTERNAL_ERROR);
    1245 
    1246     int rc2 = rtHttpServerSendResponseSimple(pClient, enmSts);
    1247     if (RT_SUCCESS(rc))
    1248         rc = rc2;
     1242    /* If a status was set here explicitly, return it to prevent client hangs. */
     1243    if (enmSts != RTHTTPSTATUS_INTERNAL_NOT_SET)
     1244    {
     1245        int rc2 = rtHttpServerSendResponseSimple(pClient, enmSts);
     1246        if (RT_SUCCESS(rc))
     1247            rc = rc2;
     1248    }
    12491249
    12501250    LogFlowFuncLeaveRC(rc);
Note: See TracChangeset for help on using the changeset viewer.

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