Skip to content

PY3 util.StringField constructor with bytes string #83

@rohan-97

Description

@rohan-97

About Module : util.py
Sub Module : StringField class constructor

Environment Info:
OS NAME="Debian GNU/Linux"
OS VERSION="9 (stretch)"
Python Version: python3.5
Apache Version : 2.4.25

If we pass bytes to constructor then the output is bytes string with extra b' characters.
e.g if I pass b'user' in constructor of StringField class, the object created has string b"b'user'" which should be b'user'

it seems that error is on line (lib/python/mod_python/util.py:158) before type casting into string we should make sure it is not byte string and if it is byte string we should decode it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions