Closed osxtest closed 2 years ago
the original way of handling Accept-Encoding header will turn out result below, which is not perfect enough
Accept-Encoding
>>> 'gzip, br, compress'.replace('br', '') 'gzip, , compress'
so I manage another way to solve that problem and open this PR, tests are down below
>>> vt = ["gzip,br", "br, gzip", "gzip, br,compress", "br"] >>> for v in vt: ... vl = [x.strip(" ") for x in v.split(",")] ... print(", ".join(list(filter(lambda x: x != "br", vl)))) ... gzip gzip gzip, compress >>>
the original way of handling
Accept-Encoding
header will turn out result below, which is not perfect enoughso I manage another way to solve that problem and open this PR, tests are down below