mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
Add header line when writing to cookies.txt
When Python is reading a Netscape-format cookies.txt file, it seems to
require an initial line that looks like this:
# Netscape HTTP Cookie File
This commit is contained in:
parent
3c6659f43a
commit
0decfe98b7
1 changed files with 1 additions and 0 deletions
|
|
@ -163,6 +163,7 @@ class HTTP::CookieJar
|
||||||
# Write cookies to Mozilla cookies.txt-style IO stream and return
|
# Write cookies to Mozilla cookies.txt-style IO stream and return
|
||||||
# self.
|
# self.
|
||||||
def dump_cookiestxt(io)
|
def dump_cookiestxt(io)
|
||||||
|
io.puts "# Netscape HTTP Cookie File"
|
||||||
to_a.each do |cookie|
|
to_a.each do |cookie|
|
||||||
io.print cookie.to_cookiestxt_line
|
io.print cookie.to_cookiestxt_line
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue