cenobites / flask-jsonrpc

Basic JSON-RPC implementation for your Flask-powered sites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unicode error

NewLanded opened this issue · comments

There is an error at function extract_raw_data_request._extract_raw_data_request in file helpers.py, the not right code is return list(request.form.to_dict().keys())[0], this sentence maybe get a str object then will meet an Unicode Error, but I think it should be a bytes object.

I suggest correct it as return list(request.form.to_dict().keys())[0] if instance(list(request.form.to_dict().keys())[0], bytes) else list(request.form.to_dict().keys())[0].encode()

Hello,

What is your Python version?

Thank you.

Hi,

My Python version is 3.4.4, Flask-JSONRPC version is 0.3.1, and Flask version is 0.12.2.

Thanks