sbp commented on PR #820:
URL: 
https://github.com/apache/tooling-trusted-releases/pull/820#issuecomment-4000083397

   Werkzeug already does this automatically:
   
   ```python
           if content_type is None:
               if mimetype is None and "content-type" not in self.headers:
                   mimetype = self.default_mimetype
               if mimetype is not None:
                   mimetype = get_content_type(mimetype, "utf-8")
   ```
   
   From `werkzeug/sansio/response.py`, where `get_content_type` has:
   
   ```python
       if (
           mimetype.startswith("text/")
           or mimetype in _charset_mimetypes
           or mimetype.endswith("+xml")
       ):
           mimetype += f"; charset={charset}"
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to