aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util/WebUtils.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-11-20 01:28:47 +0300
committerGravatar Vitaly Takmazov2020-11-20 01:28:47 +0300
commitc1a3274460680f8795469a43a5509cca08889db3 (patch)
treed1cf0e388e24856450b3b0c4519dce9f2bcfd5d2 /src/main/java/com/juick/util/WebUtils.java
parent75136e133101027fef6f6a21f4755cd1abc2a543 (diff)
Process Referer header without javax.servlet reference
* starting to remove javax.servlet dependency
Diffstat (limited to 'src/main/java/com/juick/util/WebUtils.java')
-rw-r--r--src/main/java/com/juick/util/WebUtils.java13
1 files changed, 0 insertions, 13 deletions
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<String> getPreviousPageByRequest(HttpServletRequest request)
- {
- return Optional.ofNullable(request.getHeader("Referer"));
- }
}