* @param pageContext - MarinerPageContext
* @throws PAPIException
*/
private void setHostAndPort(Request request, URI uri, MarinerPageContext pageContext) throws PAPIException {
MutableParameters params = (MutableParameters) request.getInputParams();
if (!params.containsName(ParameterNames.SOURCE_HOST)) {
try {
// generate an absolute URL to the asset. This allows us to
// hijack the host and port.
URL fakeUrl = pageContext.getAbsoluteURL(
new MarinerURL(uri.toString()), true);