(self, s, encoding=None)
| 2593 | recode_unicode = True |
| 2594 | |
| 2595 | def _fix(self, s, encoding=None): |
| 2596 | if isinstance(s, unicode) and self.recode_unicode: # Python 3 WSGI |
| 2597 | return s.encode('latin1').decode(encoding or self.input_encoding) |
| 2598 | elif isinstance(s, bytes): # Python 2 WSGI |
| 2599 | return s.decode(encoding or self.input_encoding) |
| 2600 | else: |
| 2601 | return s |
| 2602 | |
| 2603 | def decode(self, encoding=None): |
| 2604 | """ Returns a copy with all keys and values de- or recoded to match |
no test coverage detected