RESOLVED FIXED 177105
[Curl] Move Authentication related tasks into AuthenticationChallenge class
https://bugs.webkit.org/show_bug.cgi?id=177105
Summary [Curl] Move Authentication related tasks into AuthenticationChallenge class
Basuke Suzuki
Reported 2017-09-18 15:18:33 PDT
Currently those codes are in ResourceHandle or related companion. It will be reused with NetworkLoadTask so that it should be separated from them.
Attachments
PATCH (13.35 KB, patch)
2017-09-18 16:09 PDT, Basuke Suzuki
achristensen: review-
achristensen: commit-queue-
fix (13.37 KB, patch)
2017-09-19 13:01 PDT, Basuke Suzuki
no flags
Basuke Suzuki
Comment 1 2017-09-18 16:09:50 PDT
Alex Christensen
Comment 2 2017-09-18 21:07:43 PDT
Comment on attachment 321147 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=321147&action=review > Source/WebCore/platform/network/curl/AuthenticationChallenge.h:53 > RefPtr<AuthenticationClient> m_authenticationClient; FYI, we're kind of moving away from each challenging having a client in favor of a challenge being received with a completion handler so the challenge itself doesn't know what is to be done with it. So in a hopefully-not-too-distant future once everyone has adopted the NetworkSession abstraction which is similar to the async ResourceHandleClient callbacks and we've removed ResourceHandle in favor of everything being asynchronous, we will organize it more like that. This is fine for now, though. > Source/WebCore/platform/network/curl/AuthenticationChallengeCurl.cpp:69 > + int realmPos = authHeader.find(realmString); > + if (realmPos > 0) { find returns a size_t, and we should check it against notFound. > Source/WebCore/platform/network/curl/ResourceHandleCurlDelegate.h:77 > + void didReceiveAllHeaders(long httpCode, long long contentLength, long connectPort, long availableHttpAuth); ports should be uint16_t or std::optional<uint16_t> if the underlying logic knows to use the default port for the protocol if there is none.
Basuke Suzuki
Comment 3 2017-09-19 10:51:55 PDT
> FYI, we're kind of moving away from each challenging having a client in > favor of a challenge being received with a completion handler so the > challenge itself doesn't know what is to be done with it. So in a > hopefully-not-too-distant future once everyone has adopted the > NetworkSession abstraction which is similar to the async > ResourceHandleClient callbacks and we've removed ResourceHandle in favor of > everything being asynchronous, we will organize it more like that. This is > fine for now, though. Fine for us right now. We understand the direction and that further changes are waiting. > > Source/WebCore/platform/network/curl/AuthenticationChallengeCurl.cpp:69 > > + int realmPos = authHeader.find(realmString); > > + if (realmPos > 0) { > > find returns a size_t, and we should check it against notFound. my bad. > > Source/WebCore/platform/network/curl/ResourceHandleCurlDelegate.h:77 > > + void didReceiveAllHeaders(long httpCode, long long contentLength, long connectPort, long availableHttpAuth); > > ports should be uint16_t or std::optional<uint16_t> if the underlying logic > knows to use the default port for the protocol if there is none. Okay for our code base, but eventually we will create a ProtectionSpace object, which is the world where `port` is `int`. We don't want to change them with this patch.
Basuke Suzuki
Comment 4 2017-09-19 13:01:18 PDT
Basuke Suzuki
Comment 5 2017-09-19 13:32:06 PDT
WebKit Commit Bot
Comment 6 2017-09-19 13:45:12 PDT
Comment on attachment 321233 [details] fix Clearing flags on attachment: 321233 Committed r222223: <http://trac.webkit.org/changeset/222223>
WebKit Commit Bot
Comment 7 2017-09-19 13:45:14 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2017-09-27 12:25:12 PDT
Note You need to log in before you can comment on or make changes to this bug.