Changeset 74122 in vbox for trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBaseOci.cpp
- Timestamp:
- Sep 6, 2018 3:10:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBaseOci.cpp
r74070 r74122 62 62 ssize_t cch = RTTimeToRfc2822(RTTimeExplode(&Now, RTTimeNow(&NowSpec)), szDate, sizeof(szDate)); 63 63 AssertRCReturn((int)cch, (int)cch); 64 65 /* 66 * RFC2822 (RFC5322) marks "GMT" as obsolete, 67 * but RFC7231 explicitly specifies in the grammar: 68 * 69 * GMT = %x47.4D.54 ; "GMT", case-sensitive 70 */ 71 if ( cch >= 5 72 && (szDate[cch-5] == '-' || szDate[cch-5] == '+') 73 && strcmp(&szDate[cch-5+1], "0000") == 0) 74 { 75 szDate[cch-5+0] = 'G'; 76 szDate[cch-5+1] = 'M'; 77 szDate[cch-5+2] = 'T'; 78 szDate[cch-5+3] = '\0'; 79 cch -= 2; 80 } 64 81 65 82 return RTHttpAddHeader(hHttp, "x-date", szDate, cch, RTHTTPADDHDR_F_BACK);
Note:
See TracChangeset
for help on using the changeset viewer.