MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _fix

Method _fix

thirdparty/bottle/bottle.py:2595–2601  ·  view source on GitHub ↗
(self, s, encoding=None)

Source from the content-addressed store, hash-verified

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

Callers 2

decodeMethod · 0.95
getunicodeMethod · 0.95

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected