Skip to content

Add charset parameter to web.Response constructor #593

@asvetlov

Description

@asvetlov

Existing content_type param is for type only, e.g. text/html or application/json.
Charset utf-8 is added ultimately and text is encoded as utf-8.

We need add charset param to constructor (urf-8 by default) and respect the param on text encoding.

Check for content_type should be added also to forbid ; (mark for charset) in the value.

The patch is trivial but should be proposed with tests.

Any volunteers for making Pull Request?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions