Package dev.relism.flash.routing
Class PathUtils
java.lang.Object
dev.relism.flash.routing.PathUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringJoins two path segments and ensures the result is sanitized.static StringSanitizes a path segment to ensure it starts with '/' and has no trailing slash.static StringsanitizeAuthority(String authority) Normalizes an authority-form CONNECT target without turning it into an origin-form path.
-
Constructor Details
-
PathUtils
public PathUtils()
-
-
Method Details
-
sanitize
Sanitizes a path segment to ensure it starts with '/' and has no trailing slash. Replaces multiple slashes with a single one. -
sanitizeAuthority
Normalizes an authority-form CONNECT target without turning it into an origin-form path. -
join
Joins two path segments and ensures the result is sanitized. Prevents "double namespace" if the path already starts with the base.
-