[
https://jira.jboss.org/jira/browse/DNA-513?page=com.atlassian.jira.plugin...
]
Randall Hauch updated DNA-513:
------------------------------
Attachment: DNA-513.2.patch
2nd version of the patch, which supersedes the previous patch.
The new approach is used, where the JSON representation of a property that has binary
values has the property name annotated/suffixed with "/base64/". Also, the
PUT/GET property request and response representations were modified to include the name
and the value(s). Previously, the PUT request and GET response only included the value
(or values), but this didn't allow the sender to say whether the property values were
Base64 encoded. I considered using "Content-Transfer-Encoding" header (with
value of "base64"), but that pretty much means the entire body is encoded.
Works great for PUT/GET with a single property value, but breaks down with an array (since
the '[', ',' and ']' characters aren't encoded.
A few test methods were added, and the changes appear to work. However, before
committing, I'd like some verification that this patch goes in the right direction.
REST server does not correctly encode binary values
---------------------------------------------------
Key: DNA-513
URL:
https://jira.jboss.org/jira/browse/DNA-513
Project: DNA
Issue Type: Bug
Components: Web Application
Affects Versions: 0.5
Reporter: Randall Hauch
Assignee: Randall Hauch
Priority: Blocker
Fix For: 0.6
Attachments: dna-513.1.patch, DNA-513.2.patch
The REST server (or rather web application) does not properly encode binary values in the
JSON results, and instead is embedding the toString() version of the byte[]. The binary
values should instead be encoded in Base64, and the REST client should be able to then
read (or upload) binary values using this approach.
(If the binary value is already a Base64-encoded representation, then the JSON content
will just be a Base64-encoded representation of the value that happens to be
Base64-encoded. Shouldn't be a problem.)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira