[infinispan-issues] [JBoss JIRA] (ISPN-8979) Accept header documentation needs to be clarified

Gustavo Fernandes (JIRA) issues at jboss.org
Wed May 2 12:26:00 EDT 2018


    [ https://issues.jboss.org/browse/ISPN-8979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569914#comment-13569914 ] 

Gustavo Fernandes edited comment on ISPN-8979 at 5/2/18 12:25 PM:
------------------------------------------------------------------

This should be written as:

{panel:title=Accept: text/plain;q=0.7, application/json;q=0.8, */*;q=0.6}
Infinispan will give precedence to the JSON format (higher priority 0.8) during the negotiation. If the format with higher priority is not supported by the server, the next candidate format will be text/plain (second highest priority 0.7), and in case not supported as well, it'd fall back to \*/\*, that will pick a format suitable for displaying automatically based on the cache configuration. After the negotiation is done,  the operation will carry on in the chosen format, and eventual posterior errors will not cause the server to try the next format.  
{panel}






was (Author: gustavonalle):
This should be written as:

{panel:title=Accept: text/plain;q=0.7, application/json;q=0.8, */*;q=0.6}
Infinispan will give precedence to the JSON format (higher priority 0.8) during the negotiation. If the format with higher priority is not supported by the server, the next format picked will be text/plain (second highest priority 0.7), and finally it falls back to \*/\*, that will pick a format suitable for displaying automatically based on the cache configuration. After the negotiation is done,  the operation will carry on in the chosen format, and eventual posterior errors will not cause the server to try the next format.  
{panel}





> Accept header documentation needs to be clarified 
> --------------------------------------------------
>
>                 Key: ISPN-8979
>                 URL: https://issues.jboss.org/browse/ISPN-8979
>             Project: Infinispan
>          Issue Type: Enhancement
>            Reporter: Diego Lovison
>            Assignee: Gustavo Fernandes
>
> The "Accept header" documentation http://infinispan.org/docs/stable/user_guide/user_guide.html#rest.accept has the following information
> ----
> will cause Infinispan to try first to return content in JSON format (higher priority 0.8). If it’s not possible to convert the storage format to JSON, next format tried will be text/plain (second highest priority 0.7), and finally it falls back to */*, that will pick a format suitable for displaying automatically based on the cache configuration.
> ----
> But it was not designed to be working on this way.
> The commit https://github.com/diegolovison/infinispan/commit/6a57964f26d6742e8ec29cc00ff95c1e272689c5 has an invalid xml content with a second priority format equals "text/plain".
> The xml is invalid but the text is valid.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the infinispan-issues mailing list