#686 - Support whitespace in Links header (RFC 5988).
RFC 5988 (https://tools.ietf.org/html/rfc5988#section-5.5) has clear examples of whitespace in link headers. This commit introduces support (and tests) to support these spec cases.
This commit is contained in:
committed by
Greg Turnquist
parent
13db7c7fb2
commit
21719bb041
@@ -35,7 +35,7 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class Links implements Iterable<Link> {
|
||||
|
||||
private static final Pattern LINK_HEADER_PATTERN = Pattern.compile("(<[^>]*>(;\\w+=\"[^\"]*\")+)");
|
||||
private static final Pattern LINK_HEADER_PATTERN = Pattern.compile("(<[^>]*>(;\\s*\\w+=\"[^\"]*\")+)");
|
||||
|
||||
static final Links NO_LINKS = new Links(Collections.emptyList());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user