internal static IEnumerable<string> GetCookiesFromHeader(string setCookieHeader) { List<string> cookieStrings = new List<string>(); try { CookieParser parser = new CookieParser(setCookieHeader); string cookieString; while ((cookieString = parser.GetString()) != null) { cookieStrings.Add(cookieString); } } catch (InternalCookieException) { // TODO: We should log this. But there isn't much we can do about it other // than to drop the rest of the cookies. } return cookieStrings; }
internal static IEnumerable <string> GetCookiesFromHeader(string setCookieHeader) { List <string> cookieStrings = new List <string>(); try { CookieParser parser = new CookieParser(setCookieHeader); string cookieString; while ((cookieString = parser.GetString()) != null) { cookieStrings.Add(cookieString); } } catch (InternalCookieException) { // TODO: We should log this. But there isn't much we can do about it other // than to drop the rest of the cookies. } return(cookieStrings); }