[Deluge] #3521: Content-type's charset should be accepted and probably ignored for jsonrpc communication

6 views
Skip to first unread message

Deluge

unread,
May 28, 2022, 3:29:23 AM5/28/22
to delug...@googlegroups.com
#3521: Content-type's charset should be accepted and probably ignored for jsonrpc
communication
----------------------------+---------------------
Reporter: ibizaman | Type: bug
Status: new | Priority: minor
Milestone: needs verified | Component: Unknown
Version: 2.0.0 | Keywords:
----------------------------+---------------------
Sending a request with {{{'Content-Type: application/json'}}} works fine:
{{{#!sh
$ curl 'http://127.0.0.1:8112/json' -X POST \
-H 'Content-Type: application/json' \
--data-raw '{"method":"daemon.get_version","params":[],"id":1}'
{ "result": null
, "error": { "message": "Not authenticated"
, "code": 1
}
, "id": 1}
}}}

But it should work too with {{{'Content-Type:
application/json;charset=utf-8'}}} although it doesn't:
{{{#!sh
$ curl 'http://127.0.0.1:8112/json' -X POST \
-H 'Content-Type: application/json;charset=utf-8' \
--data-raw '{"method":"daemon.get_version","params":[],"id":1}'
{ "result": null
, "id": null
, "error": { "code": 5
, "message": "JSONException: Invalid JSON request content-type:
application/json;charset=utf-8"
}
}

This is a valid content-type as per
https://greenbytes.de/tech/webdav/rfc2616.html#header.content-type
I believe I know how to fix this and will create a PR for it.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3521>
Deluge <https://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Jun 12, 2022, 11:14:51 AM6/12/22
to delug...@googlegroups.com
#3521: Content-type's charset should be accepted and probably ignored for jsonrpc
communication
-----------------------+--------------------
Reporter: ibizaman | Owner:
Type: bug | Status: closed
Priority: minor | Milestone: 2.1.0
Component: Web UI | Version: 2.0.0
Resolution: Fixed | Keywords:
-----------------------+--------------------
Changes (by Cas):

* status: new => closed
* resolution: => Fixed
* component: Unknown => Web UI
* milestone: needs verified => 2.1.0


Comment:

Merged fix: [b0dba97fec8dccdaa45f1112f84068cf7415a4ed]

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3521#comment:1>

Reply all
Reply to author
Forward
0 new messages