Fix cookies not being sent after a redirected response (#22178)
Fix cookies not being sent after a redirected response (#22178)

Summary:
Fixes https://github.com/facebook/react-native/issues/19376

On iOS, the `HTTPShouldHandleCookies` boolean has no effect when custom cookies are set (see https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1415485-httpshouldhandlecookies?preferredLanguage=occ). Setting custom cookies prevents the cookies of a redirect response from being re-used in the subsequent request.
This is why issue https://github.com/facebook/react-native/issues/19376 is opened.
The fix is to intercept the redirect request, and to manually set the cookies. This effectively makes the Android and iOS behaviours converge.

Changelog:
----------
  [iOS] [Fixed] - Fix cookies not being sent on iOS after redirect
Pull Request resolved: https://github.com/facebook/react-native/pull/22178

Differential Revision: D13191961

Pulled By: shergin

fbshipit-source-id: 4445a2499034a9846c6d7c37c1f1b72c9fd30129

myntra/react-native,javache/react-native,pandiaraj44/react-native,facebook/react-native,exponentjs/react-native,hoangpham95/react-native,hammerandchisel/react-native,javache/react-native,arthuralee/react-native,exponentjs/react-native,facebook/react-native,pandiaraj44/react-native,pandiaraj44/react-native,exponentjs/react-native,javache/react-native,hammerandchisel/react-native,hammerandchisel/react-native,janicduplessis/react-native,exponent/react-native,hammerandchisel/react-native,exponent/react-native,pandiaraj44/react-native,facebook/react-native,myntra/react-native,exponent/react-native,exponent/react-native,hammerandchisel/react-native,janicduplessis/react-native,pandiaraj44/react-native,hammerandchisel/react-native,facebook/react-native,arthuralee/react-native,exponent/react-native,janicduplessis/react-native,hoangpham95/react-native,facebook/react-native,myntra/react-native,arthuralee/react-native,hoangpham95/react-native,hoangpham95/react-native,arthuralee/react-native,exponentjs/react-native,exponent/react-native,myntra/react-native,hoangpham95/react-native,myntra/react-native,hoangpham95/react-native,exponent/react-native,exponentjs/react-native,hammerandchisel/react-native,pandiaraj44/react-native,facebook/react-native,myntra/react-native,exponentjs/react-native,facebook/react-native,janicduplessis/react-native,myntra/react-native,facebook/react-native,javache/react-native,javache/react-native,hoangpham95/react-native,hoangpham95/react-native,exponentjs/react-native,pandiaraj44/react-native,javache/react-native,exponent/react-native,exponentjs/react-native,myntra/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,myntra/react-native,facebook/react-native,javache/react-native,pandiaraj44/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,arthuralee/react-native,hammerandchisel/react-native