Changeset 252127 in webkit
- Timestamp:
- Nov 6, 2019 12:28:28 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252122 r252127 1 2019-11-06 youenn fablet <youenn@apple.com> 2 3 There is no need to clean the content type header of a request if it is null 4 https://bugs.webkit.org/show_bug.cgi?id=203853 5 6 Reviewed by Geoffrey Garen. 7 8 No change of behavior. 9 10 * loader/CrossOriginAccessControl.cpp: 11 (WebCore::cleanHTTPRequestHeadersForAccessControl): 12 Stop early if content type is null so that we do not log an error that is not a real error. 13 1 14 2019-11-05 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp
r252047 r252127 154 154 { 155 155 // Remove headers that may have been added by the network layer that cause access control to fail. 156 if (!headersToKeep.contains(HTTPHeadersToKeepFromCleaning::ContentType) && !isCrossOriginSafeRequestHeader(HTTPHeaderName::ContentType, request.httpContentType())) 157 request.clearHTTPContentType(); 156 if (!headersToKeep.contains(HTTPHeadersToKeepFromCleaning::ContentType)) { 157 auto contentType = request.httpContentType(); 158 if (!contentType.isNull() && !isCrossOriginSafeRequestHeader(HTTPHeaderName::ContentType, contentType)) 159 request.clearHTTPContentType(); 160 } 158 161 if (!headersToKeep.contains(HTTPHeadersToKeepFromCleaning::Referer)) 159 162 request.clearHTTPReferrer();
Note: See TracChangeset
for help on using the changeset viewer.