Commit 5f751729 authored by wang's avatar wang

cronet

parent b281aa38
......@@ -51,10 +51,10 @@ func (c *Client) Start() error {
var cookies []*http.Cookie
cks := strings.Split(cookie, "; ")
for _, ck := range cks {
t := strings.Split(strings.TrimSpace(ck), "=")
t := strings.Index(ck, "=")
cookies = append(cookies, &http.Cookie{
Name: t[0],
Value: strings.ReplaceAll(strings.Join(t[1:], "="), ";", ""),
Name: ck[:t],
Value: ck[t+1:],
})
}
c.Jar.SetCookies(uri, cookies)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment