Escape logged HTTP data before token replacement
Problem: when LOG_DATA is on and LOG_TOKEN is off, kamaki logs HTTP data, replaces the token (if it is included in the data) and then escapes them to prepare for safe logging. If the data is non-ascii, replacing raises a unicode error. Solution: escape data before replacing the token.
Showing with 2 additions and 1 deletion