Changeset 75108 in vbox
- Timestamp:
- Oct 26, 2018 3:44:26 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126171
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/http.h
r74377 r75108 58 58 * 59 59 * @returns IPRT status code. 60 * @param hHttp Handle to the HTTP interface. 61 */ 62 RTR3DECL(int) RTHttpReset(RTHTTP hHttp); 60 * @param hHttp Handle to the HTTP interface. 61 * @param fFlags Flags, RTHTTP_RESET_F_XXX. 62 */ 63 RTR3DECL(int) RTHttpReset(RTHTTP hHttp, uint32_t fFlags); 64 65 /** @name RTHTTP_RESET_F_XXX - Flags for RTHttpReset. 66 * @{ */ 67 /** Keep the headers. */ 68 #define RTHTTP_RESET_F_KEEP_HEADERS RT_BIT_32(0) 69 /** Mask containing the valid flags. */ 70 #define RTHTTP_RESET_F_VALID_MASK UINT32_C(0x00000001) 71 /** @} */ 72 63 73 64 74 /** -
trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBase.cpp
r74425 r75108 178 178 { 179 179 #if 0 /** @todo XXX: disable for now as it causes the RTHTTP handle state and curl state to get out of sync. */ 180 return RTHttp Reset(m_hHttp);180 return RTHttpDestroy(m_hHttp, 0 /*fFlags*/); 181 181 #else 182 182 RTHttpDestroy(m_hHttp); -
trunk/src/VBox/Runtime/generic/http-curl.cpp
r75103 r75108 406 406 407 407 408 RTR3DECL(int) RTHttpReset(RTHTTP hHttp) 409 { 410 if (hHttp == NIL_RTHTTP) 411 return VERR_INVALID_HANDLE; 412 408 RTR3DECL(int) RTHttpReset(RTHTTP hHttp, uint32_t fFlags) 409 { 410 /* Validate the instance handle, state and flags. */ 413 411 PRTHTTPINTERNAL pThis = hHttp; 414 412 RTHTTP_VALID_RETURN(pThis); 415 416 413 AssertReturn(!pThis->fBusy, VERR_WRONG_ORDER); 414 AssertReturn(!(fFlags & ~RTHTTP_RESET_F_VALID_MASK), VERR_INVALID_FLAGS); 417 415 418 416 /* This resets options, but keeps open connections, cookies, etc. */ 419 417 curl_easy_reset(pThis->pCurl); 420 418 421 rtHttpFreeHeaders(pThis); 419 if (!(fFlags & RTHTTP_RESET_F_KEEP_HEADERS)) 420 rtHttpFreeHeaders(pThis); 422 421 423 422 pThis->uDownloadHttpStatus = UINT32_MAX;
Note:
See TracChangeset
for help on using the changeset viewer.