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
I am using Bottle v0.12.3 and encounter the following exception when I install the compression plugin.
Traceback (most recent call last):
File "/path/to/bottle.py", line 862, in _handle
return route.call(**args)
File "/path/to/bottle.py", line 1727, in wrapper
rv = callback(*a, **ka)
File "/path/to/bottle_compressor.py", line 190, in wrapper
ctype = content_type.split(';')[0]
AttributeError: 'NoneType' object has no attribute 'split'
As it turns out, the problem is with this block of code when the content type is not set explicitly in routes, since the Bottle response object returns None for Content-Type in that case.
since the headerlist does contain the default content type (text/htm).
This could also be viewed as a Bottle bug, since it would be sensible that the header property would return the default content type in case it is not set explicitly in the route.
The text was updated successfully, but these errors were encountered:
I am using Bottle v0.12.3 and encounter the following exception when I install the compression plugin.
As it turns out, the problem is with this block of code when the content type is not set explicitly in routes, since the Bottle
response
object returnsNone
for Content-Type in that case.I managed to get it working by replacing the line
with
since the
headerlist
does contain the default content type (text/htm).This could also be viewed as a Bottle bug, since it would be sensible that the header property would return the default content type in case it is not set explicitly in the route.
The text was updated successfully, but these errors were encountered: