Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'

This commit is contained in:
WPT Sync Bot 2021-09-07 11:16:33 +00:00 committed by cybai
parent 35e95f55a1
commit 58e8ee674b
9438 changed files with 266112 additions and 106976 deletions

View file

@ -1,4 +1,3 @@
from six import PY3
from wptserve.utils import isomorphic_encode
# Outputs the request body, with controls and non-ASCII bytes escaped
@ -6,10 +5,8 @@ from wptserve.utils import isomorphic_encode
# As a convenience, CRLF newlines are left as is.
def escape_byte(byte):
# We want a single-char binary string, but in Python 3 we may get an int
# from iterating over bytes.
if PY3:
byte = bytes([byte])
# Convert int byte into a single-char binary string.
byte = bytes([byte])
if b"\0" <= byte <= b"\x1F" or byte >= b"\x7F":
return b"\\x%02x" % ord(byte)
if byte == b"\\":