|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.protocol.http.util.ConversionUtils
public class ConversionUtils
General purpose conversion utilities related to HTTP/HTML
Constructor Summary | |
---|---|
ConversionUtils()
|
Method Summary | |
---|---|
static String |
escapeIllegalURLCharacters(String url)
|
static String |
getEncodingFromContentType(String contentType)
Extract the encoding (charset) from the Content-Type, e.g. |
static URL |
makeRelativeURL(URL baseURL,
String location)
Generate a relative URL, allowing for extraneous leading "../" segments. |
static String |
removeSlashDotDot(String url)
collapses absolute or relative URLs containing '/..' converting http://host/path1/.. |
static URI |
sanitizeUrl(URL url)
Escapes reserved chars in a non-encoded URL or partially encoded one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConversionUtils()
Method Detail |
---|
public static String getEncodingFromContentType(String contentType)
contentType
-
public static URL makeRelativeURL(URL baseURL, String location) throws MalformedURLException
URL.URL(URL, String)
constructor does not remove these.
baseURL
- location
- relative location, possibly with extraneous leading "../"
MalformedURLException
public static String escapeIllegalURLCharacters(String url) throws Exception
url
- String Url to escape
Exception
public static final URI sanitizeUrl(URL url) throws URISyntaxException, UnsupportedEncodingException
url
- non-encoded or partially encoded URL
URISyntaxException
UnsupportedEncodingException
public static String removeSlashDotDot(String url)
url
-
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |