Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InternalGetCookies()

CookieCollection System.Net.CookieContainer.InternalGetCookies ( Uri uri)
inlinepackage

Definition at line 620 of file CookieContainer.cs.

621 {
622 if (m_count == 0)
623 {
624 return null;
625 }
626 bool isSecure = uri.Scheme == "https" || uri.Scheme == "wss";
627 int port = uri.Port;
628 CookieCollection cookies = null;
630 List<string> list2 = null;
631 string host = uri.Host;
632 list.Add(host);
633 list.Add("." + host);
634 int num = host.IndexOf('.');
635 if (num == -1)
636 {
637 if (m_fqdnMyDomain != null && m_fqdnMyDomain.Length != 0)
638 {
641 }
642 }
643 else
644 {
645 list.Add(host.Substring(num));
646 if (host.Length > 2)
647 {
648 int num2 = host.LastIndexOf('.', host.Length - 2);
649 if (num2 > 0)
650 {
651 num2 = host.LastIndexOf('.', num2 - 1);
652 }
653 if (num2 != -1)
654 {
655 while (num < num2 && (num = host.IndexOf('.', num + 1)) != -1)
656 {
657 if (list2 == null)
658 {
659 list2 = new List<string>();
660 }
661 list2.Add(host.Substring(num));
662 }
663 }
664 }
665 }
667 if (list2 != null)
668 {
670 }
671 return cookies;
672 }
void Add(TKey key, TValue value)
void BuildCookieCollectionFromDomainMatches(Uri uri, bool isSecure, int port, ref CookieCollection cookies, List< string > domainAttribute, bool matchOnlyPlainCookie)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Net.CookieContainer.BuildCookieCollectionFromDomainMatches(), System.Uri.Host, System.list, System.Net.CookieContainer.m_count, System.Net.CookieContainer.m_fqdnMyDomain, and System.Uri.Port.

Referenced by System.Net.CookieContainer.GetCookieHeader(), and System.Net.CookieContainer.GetCookies().