-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
HTTP API - Content-Type should include charset #1817
Comments
@whyrusleeping I found this issue in the HTTP API but it may also exist in gateway. |
@richardschneider was this resolved? |
No it was not resolved
responds with
|
That is actually a big issue. As the header is not set, the http/1.1 standard defines it to be the default ISO-8859-1, while JSON is utf8. So standard compliant clients will treat the response as ISO-8859-1 and may convert it to utf8 to decode the JSON content and then fail. Which now seems to happen to the python api? |
There are also cases where the content-type should be different: x-gzip, x-tar, etc. ipfs-inactive/http-api-spec#46 #2427 #2376 |
…his might relate to IPFS Bug #1817 ipfs/kubo#1817 * Added test for get_pyobject() and add_pyobject() in test/functional/tests.py which works fine. NB: Other tests in tests.py fail, there might be an issue with the multipart code. At the moment test/functional/tests.py is not evaluated by tox because setup.cfg limits tests to tests/unit.
Any progress? go-ipfs/0.4.7 still doesn't include the
|
Same error with go-ipfs/0.4.11
|
This is a more generic issue than just having to do with content encoding. E.g. |
…his might relate to IPFS Bug #1817 ipfs/kubo#1817 * Added test for get_pyobject() and add_pyobject() in test/functional/tests.py which works fine. NB: Other tests in tests.py fail, there might be an issue with the multipart code. At the moment test/functional/tests.py is not evaluated by tox because setup.cfg limits tests to tests/unit.
When returning
text/...
andapplication/json
the API should include thecharset
in the HTTP header.See http://www.w3.org/International/O-HTTP-charset for more derails.
The text was updated successfully, but these errors were encountered: