Class SafeHttpHelper
-
- All Implemented Interfaces:
public class SafeHttpHelper- Since:
2022-11-29
trydofor
-
-
Constructor Summary
Constructors Constructor Description SafeHttpHelper()
-
Method Summary
Modifier and Type Method Description static booleanisSafeRedirect(@NotNull() String uri, Set<String> hosts)Whether the host of uri is in the `hosts`, case-sensitive static StringparseHostPort(String uri)Only parse http/https, get host and port rfc3986 The authority component is preceded by a double slash ("//") and is terminated by the next slash ("/"), question mark ("?"), or number sign ("#") character, or by the end of the URI. [ userinfo "@" ] host [ ":" port ] host = IP-literal / IPv4address / IPv6address / reg-name //[107:0:0:0:200:7051]:80-
-
Method Detail
-
isSafeRedirect
static boolean isSafeRedirect(@NotNull() String uri, Set<String> hosts)
Whether the host of uri is in the `hosts`, case-sensitive
-
parseHostPort
static String parseHostPort(String uri)
Only parse http/https, get host and port rfc3986 The authority component is preceded by a double slash ("//") and is terminated by the next slash ("/"), question mark ("?"), or number sign ("#") character, or by the end of the URI. [ userinfo "@" ] host [ ":" port ] host = IP-literal / IPv4address / IPv6address / reg-name //[107:0:0:0:200:7051]:80
-
-
-
-