about summary refs log tree commit diff
path: root/test/testdata
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2020-05-05 04:19:33 +0700
committerSergey M․ <dstftw@gmail.com>2020-05-05 04:21:25 +0700
commitc380cc28c4e94b4b61db7f86d35e48197b407266 (patch)
tree39b6f7fcf913ea8ef4775ea1d54fe86793e32539 /test/testdata
parentf7f304910d1c1fc19313231d424daba304e1de71 (diff)
downloadyoutube-dl-c380cc28c4e94b4b61db7f86d35e48197b407266.tar.gz
youtube-dl-c380cc28c4e94b4b61db7f86d35e48197b407266.tar.xz
youtube-dl-c380cc28c4e94b4b61db7f86d35e48197b407266.zip
[utils] Improve cookie files support
+ Add support for UTF-8 in cookie files
* Skip malformed cookie file entries instead of crashing (invalid entry len, invalid expires at)
Diffstat (limited to 'test/testdata')
-rw-r--r--test/testdata/cookies/malformed_cookies.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/testdata/cookies/malformed_cookies.txt b/test/testdata/cookies/malformed_cookies.txt
new file mode 100644
index 000000000..17bc40354
--- /dev/null
+++ b/test/testdata/cookies/malformed_cookies.txt
@@ -0,0 +1,9 @@
+# Netscape HTTP Cookie File
+# http://curl.haxx.se/rfc/cookie_spec.html
+# This is a generated file!  Do not edit.
+
+# Cookie file entry with invalid number of fields - 6 instead of 7
+www.foobar.foobar	FALSE	/	FALSE	0	COOKIE
+
+# Cookie file entry with invalid expires at
+www.foobar.foobar	FALSE	/	FALSE	1.7976931348623157e+308	COOKIE	VALUE