Hi all,
I'm working on some REST messages on another Apache project, Syncope.
I'm having problems with some Response headers.
Currently we build the response using the following method. Consider the
case we have multiple ERROR_CODE values, for example
RequiredValuesMissing and InvalidValues:
for (SyncopeClientException sce : ex.getExceptions()) {
builder.header(RESTHeaders.ERROR_CODE,
sce.getType().getHeaderValue());
...
}
(https://github.com/apache/syncope/blob/1_2_X/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java
- row 156)
In our client, we get the response in this way:
List<Object> exTypesInHeaders =
response.getHeaders().get(RESTHeaders.ERROR_CODE);
(https://github.com/apache/syncope/blob/1_2_X/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
- row 79)
At this point, if we try to access to exTypesInHeaders, we have a list
containing only one entry, with value
"RequiredValuesMissing,InvalidValues" (a string value). What I'm
expecting instead is a list containing two entries, the first one with
value "RequiredValuesMissing" and the second one with value
"InvalidValues".
Is there some problems with multi value headers?
Thanks,
--
Giacomo Lamonaco