From c1a3274460680f8795469a43a5509cca08889db3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 20 Nov 2020 01:28:47 +0300 Subject: Process Referer header without javax.servlet reference * starting to remove javax.servlet dependency --- src/main/java/com/juick/util/WebUtils.java | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/main/java/com/juick/util') diff --git a/src/main/java/com/juick/util/WebUtils.java b/src/main/java/com/juick/util/WebUtils.java index 3a8c7620..a8e690ed 100644 --- a/src/main/java/com/juick/util/WebUtils.java +++ b/src/main/java/com/juick/util/WebUtils.java @@ -17,8 +17,6 @@ package com.juick.util; -import javax.servlet.http.HttpServletRequest; -import java.util.Optional; import java.util.regex.Pattern; /** @@ -65,15 +63,4 @@ public class WebUtils { .replaceAll("\\'", "\\\\'") .replaceAll("=", "\\\\\\\\="); } - /** - * Returns the viewName to return for coming back to the sender url - * - * @param request Instance of {@link HttpServletRequest} or use an injected instance - * @return Optional with the view name. Recomended to use an alternativa url with - * {@link Optional#orElse(java.lang.Object)} - */ - public static Optional getPreviousPageByRequest(HttpServletRequest request) - { - return Optional.ofNullable(request.getHeader("Referer")); - } } -- cgit v1.2.3