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

Documentation Error for Response parameters #944

Closed
frederikaalund opened this issue Jun 29, 2016 · 5 comments
Closed

Documentation Error for Response parameters #944

frederikaalund opened this issue Jun 29, 2016 · 5 comments
Labels
Milestone

Comments

@frederikaalund
Copy link
Contributor

Currently, the documentation for

class aiohttp.web.Response(*, status=200, headers=None, content_type=None, charset=None, body=None, text=None)

states that

content_type (str) – response’s content type. 'text/plain' if text is passed also, 'application/octet-stream' otherwise.

However, if I do not set the text argument (but set the body argument instead) the content_type is not set at all (whereas the documentation says it should be automatically set to application/octet-stream).

Python 3.5.1 and aiohttp 0.21.0

@avamsi
Copy link
Contributor

avamsi commented Aug 25, 2016

@asvetlov What is the intended behavior in this case?
I mean, is this a documentation error or implementation error?

@asvetlov
Copy link
Member

It's implementation bug.
Would you create a Pull Request for fixing it?
Default content-type for prepared response should be application/octet-stream if the content type was not specified.

@asvetlov asvetlov added this to the 1.0 milestone Aug 25, 2016
@asvetlov asvetlov added the good first issue Good for newcomers label Aug 25, 2016
@avamsi
Copy link
Contributor

avamsi commented Aug 25, 2016

Sure thing

@asvetlov
Copy link
Member

Fixed by #1124

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants