linkchecker/tests/checker/cgi-bin/input2cookies.py

11 lines
197 B
Python
Executable file

#!/usr/bin/python3
from http import cookies
import sys
import urllib.parse
C = cookies.SimpleCookie()
for field, value in urllib.parse.parse_qsl(sys.stdin.read()):
C[field] = value
print(C)