基于HttpHelper万能框架V2.2源码基础上,修复了cookie合并的问题,以及ssl基础连接已关闭的问题。
作者你为什么要举报我?1,cookie修复internalstaticstringGetMergeCookie(stringoldCookie,stringnewCookie){if(!string.IsNullOrEmpty(oldCookie)&&!string.IsNullOrEmpty(newCookie)){if(oldCookie==newCookie)returnoldCookie;else{ListOld=newList(oldCookie.Split(';'));ListNew=newList(newCookie.Split(';'));foreach(stringninNew){foreach(stringoinOld){if(o==n||o.Split('=')[0]==n.Split('=')[0]){Old.Remove(o);break;}}}Listlist=newList(Old);list.AddRange(New);StringBuildersb=newStringBuilder();foreach(varsinlist){if(s!=""){sb.Append(s).Append(";");}}returnsb.ToString();}}elseif(!string.IsNullOrEmpty(oldCookie)){returnoldCookie;}elseif(!string.IsNullOrEmpty(newCookie)){returnnewCookie;}else{return"";}}2,ssl修复ServicePointManager.SecurityProtocol=SecurityProtocolType.Tls|SecurityProtocolType.Ssl3|(SecurityProtocolType)3072|(SecurityProtocolType)192|(SecurityProtocolType)768;
2024/1/27 13:20:42
345KB
HttpHe
1