You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
The middleware looks for a header Content-Type whose value is exactlytext/html. However Flask’s default is text/html; charset=utf-8. Using this middleware as-is in a Flask app thus doesn’t work.
The text was updated successfully, but these errors were encountered:
Well even if I fix this the middleware still fails:
return [self.minifier.minify(*html)]
File "...-py3.9/lib/python3.9/site-packages/htmlmin/main.py", line 162, in minify
self.input(*input)
File "...-py3.9/lib/python3.9/site-packages/htmlmin/main.py", line 174, in input
self._parser.feed(i)
File "...-py3.9/lib/python3.9/site-packages/htmlmin/python3html/parser.py", line 124, in feed
self.rawdata = self.rawdata + data
TypeError: can only concatenate str (not "bytes") to str
Hello,
The middleware looks for a header
Content-Type
whose value is exactlytext/html
. However Flask’s default istext/html; charset=utf-8
. Using this middleware as-is in a Flask app thus doesn’t work.The text was updated successfully, but these errors were encountered: