mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
commit
a38497ac36
@ -26,6 +26,8 @@ matrix:
|
||||
env: TOXENV=py36 BDIST=1 WHEEL=1
|
||||
- python: 3.6
|
||||
env: TOXENV=individual_coverage
|
||||
- python: "3.7-dev"
|
||||
env: TOXENV=py37
|
||||
- language: node_js
|
||||
node_js: "node"
|
||||
before_install:
|
||||
|
@ -63,17 +63,21 @@ def test_unparse():
|
||||
assert url.unparse("https", "foo.com", 443, "") == "https://foo.com"
|
||||
|
||||
|
||||
surrogates = bytes(range(256)).decode("utf8", "surrogateescape")
|
||||
# We ignore the byte 126: '~' because of an incompatibility in Python 3.6 and 3.7
|
||||
# In 3.6 it is escaped as %7E
|
||||
# In 3.7 it stays as ASCII character '~'
|
||||
# https://bugs.python.org/issue16285
|
||||
surrogates = (bytes(range(0, 126)) + bytes(range(127, 256))).decode("utf8", "surrogateescape")
|
||||
|
||||
surrogates_quoted = (
|
||||
'%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F'
|
||||
'%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F'
|
||||
'%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-./'
|
||||
'0123456789%3A%3B%3C%3D%3E%3F'
|
||||
'%40ABCDEFGHIJKLMNO'
|
||||
'PQRSTUVWXYZ%5B%5C%5D%5E_'
|
||||
'%60abcdefghijklmno'
|
||||
'pqrstuvwxyz%7B%7C%7D%7E%7F'
|
||||
'0123456789%3A%3B%3C%3D%3E%3F%40'
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
'%5B%5C%5D%5E_%60'
|
||||
'abcdefghijklmnopqrstuvwxyz'
|
||||
'%7B%7C%7D%7F' # 7E or ~ is excluded!
|
||||
'%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F'
|
||||
'%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F'
|
||||
'%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF'
|
||||
|
Loading…
Reference in New Issue
Block a user