docs: def set_data(self, value):
          """Sets a new string as response.  The value set must either by a
          unicode or bytestring.  If a unicode string is set it's encoded
          automatically to the charset of the response (utf-8 by default).
  
          .. versionadded:: 0.9
          """
          # if an unicode string is set, it's encoded directly so that we
          # can set the content length
          if isinstance(value, text_type):
              value = value.encode(self.charset)
          else:
              value = bytes(value)
          self.response = [value]
          if self.automatically_set_content_length:
              self.headers['Content-Length'] = str(len(value))