Show More
@@ -160,12 +160,10 b' def parserequestfromenv(env, reponame=No' | |||||
160 | # TODO enable this once we fix internal violations. |
|
160 | # TODO enable this once we fix internal violations. | |
161 | # wsgiref.validate.check_environ(env) |
|
161 | # wsgiref.validate.check_environ(env) | |
162 |
|
162 | |||
163 | # PEP-0333 states that environment keys and values are native strings |
|
163 | # PEP-0333 states that environment keys and values are native strings. | |
164 | # (bytes on Python 2 and str on Python 3). The code points for the Unicode |
|
164 | # The code points for the Unicode strings on Python 3 must be between | |
165 | # strings on Python 3 must be between \00000-\000FF. We deal with bytes |
|
165 | # \00000-\000FF. We deal with bytes in Mercurial, so mass convert string | |
166 |
# |
|
166 | # keys and values to bytes. | |
167 | if pycompat.ispy3: |
|
|||
168 |
|
||||
169 |
|
|
167 | def tobytes(s): | |
170 |
|
|
168 | if not isinstance(s, str): | |
171 |
|
|
169 | return s |
General Comments 0
You need to be logged in to leave comments.
Login now