-
Notifications
You must be signed in to change notification settings - Fork 101
Description
When there's binary in the curl request, sometimes the quotation marks screw up shlex and it won't parse properly.
For example
curl -i -s -k -X $'POST'
-H
--data
$'https://ayk-web.mo.konami.net/ayk/api/User.home'
Traceback (most recent call last):
File "<pyshell#46>", line 1, in
uncurl.parse(curl)
File "D:\python\lib\site-packages\uncurl\api.py", line 74, in parse
parsed_context = parse_context(curl_command)
File "D:\python\lib\site-packages\uncurl\api.py", line 30, in parse_context
tokens = shlex.split(curl_command)
File "D:\python\lib\shlex.py", line 305, in split
return list(lex)
File "D:\python\lib\shlex.py", line 295, in next
token = self.get_token()
File "D:\python\lib\shlex.py", line 105, in get_token
raw = self.read_token()
File "D:\python\lib\shlex.py", line 187, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation
some commands where the binary is a bit nicer, will parse just fine. But others will not.
Is there any bandaid solution to this?