Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Jersey client fails to parse Link header with multiple links #3769

Open
engelebTest opened this issue Feb 5, 2018 · 0 comments
Open

Jersey client fails to parse Link header with multiple links #3769

engelebTest opened this issue Feb 5, 2018 · 0 comments

Comments

@engelebTest
Copy link

engelebTest commented Feb 5, 2018

ClientResponse response ... 
response.getLinks()

fails when server returns a multi-valued link header like

<https://api.github.com/repositories/12345/commits?per_page=100&page=2>; rel="next", <https://api.github.com/repositories/12345/commits?per_page=100&page=2>; rel="last"

java.lang.IllegalArgumentException: java.text.ParseException: Expected separator ';' instead of ','
	at com.sun.jersey.core.header.LinkHeader.valueOf(LinkHeader.java:106)
	at com.sun.jersey.core.header.LinkHeaders.<init>(LinkHeaders.java:62)
	at com.sun.jersey.api.client.WebResourceLinkHeaders.<init>(WebResourceLinkHeaders.java:55)
	at com.sun.jersey.api.client.ClientResponse.getLinks(ClientResponse.java:733)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants