Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpRequest body has UTF-8 Character causes UnicodeDecodeError ? #19

Closed
jinuljt opened this issue Jun 16, 2014 · 2 comments
Closed

HttpRequest body has UTF-8 Character causes UnicodeDecodeError ? #19

jinuljt opened this issue Jun 16, 2014 · 2 comments
Labels

Comments

@jinuljt
Copy link

jinuljt commented Jun 16, 2014

I modify model_factory.py and it worked.
diff model_factory.py /tmp/old.py
76,80c76
< try:
< raw_body = self.request.body.decode("UTF-8")
< except Exception:
< pass

<

    raw_body = self.request.body
@mtford90
Copy link
Collaborator

Good catch! It looks like I already thought of this for the response body:

content = content.decode('UTF-8')

But missed request bodies.

Feel free to form a pull request, otherwise I'll add this in myself before the next release (which is very soon)

@mtford90
Copy link
Collaborator

Fixed in new version.

pablodiazgutierrez pushed a commit to appfluence/django-silk that referenced this issue Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants