Changeset 238666 in webkit
- Timestamp:
- Nov 29, 2018, 4:34:26 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/csp/ContentSecurityPolicy.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238665 r238666 1 2018-11-29 Rob Buis <rbuis@igalia.com> 2 3 Remove some superfluous code in ContentSecurityPolicy::upgradeInsecureRequestIfNeeded 4 https://bugs.webkit.org/show_bug.cgi?id=192076 5 6 Reviewed by Frédéric Wang. 7 8 Since we do an early return if the protocol is not http or ws, the if check 9 for ws protocol and else statement are not needed, so use an ASSERT instead. 10 11 * page/csp/ContentSecurityPolicy.cpp: 12 (WebCore::ContentSecurityPolicy::upgradeInsecureRequestIfNeeded const): 13 1 14 2018-11-29 Frederic Wang <fwang@igalia.com> 2 15 -
trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
r234586 r238666 883 883 if (requestType == InsecureRequestType::Load || requestType == InsecureRequestType::FormSubmission) 884 884 upgradeRequest |= m_upgradeInsecureRequests; 885 885 886 886 if (!upgradeRequest) 887 887 return; … … 889 889 if (url.protocolIs("http")) 890 890 url.setProtocol("https"); 891 else if (url.protocolIs("ws")) 891 else { 892 ASSERT(url.protocolIs("ws")); 892 893 url.setProtocol("wss"); 893 else 894 return; 895 894 } 895 896 896 if (url.port() && url.port().value() == 80) 897 897 url.setPort(443);
Note:
See TracChangeset
for help on using the changeset viewer.