Skip to content

Commit

Permalink
Update Atom link protocol check in CapabilitiesLinkFixer
Browse files Browse the repository at this point in the history
  • Loading branch information
josegar74 committed Sep 17, 2024
1 parent 7364c3c commit ca2f39b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ public DocumentLink() {
"INSPIRE Atom".toLowerCase()
});

public static List<String> validAtomProtocols = Arrays.asList(new String[]{
"https://tools.ietf.org/html/rfc4287".toLowerCase(),
"ATOM Syndication Format".toLowerCase(),
"atom",
"INSPIRE Atom".toLowerCase()
});

public static List<String> validAppProfiles = Arrays.asList(new String[]{
"Download Service".toLowerCase(),
"View Service".toLowerCase(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public boolean isAtom(String link, DocumentLink documentLink) {
if ((documentLink == null) || (documentLink.getProtocol() == null) || (documentLink.getProtocol().isEmpty()))
return false;
String protocol = documentLink.getProtocol().toLowerCase();

if (DocumentLink.validAtomProtocols.contains(protocol))
return true;
if (protocol.endsWith("-rss"))
return true;
if (protocol.endsWith("atom"))
Expand Down

0 comments on commit ca2f39b

Please sign in to comment.