Bug 862781 - [RFE] [RESTAPI]: missing encoding charset in api json responses
Summary: [RFE] [RESTAPI]: missing encoding charset in api json responses
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.5
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: 3.5.0
Assignee: Ori Liel
QA Contact: bugs@ovirt.org
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-03 14:14 UTC by Gal Leibovici
Modified: 2016-02-10 19:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 13:04:41 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)

Description Gal Leibovici 2012-10-03 14:14:00 UTC
API responses are missing encoding info in HTTP header Content-Type.
It should have a charset value with the encoding of the response body.

For Example: Content-Type: "application/xml; charset=UTF-8"

Comment 4 Juan Hernández 2013-10-10 16:34:37 UTC
I submitted a patch that modifies the application so that it will add the charset to the Content-Type header:

  http://gerrit.ovirt.org/20104

The result is something like this:

  HTTP/1.1 200 OK
  Date: Thu, 10 Oct 2013 15:37:34 GMT
  Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips
  Pragma: No-cache
  Cache-Control: no-cache 
  Expires: Thu, 01 Jan 1970 01:00:00 CET
  Content-Type: application/json;charset=UTF-8
  Vary: Accept-Encoding
  Transfer-Encoding: chunked

However it isn't clear to me if we want to do this for JSON (as in the subject of the bug) or for XML (as in the initial descrition) or for both.

Comment 8 Juan Hernández 2014-02-17 16:51:31 UTC
The solution in comment 4 has been rejected.

Comment 9 Ori Liel 2014-02-26 13:04:41 UTC
Resteasy does not provide a way to dynamically set charset in the response. Only 'hard-coded' solutions seem possible, and since a hard-coded solution has already been rejected (http://gerrit.ovirt.org/20104), we're stuck. It seems not worth the effort at this point.


Note You need to log in before you can comment on or make changes to this bug.