code: def _escape_headers(self, headers):
          
          for key, val in headers.items():
              try:
                  val = val.replace('\\', '\\\\').replace('\n', '\\n').replace(':', '\\c').replace('\r', '\\r')
              except:
                  pass
              headers[key] = val
docs: :param dict(str,str) headers: