public class UrlHandler extends Object implements UrlPrefixer, UrlUnprefixer
| Constructor and Description |
|---|
UrlHandler(javax.servlet.http.HttpServletRequest req,
boolean relative)
If relative we assume urls are relative to the host + port.
|
UrlHandler(String urlPrefix,
String context,
boolean relative) |
| Modifier and Type | Method and Description |
|---|---|
String |
getUrlPrefix() |
String |
prefix(String val)
Return an appropriately prefixed url.
|
String |
unprefix(String val)
Remove any vestige of the host, port or context
|
public UrlHandler(javax.servlet.http.HttpServletRequest req,
boolean relative)
req - the incoming requestrelative - true for relative urlspublic String prefix(String val) throws WebdavException
UrlPrefixerWe're doing this because some clients don't handle absolute urls (a violation of the spec)
prefix in interface UrlPrefixerWebdavExceptionpublic String unprefix(String val) throws WebdavException
UrlUnprefixerunprefix in interface UrlUnprefixerWebdavExceptionpublic String getUrlPrefix()
Copyright © 2019 Bedework. All rights reserved.