(self, s, encoding=None)
| 1906 | recode_unicode = True |
| 1907 | |
| 1908 | def _fix(self, s, encoding=None): |
| 1909 | if isinstance(s, unicode) and self.recode_unicode: # Python 3 WSGI |
| 1910 | return s.encode('latin1').decode(encoding or self.input_encoding) |
| 1911 | elif isinstance(s, bytes): # Python 2 WSGI |
| 1912 | return s.decode(encoding or self.input_encoding) |
| 1913 | else: |
| 1914 | return s |
| 1915 | |
| 1916 | def decode(self, encoding=None): |
| 1917 | ''' Returns a copy with all keys and values de- or recoded to match |
no test coverage detected