[
https://issues.apache.org/jira/browse/CXF-8170?focusedWorklogId=353378&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-353378
]
ASF GitHub Bot logged work on CXF-8170:
---------------------------------------
Author: ASF GitHub Bot
Created on: 04/Dec/19 10:11
Start Date: 04/Dec/19 10:11
Worklog Time Spent: 10m
Work Description: bmhm commented on pull request #610: [CXF-8170] Parse
HTTP link headers
URL: https://github.com/apache/cxf/pull/610
- if multiple, comma separated links are present in a single header, split
up by comma and parse each.
- static final Pattern from open-liberty, see
https://github.com/OpenLiberty/open-liberty/pull/8956/commits/e159898d1c9a230f5d71b82414874204a1a66715
Co-authored-by: Adam Anderson <[email protected]>
Signed-off-by: Benjamin Marwell <[email protected]>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 353378)
Remaining Estimate: 0h
Time Spent: 10m
> Failure to parse multiple comma separated links in an HTTP Link header on a
> Jaxrs Response object
> -------------------------------------------------------------------------------------------------
>
> Key: CXF-8170
> URL: https://issues.apache.org/jira/browse/CXF-8170
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.3.4
> Environment: Web
> Reporter: Ben M.
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {color:#FF0000}*Blocker: Specification violation resulting in
> RuntimeException*{color}
> Dear Apache Contributors,
> Recently I authored a pull request for OpenLiberty, which was then created by
> [https://github.com/WhiteCat22.]
>
> Original issue:
> [https://github.com/OpenLiberty/open-liberty/issues/8863]
>
> Original PR:
> [https://github.com/OpenLiberty/open-liberty/pull/8956]
> h2. Description
> If a server returns HTTP link headers, it may do so with responding multiple
> link headers, or just one link header with comma separated fields.
> CXF only recognizes multiple link headers. If only one link header with
> multiple values was supplied, it will throw an unexpected RuntimeException:
> {{java.lang.IllegalArgumentException: Illegal character in query at index
> n}}: (Link header here)
> {{Caused by: java.net.URISyntaxException: Illegal character in query at
> index}}
> h2. Examples
> h3. Working Response:
> {{HTTP/1.1}}
> {{Link: <http://localhost/api/endpoint?offset=0&sysparm_limit=5>;rel="first"}}
> {{Link: <http://localhost/api/endpoint?offset=5&sysparm_limit=5>;rel="next"}}
> {{Link: <http://localhost/api/endpoint?offset=45&sysparm_limit=5>;rel="last"}}
> h3. Not working response:
> {{HTTP/1.1}}
> {{Link:
> <http://localhost/api/endpoint?offset=0&sysparm_limit=5>;rel="first",<http://localhost/api/endpoint?offset=5&sysparm_limit=5>;rel="next",<http://localhost/api/endpoint?offset=45&sysparm_limit=5>;rel="last"}}
> That should have worked, though.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)