日期:2014-05-17 浏览次数:20872 次
public static list<Cookie> get(string url, bool isRemove)
{
list<Cookie> cookies = new list<Cookie>();
if (url != null && url.Length != 0)
{
int index = url.IndexOf("://", StringComparison.Ordinal);
if (index != -1)
{
int pathIndex = url.IndexOf('/', index += 3);
string urlDomain = pathIndex == -1 ? url.Substring(index) : url.Substring(index, pathIndex - index);
if (urlDomain.Length != 0)
{
bool isCookie;
Cookie newCookie;
int lines, startIndex, removeCount;
long expiresLow, expiresHigh;
DateTime expires;
string[] cookieInfos;
bool[] isRemoves;
string domain, path, urlPath = pathIndex == -1 ? "/" : url.Substring(pathIndex);
urlDomain = "." + urlDomain;
&nb