diff -r 98376cf9133d Lib/http/cookiejar.py --- a/Lib/http/cookiejar.py Tue Jan 06 22:16:10 2015 -0800 +++ b/Lib/http/cookiejar.py Wed Jan 07 10:54:05 2015 +0100 @@ -1996,9 +1996,12 @@ # last field may be absent, so keep any trailing tab if line.endswith("\n"): line = line[:-1] + sline = line.strip() + # support HttpOnly cookies (as stored by curl or old Firefox). + if sline.startswith("#HttpOnly_"): + line = sline[10:] # skip comments and blank lines XXX what is $ for? - if (line.strip().startswith(("#", "$")) or - line.strip() == ""): + elif (sline.startswith(("#", "$")) or sline == ""): continue domain, domain_specified, path, secure, expires, name, value = \