mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Sync: Add HTTP Cookie File header on temporary cookie file
The .gitcookies file generated by googlesource.com does not have the header: # (Netscape) HTTP Cookie File which causes python's MozillaCookieJar.load to fail with the error: "does not look like a Netscape format cookies file" Prepend the expected header onto the generated cookie file. We don't bother to check if the header already exists on the file; repeating it does not cause any problem. Bug: Issue 207 Change-Id: I7d39720a1d36a6aae00f70691156514ebc04e579
This commit is contained in:
parent
b1ad2190a2
commit
4c5f74e452
@ -916,6 +916,7 @@ class PersistentTransport(xmlrpc.client.Transport):
|
|||||||
# stripping those prefixes away.
|
# stripping those prefixes away.
|
||||||
if cookiefile:
|
if cookiefile:
|
||||||
tmpcookiefile = tempfile.NamedTemporaryFile()
|
tmpcookiefile = tempfile.NamedTemporaryFile()
|
||||||
|
tmpcookiefile.write("# HTTP Cookie File")
|
||||||
try:
|
try:
|
||||||
with open(cookiefile) as f:
|
with open(cookiefile) as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
|
Loading…
Reference in New Issue
Block a user