Changeset 74060 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Sep 4, 2018 9:28:28 AM (6 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBaseOci.cpp
r74053 r74060 146 146 RTStrPrintf(szTmp, sizeof(szTmp), "%zu", a_rStrXmitBody.length()); 147 147 148 rc = RTHttpA ppendHeader(a_hHttp, s_szContentLength, szTmp, 0);148 rc = RTHttpAddHeader(a_hHttp, s_szContentLength, szTmp, RTHTTPADDHDR_F_BACK); 149 149 AssertRCReturn(rc, rc); 150 150 pszContentLength = RTHttpGetHeader(a_hHttp, RT_STR_TUPLE(s_szContentLength)); … … 177 177 rc = RTBase64EncodeEx(abHash, sizeof(abHash), RTBASE64_FLAGS_NO_LINE_BREAKS, szTmp, sizeof(szTmp), NULL); 178 178 179 rc = RTHttpA ppendHeader(a_hHttp, s_szXContentSha256, szTmp, 0);179 rc = RTHttpAddHeader(a_hHttp, s_szXContentSha256, szTmp, RTHTTPADDHDR_F_BACK); 180 180 AssertRCReturn(rc, rc); 181 181 pszValue = RTHttpGetHeader(a_hHttp, RT_STR_TUPLE(s_szXContentSha256)); … … 223 223 Time.u8Hour, Time.u8Minute, Time.u8Second); 224 224 225 rc = RTHttpA ppendHeader(a_hHttp, s_szXDate, szTmp, 0);225 rc = RTHttpAddHeader(a_hHttp, s_szXDate, szTmp, RTHTTPADDHDR_F_BACK); 226 226 AssertRCReturn(rc, rc); 227 227 pszXDate = RTHttpGetHeader(a_hHttp, RT_STR_TUPLE(s_szXDate)); … … 304 304 * Finally, add the authorization header. 305 305 */ 306 rc = RTHttpA ppendHeader(a_hHttp, "Authorization", strAuth.c_str(), 0);306 rc = RTHttpAddHeader(a_hHttp, "Authorization", strAuth.c_str(), RTHTTPADDHDR_F_FRONT); 307 307 AssertRC(rc); 308 308 } -
trunk/src/VBox/Runtime/common/rest/RTCRestClientRequestBase.cpp
r74025 r74060 193 193 AssertRCReturn(rc, rc); 194 194 195 rc = RTHttpA ppendHeader(a_hHttp, a_paHeaderParams[i].pszName, strTmpVal.c_str(), 0);195 rc = RTHttpAddHeader(a_hHttp, a_paHeaderParams[i].pszName, strTmpVal.c_str(), RTHTTPADDHDR_F_BACK); 196 196 AssertRCReturn(rc, rc); 197 197 } … … 217 217 AssertRCReturn(rc, rc); 218 218 219 rc = RTHttpA ppendHeader(a_hHttp, strTmpName.c_str(), strTmpVal.c_str(), 0);219 rc = RTHttpAddHeader(a_hHttp, strTmpName.c_str(), strTmpVal.c_str(), RTHTTPADDHDR_F_BACK); 220 220 AssertRCReturn(rc, rc); 221 221 } -
trunk/src/VBox/Runtime/generic/http-curl.cpp
r74050 r74060 1929 1929 1930 1930 /** 1931 * Helper for RTHttpSetHeaders and RTHttpA ppendHeader that unsets the user agent1931 * Helper for RTHttpSetHeaders and RTHttpAddRawHeader that unsets the user agent 1932 1932 * if it is now in one of the headers. 1933 1933 */ … … 1967 1967 1968 1968 /* 1969 * Convert the headers into a curl string list, checki g each string for User-Agent.1969 * Convert the headers into a curl string list, checking each string for User-Agent. 1970 1970 */ 1971 1971 struct curl_slist *pHeaders = NULL; … … 2000 2000 2001 2001 2002 RTR3DECL(int) RTHttpA ppendRawHeader(RTHTTP hHttp, const char *pszHeader)2002 RTR3DECL(int) RTHttpAddRawHeader(RTHTTP hHttp, const char *pszHeader, uint32_t fFlags) 2003 2003 { 2004 2004 PRTHTTPINTERNAL pThis = hHttp; 2005 2005 RTHTTP_VALID_RETURN(pThis); 2006 AssertReturn(!(fFlags & ~RTHTTPADDHDR_F_BACK), VERR_INVALID_FLAGS); 2007 /** @todo implement RTHTTPADDHDR_F_FRONT */ 2006 2008 2007 2009 /* … … 2040 2042 2041 2043 2042 RTR3DECL(int) RTHttpA ppendHeader(RTHTTP hHttp, const char *pszField, const char *pszValue, uint32_t fFlags)2044 RTR3DECL(int) RTHttpAddHeader(RTHTTP hHttp, const char *pszField, const char *pszValue, uint32_t fFlags) 2043 2045 { 2044 2046 … … 2062 2064 size_t const cchValue = strlen(pszValue); 2063 2065 2064 AssertReturn(! fFlags, VERR_INVALID_FLAGS);2066 AssertReturn(!(fFlags & ~RTHTTPADDHDR_F_BACK), VERR_INVALID_FLAGS); 2065 2067 2066 2068 /* … … 2084 2086 pszHeader[cbNeeded - 1] = '\0'; 2085 2087 2086 int rc = RTHttpA ppendRawHeader(hHttp, pszHeader);2088 int rc = RTHttpAddRawHeader(hHttp, pszHeader, fFlags & RTHTTPADDHDR_F_FRONT); 2087 2089 2088 2090 if (pszHeaderFree)
Note:
See TracChangeset
for help on using the changeset viewer.