Changeset 73977 in vbox
- Timestamp:
- Aug 30, 2018 12:13:02 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/restbase.h
r73968 r73977 267 267 /** 268 268 * Resets the object to all default values. 269 */ 270 virtual void resetToDefault() = 0; 269 * @returns IPRT status code. 270 */ 271 virtual int resetToDefault() = 0; 271 272 272 273 /** … … 370 371 /** Copy assignment operator. */ 371 372 RTCRestBool &operator=(RTCRestBool const &a_rThat); 373 /** Safe copy assignment method. */ 374 int assignCopy(RTCRestBool const &a_rThat); 372 375 373 376 /* Overridden methods: */ 374 virtual voidresetToDefault() RT_OVERRIDE;377 virtual int resetToDefault() RT_OVERRIDE; 375 378 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 376 379 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 405 408 /** Copy assignment operator. */ 406 409 RTCRestInt64 &operator=(RTCRestInt64 const &a_rThat); 410 /** Safe copy assignment method. */ 411 int assignCopy(RTCRestInt64 const &a_rThat); 407 412 408 413 /* Overridden methods: */ 409 virtual voidresetToDefault() RT_OVERRIDE;414 virtual int resetToDefault() RT_OVERRIDE; 410 415 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 411 416 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 440 445 /** Copy assignment operator. */ 441 446 RTCRestInt32 &operator=(RTCRestInt32 const &a_rThat); 447 /** Safe copy assignment method. */ 448 int assignCopy(RTCRestInt32 const &a_rThat); 442 449 443 450 /* Overridden methods: */ 444 virtual voidresetToDefault() RT_OVERRIDE;451 virtual int resetToDefault() RT_OVERRIDE; 445 452 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 446 453 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 475 482 /** Copy assignment operator. */ 476 483 RTCRestInt16 &operator=(RTCRestInt16 const &a_rThat); 484 /** Safe copy assignment method. */ 485 int assignCopy(RTCRestInt16 const &a_rThat); 477 486 478 487 /* Overridden methods: */ 479 virtual voidresetToDefault() RT_OVERRIDE;488 virtual int resetToDefault() RT_OVERRIDE; 480 489 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 481 490 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 510 519 /** Copy assignment operator. */ 511 520 RTCRestDouble &operator=(RTCRestDouble const &a_rThat); 521 /** Safe copy assignment method. */ 522 int assignCopy(RTCRestDouble const &a_rThat); 512 523 513 524 /* Overridden methods: */ 514 virtual voidresetToDefault() RT_OVERRIDE;525 virtual int resetToDefault() RT_OVERRIDE; 515 526 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 516 527 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 537 548 /** Default destructor. */ 538 549 RTCRestString(); 550 /** Destructor. */ 551 virtual ~RTCRestString(); 552 539 553 /** Copy constructor. */ 540 554 RTCRestString(RTCRestString const &a_rThat); … … 543 557 /** From value constructor. */ 544 558 RTCRestString(const char *a_pszSrc); 545 /** Destructor. */ 546 virtual ~RTCRestString(); 559 /** Safe copy assignment method. */ 560 int assignCopy(RTCString const &a_rThat); 561 /** Safe copy assignment method. */ 562 int assignCopy(const char *a_pszThat); 547 563 548 564 /* Overridden methods: */ 549 virtual voidresetToDefault() RT_OVERRIDE;565 virtual int resetToDefault() RT_OVERRIDE; 550 566 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 551 567 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 572 588 573 589 /* Overridden methods: */ 574 virtual voidresetToDefault() RT_OVERRIDE;590 virtual int resetToDefault() RT_OVERRIDE; 575 591 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 576 592 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 718 734 } 719 735 736 /** Safe copy assignment method. */ 737 int assignCopy(RTCRestArray const &a_rThat) 738 { 739 return copyArrayWorker(a_rThat, false /*fThrow*/); 740 } 741 720 742 virtual const char *getType(void) RT_OVERRIDE 721 743 { … … 759 781 int insertCopy(size_t a_idx, ElementType const &a_rThat) 760 782 { 761 return insertCopyWorker(a_idx, &a_rThat, false /*a_fReplace*/);783 return insertCopyWorker(a_idx, a_rThat, false /*a_fReplace*/); 762 784 } 763 785 … … 783 805 int appendCopy(ElementType const &a_rThat) 784 806 { 785 return insertCopyWorker(~(size_t)0, &a_rThat, false /*a_fReplace*/);807 return insertCopyWorker(~(size_t)0, a_rThat, false /*a_fReplace*/); 786 808 } 787 809 … … 807 829 int prependCopy(ElementType const &a_rThat) 808 830 { 809 return insertCopyWorker(0, &a_rThat, false /*a_fReplace*/);831 return insertCopyWorker(0, a_rThat, false /*a_fReplace*/); 810 832 } 811 833 … … 833 855 int replaceCopy(size_t a_idx, ElementType const &a_rThat) 834 856 { 835 return insertCopyWorker(a_idx, &a_rThat, true /*a_fReplace*/);857 return insertCopyWorker(a_idx, a_rThat, true /*a_fReplace*/); 836 858 } 837 859 … … 907 929 virtual RTCRestObjectBase *createValueCopy(RTCRestObjectBase const *a_pSrc) RT_OVERRIDE 908 930 { 909 return new (std::nothrow) ElementType(*(ElementType const *)a_pSrc); 931 ElementType *pCopy = new (std::nothrow) ElementType(); 932 if (pCopy) 933 { 934 int rc = pCopy->assignCopy(*(ElementType const *)a_pSrc); 935 if (RT_SUCCESS(rc)) 936 return pCopy; 937 delete pCopy; 938 } 939 return NULL; 910 940 } 911 941 }; … … 928 958 929 959 /* Overridden methods: */ 930 virtual voidresetToDefault() RT_OVERRIDE;960 virtual int resetToDefault() RT_OVERRIDE; 931 961 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 932 962 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 1098 1128 } 1099 1129 1130 /** Safe copy assignment method. */ 1131 int assignCopy(RTCRestStringMap const &a_rThat) 1132 { 1133 return copyMapWorker(a_rThat, false /*a_fThrow*/); 1134 } 1135 1100 1136 virtual const char *getType(void) RT_OVERRIDE 1101 1137 { … … 1225 1261 virtual RTCRestObjectBase *createValueCopy(RTCRestObjectBase const *a_pSrc) RT_OVERRIDE 1226 1262 { 1227 return new (std::nothrow) ValueType(*(ValueType const *)a_pSrc); 1263 ValueType *pCopy = new (std::nothrow) ValueType(); 1264 if (pCopy) 1265 { 1266 int rc = pCopy->assignCopy(*(ValueType const *)a_pSrc); 1267 if (RT_SUCCESS(rc)) 1268 return pCopy; 1269 delete pCopy; 1270 } 1271 return NULL; 1228 1272 } 1229 1273 }; … … 1241 1285 /** Default destructor. */ 1242 1286 RTCRestObject(); 1243 /** Copy constructor. */1244 RTCRestObject(RTCRestBool const &a_rThat);1245 1287 /** Destructor. */ 1246 1288 virtual ~RTCRestObject(); 1289 1290 /** Copy constructor. */ 1291 RTCRestObject(RTCRestObject const &a_rThat); 1247 1292 /** Copy assignment operator. */ 1248 RTCRestBool &operator=(RTCRestObject const &a_rThat); 1293 RTCRestObject &operator=(RTCRestObject const &a_rThat); 1294 /** Safe Safe copy assignment method. */ 1295 int assignCopy(RTCRestObject const &a_rThat); 1249 1296 1250 1297 /* Overridden methods: */ 1251 virtual voidresetToDefault() RT_OVERRIDE;1298 virtual int resetToDefault() RT_OVERRIDE; 1252 1299 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_OVERRIDE; 1253 1300 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_OVERRIDE; … … 1273 1320 RTCRestClientRequestBase(); 1274 1321 virtual ~RTCRestClientRequestBase(); 1322 RTCRestClientRequestBase(RTCRestClientRequestBase const &a_rThat); 1323 RTCRestClientRequestBase &operator=(RTCRestClientRequestBase const &a_rThat); 1275 1324 1276 1325 /** 1277 1326 * Reset all members to default values. 1278 */ 1279 virtual void resetToDefault() = 0; 1327 * @returns IPRT status code. 1328 */ 1329 virtual int resetToDefault() = 0; 1280 1330 1281 1331 /** … … 1298 1348 virtual void xmitComplete(int a_rcStatus, RTHTTP a_hHttp) const = 0; 1299 1349 1350 /** 1351 * Checks if there are were any assignment errors. 1352 */ 1353 bool hasAssignmentErrors() const { return m_fErrorSet != 0; } 1354 1300 1355 protected: 1356 /** Set of fields that have been explicitly assigned a value. */ 1357 uint64_t m_fIsSet; 1358 /** Set of fields where value assigning failed. */ 1359 uint64_t m_fErrorSet; 1360 1301 1361 /** Path replacement entry. */ 1302 1362 typedef struct … … 1591 1651 * @param a_enmHttpMethod The HTTP request method. 1592 1652 * @param a_pResponse Pointer to the response object. 1653 * @param a_pszMethod The method name, for logging purposes. 1593 1654 */ 1594 1655 virtual void doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod, 1595 RTCRestClientResponseBase *a_pResponse );1656 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod); 1596 1657 1597 1658 }; -
trunk/include/iprt/http.h
r73967 r73977 210 210 211 211 /** 212 * Returns the name of the HTTP method. 213 * @returns Read only string. 214 * @param enmMethod The HTTP method to name. 215 */ 216 RTR3DECL(const char *) RTHttpMethodName(RTHTTPMETHOD enmMethod); 217 218 /** 212 219 * Performs generic blocking HTTP request, optionally returning the body and headers. 213 220 * -
trunk/include/iprt/log.h
r72426 r73977 61 61 RTLOGGROUP_HTTP, 62 62 RTLOGGROUP_LDR, 63 RTLOGGROUP_LOCALIPC, 63 64 RTLOGGROUP_PATH, 64 65 RTLOGGROUP_PROCESS, 66 RTLOGGROUP_REST, 65 67 RTLOGGROUP_SYMLINK, 66 68 RTLOGGROUP_THREAD, 67 69 RTLOGGROUP_TIME, 68 70 RTLOGGROUP_TIMER, 69 RTLOGGROUP_LOCALIPC,70 71 RTLOGGROUP_VFS, 71 72 RTLOGGROUP_ZIP = 31, … … 87 88 */ 88 89 #define RT_LOGGROUP_NAMES \ 89 "DEFAULT", 90 "RT_CRYPTO", 91 "RT_DBG", 90 "DEFAULT", \ 91 "RT_CRYPTO", \ 92 "RT_DBG", \ 92 93 "RT_DBG_DWARF", \ 93 "RT_DIR", 94 "RT_FILE", 95 "RT_FS", 94 "RT_DIR", \ 95 "RT_FILE", \ 96 "RT_FS", \ 96 97 "RT_HTTP", \ 97 "RT_LDR", \ 98 "RT_PATH", \ 99 "RT_PROCESS", \ 100 "RT_SYMLINK", \ 101 "RT_THREAD", \ 102 "RT_TIME", \ 103 "RT_TIMER", \ 98 "RT_LDR", \ 104 99 "RT_LOCALIPC", \ 100 "RT_PATH", \ 101 "RT_PROCESS", \ 102 "RT_REST", \ 103 "RT_SYMLINK", \ 104 "RT_THREAD", \ 105 "RT_TIME", \ 106 "RT_TIMER", \ 105 107 "RT_VFS", \ 106 "RT_17", \107 108 "RT_18", \ 108 109 "RT_19", \ … … 129 130 130 131 /** @def LOG_FN_FMT 131 * You can use this to specify you desired way of printing __PRETTY_FUNCTION__132 * You can use this to specify your desired way of printing __PRETTY_FUNCTION__ 132 133 * if you dislike the default one. 133 134 */ -
trunk/src/VBox/Runtime/common/rest/RTCRestArrayBase.cpp
r73968 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 83 84 *********************************************************************************************************************************/ 84 85 85 voidRTCRestArrayBase::resetToDefault()86 int RTCRestArrayBase::resetToDefault() 86 87 { 87 88 /* The default state of an array is empty. At least for now. */ 88 89 clear(); 90 return VINF_SUCCESS; 89 91 } 90 92 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBase.cpp
r73967 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 33 34 #include <iprt/err.h> 34 35 #include <iprt/http.h> 36 #include <iprt/log.h> 35 37 36 38 … … 62 64 63 65 void RTCRestClientApiBase::doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod, 64 RTCRestClientResponseBase *a_pResponse )66 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod) 65 67 { 68 LogFlow(("doCall: %s %s\n", a_pszMethod, RTHttpMethodName(a_enmHttpMethod))); 69 66 70 /* 67 71 * Initialize the HTTP instance. … … 155 159 } 156 160 a_pResponse->receiveComplete(rc, hHttp); 161 RT_NOREF_PV(a_pszMethod); 157 162 } 158 163 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientRequestBase.cpp
r73918 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 37 38 /** 38 39 * Default constructor. 39 * */40 */ 40 41 RTCRestClientRequestBase::RTCRestClientRequestBase() 42 : m_fIsSet(0) 43 , m_fErrorSet(0) 41 44 { 42 /* nothing to do */ 45 } 46 47 48 /** 49 * Copy constructor. 50 */ 51 RTCRestClientRequestBase::RTCRestClientRequestBase(RTCRestClientRequestBase const &a_rThat) 52 : m_fIsSet(a_rThat.m_fIsSet) 53 , m_fErrorSet(a_rThat.m_fErrorSet) 54 { 43 55 } 44 56 … … 50 62 { 51 63 /* nothing to do */ 64 } 65 66 67 /** 68 * Copy assignment operator. 69 */ 70 RTCRestClientRequestBase &RTCRestClientRequestBase::operator=(RTCRestClientRequestBase const &a_rThat) 71 { 72 m_fIsSet = a_rThat.m_fIsSet; 73 m_fErrorSet = a_rThat.m_fErrorSet; 74 return *this; 52 75 } 53 76 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientResponseBase.cpp
r73968 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 -
trunk/src/VBox/Runtime/common/rest/RTCRestJsonPrimaryCursor.cpp
r73875 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 -
trunk/src/VBox/Runtime/common/rest/RTCRestOutputToString.cpp
r73956 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 -
trunk/src/VBox/Runtime/common/rest/RTCRestStringMapBase.cpp
r73965 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 72 73 *********************************************************************************************************************************/ 73 74 74 voidRTCRestStringMapBase::resetToDefault()75 int RTCRestStringMapBase::resetToDefault() 75 76 { 76 77 /* Default is an empty map. */ 77 78 clear(); 79 return VINF_SUCCESS; 78 80 } 79 81 -
trunk/src/VBox/Runtime/common/rest/rest-primary-object-types.cpp
r73956 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 143 144 144 145 145 void RTCRestBool::resetToDefault() 146 int RTCRestBool::assignCopy(RTCRestBool const &a_rThat) 147 { 148 m_fValue = a_rThat.m_fValue; 149 return VINF_SUCCESS; 150 } 151 152 153 int RTCRestBool::resetToDefault() 146 154 { 147 155 m_fValue = false; 156 return VINF_SUCCESS; 148 157 } 149 158 … … 265 274 266 275 267 void RTCRestInt64::resetToDefault() 276 int RTCRestInt64::assignCopy(RTCRestInt64 const &a_rThat) 277 { 278 m_iValue = a_rThat.m_iValue; 279 return VINF_SUCCESS; 280 } 281 282 283 int RTCRestInt64::resetToDefault() 268 284 { 269 285 m_iValue = 0; 286 return VINF_SUCCESS; 270 287 } 271 288 … … 375 392 376 393 377 void RTCRestInt32::resetToDefault() 394 int RTCRestInt32::assignCopy(RTCRestInt32 const &a_rThat) 395 { 396 m_iValue = a_rThat.m_iValue; 397 return VINF_SUCCESS; 398 } 399 400 401 int RTCRestInt32::resetToDefault() 378 402 { 379 403 m_iValue = 0; 404 return VINF_SUCCESS; 380 405 } 381 406 … … 491 516 492 517 493 void RTCRestInt16::resetToDefault() 518 int RTCRestInt16::assignCopy(RTCRestInt16 const &a_rThat) 519 { 520 m_iValue = a_rThat.m_iValue; 521 return VINF_SUCCESS; 522 } 523 524 525 int RTCRestInt16::resetToDefault() 494 526 { 495 527 m_iValue = 0; 528 return VINF_SUCCESS; 496 529 } 497 530 … … 598 631 599 632 600 void RTCRestDouble::resetToDefault() 633 /** Copy assignment operator. */ 634 RTCRestDouble &RTCRestDouble::operator=(RTCRestDouble const &a_rThat) 635 { 636 m_rdValue = a_rThat.m_rdValue; 637 return *this; 638 } 639 640 641 int RTCRestDouble::assignCopy(RTCRestDouble const &a_rThat) 642 { 643 m_rdValue = a_rThat.m_rdValue; 644 return VINF_SUCCESS; 645 } 646 647 648 int RTCRestDouble::resetToDefault() 601 649 { 602 650 m_rdValue = 0.0; 651 return VINF_SUCCESS; 603 652 } 604 653 … … 715 764 716 765 717 void RTCRestString::resetToDefault() 766 int RTCRestString::assignCopy(RTCString const &a_rThat) 767 { 768 return assignNoThrow(a_rThat); 769 } 770 771 772 int RTCRestString::assignCopy(const char *a_pszThat) 773 { 774 return assignNoThrow(a_pszThat); 775 } 776 777 778 int RTCRestString::resetToDefault() 718 779 { 719 780 setNull(); 781 return VINF_SUCCESS; 720 782 } 721 783 -
trunk/src/VBox/Runtime/generic/http-curl.cpp
r73967 r73977 2 2 /** @file 3 3 * IPRT - HTTP client API, cURL based. 4 * 5 * Logging groups: 6 * Log4 - request headers. 7 * Log5 - request body. 8 * Log6 - response headers. 9 * Log7 - response body. 4 10 */ 5 11 … … 2874 2880 AssertPtrReturn(pszUrl, VERR_INVALID_POINTER); 2875 2881 2882 #ifdef LOG_ENABLED 2883 if (LogIs6Enabled() && pThis->pHeaders) 2884 { 2885 Log4(("RTHttpPerform: headers:\n")); 2886 for (struct curl_slist const *pCur = pThis->pHeaders; pCur; pCur = pCur->next) 2887 Log4(("%s", pCur->data)); 2888 } 2889 if (pvReqBody && cbReqBody) 2890 Log5(("RTHttpPerform: request body:\n%.*Rhxd\n", cbReqBody, pvReqBody)); 2891 #endif 2892 2876 2893 /* 2877 2894 * Set the busy flag (paranoia). … … 2887 2904 if (RT_SUCCESS(rc)) 2888 2905 { 2889 2890 /* HTTP method. */ 2906 /* Set the HTTP method. */ 2891 2907 int rcCurl = 1; 2892 2908 switch (enmMethod) … … 2970 2986 if (ppvHeaders) 2971 2987 { 2988 Log(("RTHttpPerform: headers: %zx bytes (allocated %zx)\n", 2989 pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.cbAllocated)); 2990 Log6(("RTHttpPerform: headers blob:\n%.*Rhxd\n", pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.pb)); 2972 2991 *ppvHeaders = pThis->HeadersOutput.uData.Mem.pb; 2973 2992 *pcbHeaders = pThis->HeadersOutput.uData.Mem.cb; 2974 2993 pThis->HeadersOutput.uData.Mem.pb = NULL; 2975 Log(("RTHttpPerform: headers: %zx bytes (allocated %zx)\n",2976 pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.cbAllocated));2977 2994 } 2978 2995 if (ppvBody) 2979 2996 { 2997 Log(("RTHttpPerform: body: %zx bytes (allocated %zx)\n", 2998 pThis->BodyOutput.uData.Mem.cb, pThis->BodyOutput.uData.Mem.cbAllocated)); 2999 Log7(("RTHttpPerform: body blob:\n%.*Rhxd\n", pThis->BodyOutput.uData.Mem.cb, pThis->BodyOutput.uData.Mem.pb)); 2980 3000 *ppvBody = pThis->BodyOutput.uData.Mem.pb; 2981 3001 *pcbBody = pThis->BodyOutput.uData.Mem.cb; 2982 3002 pThis->BodyOutput.uData.Mem.pb = NULL; 2983 Log(("RTHttpPerform: body: %zx bytes (allocated %zx)\n",2984 pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.cbAllocated));2985 3003 } 2986 3004 } … … 3004 3022 3005 3023 3024 RTR3DECL(const char *) RTHttpMethodName(RTHTTPMETHOD enmMethod) 3025 { 3026 switch (enmMethod) 3027 { 3028 case RTHTTPMETHOD_INVALID: return "invalid"; 3029 case RTHTTPMETHOD_GET: return "GET"; 3030 case RTHTTPMETHOD_PUT: return "PUT"; 3031 case RTHTTPMETHOD_POST: return "POST"; 3032 case RTHTTPMETHOD_PATCH: return "PATCH"; 3033 case RTHTTPMETHOD_DELETE: return "DELETE"; 3034 case RTHTTPMETHOD_HEAD: return "HEAD"; 3035 case RTHTTPMETHOD_OPTIONS: return "OPTIONS"; 3036 case RTHTTPMETHOD_TRACE: return "TRACE"; 3037 3038 case RTHTTPMETHOD_END: 3039 case RTHTTPMETHOD_32BIT_HACK: 3040 break; 3041 } 3042 return "unknown"; 3043 } 3044 3045 3006 3046 /********************************************************************************************************************************* 3007 3047 * Callback APIs. *
Note:
See TracChangeset
for help on using the changeset viewer.