users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Link toString method

From: Julian Reschke <julian.reschke_at_gmx.de>
Date: Thu, 14 Feb 2013 15:08:22 +0100

On 2013-02-14 15:02, Sergey Beryozkin wrote:
> On 14/02/13 13:57, Santiago Pericas-Geertsen wrote:
>>
>> On Feb 14, 2013, at 6:01 AM, Sergey Beryozkin<sberyozkin_at_talend.com>
>> wrote:
>>
>>> Hi,
>>>
>>> The documentation for Link.toString says all parameter values have to
>>> be quoted, while RFC 5988 allows for some of them, like 'rel' and
>>> 'type' have no quotes,
>>>
>>> I don't mind much whether Link.toString() quotes all parameter values
>>> or not, but would to clarify if it is expected indeed as one might
>>> imagine some of Link consumers failing to read say a quoted 'rel'
>>> value...
>>
>> I'm not sure I follow. Shouldn't a consumer of this grammar support
>> both quoted and unquoted flavors to be compliant?
>
> Sure, response from Julian made it clear to me.
> Let me ask this next:
>
> I guess Link.Builder should be able to get "<http://bar>;rel=next" and
> produce Link.
>
> Do we need to worry about Link.toString() producing a slightly different
> string:
>
> "<http://bar>;rel=\"next\""
>
> ?

The Link header field parser should accept all strings valid according
to RFC 5988 + erratum; thus it should not matter how the string was
produced.

Best regards, Julian