[Cronet] Cronet should comply with app's CookieAcceptPolicy instead of changing it. |
|||
Issue descriptionRecent refactoring of CookieStoreIOS ( issue 679736 ) has removed the method CookieStoreIOS::CreateCookieStore which was used in both CrNet and Cronet. The removed method was setting [cookie_storage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; on the shared cookie storage, and its removal has broken cronet tests: Thread 10 Crashed:: Chrome Network IO Thread 0 org.chromium.net.Cronet 0x0000000106062c94 base::debug::BreakDebugger() + 20 1 org.chromium.net.Cronet 0x00000001060cca61 logging::LogMessage::~LogMessage() + 4369 2 org.chromium.net.Cronet 0x00000001060c9695 logging::LogMessage::~LogMessage() + 21 3 org.chromium.net.Cronet 0x0000000105fdb072 net::CookieStoreIOS::SetCookieWithOptionsAsync(GURL const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, net::CookieOptions const&, base::Callback<void (bool), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) + 690 4 org.chromium.net.Cronet 0x0000000106eaab20 net::URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete(int) + 2128 5 org.chromium.net.Cronet 0x0000000106ea984d net::URLRequestHttpJob::OnStartCompleted(int) + 2573 6 org.chromium.net.Cronet 0x0000000106eb3847 void base::internal::FunctorTraits<void (net::URLRequestHttpJob::*)(int), void>::Invoke<net::URLRequestHttpJob*, int>(void (net::URLRequestHttpJob::*)(int), net::URLRequestHttpJob*&&, int&&) + 151 7 org.chromium.net.Cronet 0x0000000106eb374f void base::internal::InvokeHelper<false, void>::MakeItSo<void (net::URLRequestHttpJob::* const&)(int), net::URLRequestHttpJob*, int>(void (net::URLRequestHttpJob::* const&&&)(int), net::URLRequestHttpJob*&&, int&&) + 95 8 org.chromium.net.Cronet 0x0000000106eb36dd void base::internal::Invoker<base::internal::BindState<void (net::URLRequestHttpJob::*)(int), base::internal::UnretainedWrapper<net::URLRequestHttpJob> >, void (int)>::RunImpl<void (net::URLRequestHttpJob::* const&)(int), std::__1::tuple<base::internal::UnretainedWrapper<net::URLRequestHttpJob> > const&, 0ul>(void (net::URLRequestHttpJob::* const&&&)(int), std::__1::tuple<base::internal::UnretainedWrapper<net::URLRequestHttpJob> > const&&&, base::IndexSequence<0ul>, int&&) + 93 9 org.chromium.net.Cronet 0x0000000106eb3624 base::internal::Invoker<base::internal::BindState<void (net::URLRequestHttpJob::*)(int), base::internal::UnretainedWrapper<net::URLRequestHttpJob> >, void (int)>::Run(base::internal::BindStateBase*, int&&) + 68 10 org.chromium.net.Cronet 0x0000000105f9264a base::internal::RunMixin<base::Callback<void (int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> >::Run(int) const + 74 11 org.chromium.net.Cronet 0x00000001068543fa net::HttpCache::Transaction::DoLoop(int) + 5498 Ideally Cronet should NOT change Cookie Accept Policy set by the app, but instead comply with it, possibly by using different Cookie Store implementation.
,
Feb 14 2017
I believe https://codereview.chromium.org/2684933009/ should have already fixed the issue. mef@, can you confirm?
,
Feb 14 2017
Corrrect, the original problem introduced in issue 679736 is fixed by https://codereview.chromium.org/2684933009/ however it is unclear that current behavior (setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways) is always desired. What if the application doesn't want to share its cookies with other apps on the system?
,
Feb 15 2017
Doesn't it use https://cs.chromium.org/chromium/src/ios/net/cookies/cookie_store_ios_persistent.h then? If I am correct, CookieMonster is used as a backend and cookies are not synchronized with system cookies then.
,
Feb 16 2017
Currently there are no settings in Cronet API to let app choose between using cookie monster, system cookie store or keeping them in memory only.
,
Mar 2 2017
Currently our networking stack relies on the following settings: 1) disable cache at HTTP level; 2) disable Cookies (i.e. HTTPShouldSetCookies = NO and HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicyNever). could we add APIs to support these?
,
Jan 3
|
|||
►
Sign in to add a comment |
|||
Comment 1 by pkl@chromium.org
, Feb 13 2017Owner: maksim.sisov@chromium.org
Status: Assigned (was: Untriaged)