Fix string escape.

This commit is contained in:
L. Kärkkäinen 2019-07-29 19:18:15 +03:00
parent fdcba79f45
commit 17bdc3db52

View File

@ -1,7 +1,7 @@
import re
token, quoted = r"([\w!#$%&'*+\-.^_`|~]+)", r'"((?:[^"]|\\")*)"'
parameter = re.compile(f';\s*{token}=(?:{token}|{quoted})', re.ASCII)
parameter = re.compile(fr';\s*{token}=(?:{token}|{quoted})', re.ASCII)
def parse_options_header(value: str):