+ String path = req.getPathInfo();
+ try {
+ path = URLDecoder.decode(path, StandardCharsets.UTF_8.name());
+ } catch (UnsupportedEncodingException e) {
+ throw new IllegalArgumentException(e);
+ }
+ String[] pathTokens = path.split("/");
+ String domain = pathTokens[1];
+ String jcrPath = path.substring(domain.length() + 1);
+ return jcrPath;
+ }
+
+ protected List<String> readAcceptHeader(HttpServletRequest req) {
+ List<String> lst = new ArrayList<>();
+ String acceptHeader = req.getHeader(ACCEPT_HTTP_HEADER);
+ if (acceptHeader == null)
+ return lst;
+// Enumeration<String> acceptHeader = req.getHeaders(ACCEPT_HTTP_HEADER);
+// while (acceptHeader.hasMoreElements()) {
+ String[] arr = acceptHeader.split("\\.");
+ for (int i = 0; i < arr.length; i++) {
+ String str = arr[i].trim();
+ if (!"".equals(str))
+ lst.add(str);
+ }
+// }
+ return lst;