Changeset 272301 in webkit
- Timestamp:
- Feb 3, 2021, 12:30:22 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/network/soup/AuthenticationChallengeSoup.cpp (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp (modified) (4 diffs)
-
WebKit/UIProcess/API/glib/WebKitWebView.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r272300 r272301 1 2021-02-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][WPE] Reduce the use of SoupURI in preparation for libsoup3 4 https://bugs.webkit.org/show_bug.cgi?id=221251 5 6 Reviewed by Adrian Perez de Castro. 7 8 * platform/network/soup/AuthenticationChallengeSoup.cpp: 9 (WebCore::protectionSpaceServerTypeFromURL): 10 (WebCore::protectionSpaceFromSoupAuthAndURL): 11 (WebCore::AuthenticationChallenge::AuthenticationChallenge): 12 (WebCore::protectionSpaceServerTypeFromURI): Deleted. 13 (WebCore::protectionSpaceFromSoupAuthAndMessage): Deleted. 14 1 15 2021-02-02 Antti Koivisto <antti@apple.com> 2 16 -
trunk/Source/WebCore/platform/network/soup/AuthenticationChallengeSoup.cpp
r220583 r272301 35 35 namespace WebCore { 36 36 37 static ProtectionSpaceServerType protectionSpaceServerTypeFromUR I(SoupURI* uri, bool isForProxy)37 static ProtectionSpaceServerType protectionSpaceServerTypeFromURL(const URL& url, bool isForProxy) 38 38 { 39 if (ur i->scheme == SOUP_URI_SCHEME_HTTPS)39 if (url.protocolIs("https")) 40 40 return isForProxy ? ProtectionSpaceProxyHTTPS : ProtectionSpaceServerHTTPS; 41 if (ur i->scheme == SOUP_URI_SCHEME_HTTP)41 if (url.protocolIs("http")) 42 42 return isForProxy ? ProtectionSpaceProxyHTTP : ProtectionSpaceServerHTTP; 43 if (ur i->scheme == SOUP_URI_SCHEME_FTP)43 if (url.protocolIs("ftp")) 44 44 return isForProxy ? ProtectionSpaceProxyFTP : ProtectionSpaceServerFTP; 45 45 return isForProxy ? ProtectionSpaceProxyHTTP : ProtectionSpaceServerHTTP; 46 46 } 47 47 48 static ProtectionSpace protectionSpaceFromSoupAuthAnd Message(SoupAuth* soupAuth, SoupMessage* message)48 static ProtectionSpace protectionSpaceFromSoupAuthAndURL(SoupAuth* soupAuth, const URL& url) 49 49 { 50 50 const char* schemeName = soup_auth_get_scheme_name(soupAuth); … … 61 61 scheme = ProtectionSpaceAuthenticationSchemeUnknown; 62 62 63 SoupURI* soupURI = soup_message_get_uri(message); 64 return ProtectionSpace(String::fromUTF8(soup_uri_get_host(soupURI)), soup_uri_get_port(soupURI), 65 protectionSpaceServerTypeFromURI(soupURI, soup_auth_is_for_proxy(soupAuth)), 63 return ProtectionSpace(url.host().toString(), static_cast<int>(url.port().valueOr(0)), 64 protectionSpaceServerTypeFromURL(url, soup_auth_is_for_proxy(soupAuth)), 66 65 String::fromUTF8(soup_auth_get_realm(soupAuth)), scheme); 67 66 } 68 67 69 68 AuthenticationChallenge::AuthenticationChallenge(SoupMessage* soupMessage, SoupAuth* soupAuth, bool retrying, AuthenticationClient* client) 70 : AuthenticationChallengeBase(protectionSpaceFromSoupAuthAnd Message(soupAuth, soupMessage),71 Credential(),// proposedCredentials72 retrying ? 1 : 0,// previousFailureCount73 soupMessage,// failureResponse74 ResourceError::authenticationError(soupMessage))69 : AuthenticationChallengeBase(protectionSpaceFromSoupAuthAndURL(soupAuth, soupURIToURL(soup_message_get_uri(soupMessage))) 70 , Credential() // proposedCredentials 71 , retrying ? 1 : 0 // previousFailureCount 72 , soupMessage // failureResponse 73 , ResourceError::authenticationError(soupMessage)) 75 74 , m_soupMessage(soupMessage) 76 75 , m_soupAuth(soupAuth) -
trunk/Source/WebKit/ChangeLog
r272241 r272301 1 2021-02-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][WPE] Reduce the use of SoupURI in preparation for libsoup3 4 https://bugs.webkit.org/show_bug.cgi?id=221251 5 6 Reviewed by Adrian Perez de Castro. 7 8 * UIProcess/API/glib/WebKitURISchemeRequest.cpp: 9 (webkit_uri_scheme_request_get_scheme): 10 (webkit_uri_scheme_request_get_path): 11 * UIProcess/API/glib/WebKitWebView.cpp: 12 (webkit_web_view_load_uri): 13 1 14 2021-02-02 Per Arne Vollan <pvollan@apple.com> 2 15 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp
r263890 r272301 27 27 #include "WebKitWebView.h" 28 28 #include "WebPageProxy.h" 29 #include <WebCore/GUniquePtrSoup.h>30 29 #include <WebCore/HTTPParsers.h> 31 30 #include <WebCore/MIMETypeRegistry.h> 32 31 #include <WebCore/ResourceError.h> 33 #include <WebCore/URLSoup.h>34 #include <libsoup/soup.h>35 32 #include <wtf/glib/GRefPtr.h> 36 33 #include <wtf/glib/RunLoopSourcePriority.h> … … 65 62 RefPtr<WebPageProxy> initiatingPage; 66 63 CString uri; 67 GUniquePtr<SoupURI> soupURI; 64 CString uriScheme; 65 CString uriPath; 68 66 69 67 GRefPtr<GInputStream> stream; … … 107 105 g_return_val_if_fail(WEBKIT_IS_URI_SCHEME_REQUEST(request), nullptr); 108 106 109 if ( !request->priv->soupURI)110 request->priv-> soupURI = urlToSoupURI(request->priv->task->request().url());111 112 return request->priv-> soupURI->scheme;107 if (request->priv->uriScheme.isNull()) 108 request->priv->uriScheme = request->priv->task->request().url().protocol().toString().utf8(); 109 110 return request->priv->uriScheme.data(); 113 111 } 114 112 … … 143 141 g_return_val_if_fail(WEBKIT_IS_URI_SCHEME_REQUEST(request), nullptr); 144 142 145 if ( !request->priv->soupURI)146 request->priv-> soupURI = urlToSoupURI(request->priv->task->request().url());147 148 return request->priv-> soupURI->path;143 if (request->priv->uriPath.isNull()) 144 request->priv->uriPath = request->priv->task->request().url().path().toString().utf8(); 145 146 return request->priv->uriPath.data(); 149 147 } 150 148 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
r271354 r272301 72 72 #include <jsc/JSCContextPrivate.h> 73 73 #include <WebCore/CertificateInfo.h> 74 #include <WebCore/GUniquePtrSoup.h>75 74 #include <WebCore/JSDOMExceptionHandling.h> 76 75 #include <WebCore/PlatformScreen.h> 77 76 #include <WebCore/RefPtrCairo.h> 78 #include <WebCore/URLSoup.h>79 77 #include <glib/gi18n-lib.h> 78 #include <libsoup/soup.h> 80 79 #include <wtf/SetForScope.h> 81 80 #include <wtf/URL.h> … … 3021 3020 g_return_if_fail(uri); 3022 3021 3023 GUniquePtr<SoupURI> soupURI(soup_uri_new(uri)); 3024 getPage(webView).loadRequest(soupURIToURL(soupURI.get())); 3022 getPage(webView).loadRequest(URL({ }, String::fromUTF8(uri))); 3025 3023 } 3026 3024
Note:
See TracChangeset
for help on using the changeset viewer.