Skip to content

Commit

Permalink
Support Werkzeug 3 by using a default encoding of UTF-8
Browse files Browse the repository at this point in the history
This fixes the removal of `charset` attribute of requests from pallets/werkzeug#2602
introduced by Werkzeug 2.3.0 (https://werkzeug.palletsprojects.com/en/3.0.x/changes/#version-2-3-0)
  • Loading branch information
joeyespo committed Oct 12, 2023
1 parent 3c3f852 commit 2784eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grip/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def render(self, route=None):
route = '/'
with self.test_client() as c:
response = c.get(route, follow_redirects=True)
encoding = response.charset
encoding = getattr(response, 'charset', 'utf-8')
return response.data.decode(encoding)

def run(self, host=None, port=None, debug=None, use_reloader=None,
Expand Down

0 comments on commit 2784eb2

Please sign in to comment.