-
Notifications
You must be signed in to change notification settings - Fork 38
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
take unicode for Response.body instead of str #254
Comments
This was referenced Oct 11, 2013
The body can be either unicode or str already. Just the default encoding when unicode does not make any sense. See https://github.com/gittip/aspen-python/blob/master/aspen/http/response.py#L112. |
chadwhitacre
added a commit
that referenced
this issue
May 1, 2014
If a Response body is a unicode we want to encode it using self.charset when sending to the wire. For static resources the body should be a byte string so we shouldn't need to encode it at all.
This is fixed in #334. |
Changaco
pushed a commit
that referenced
this issue
Mar 11, 2016
If a Response body is a unicode we want to encode it using self.charset when sending to the wire. For static resources the body should be a byte string so we shouldn't need to encode it at all.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This came up on gratipay/gratipay.com#158 and iirc @pjz mentioned it while sprinting on #225.
I'm open to this but I'd prefer that it be either
unicode
orstr
, not both.The text was updated successfully, but these errors were encountered: