ServletRequestContext.initBaseUri(...) appends the webapp context path
----------------------------------------------------------------------
Key: ABDERA-271
URL: https://issues.apache.org/jira/browse/ABDERA-271
Project: Abdera
Issue Type: Bug
Affects Versions: 1.0
Reporter: Elliot Metsger
I may be mis-interpreting, but according to RequestContext's {{getBaseUri()}}
method should not include the webapp context path:
{quote}
/**
* Get the absolute base URI ... this is the request URI up to the Context
* Path of the web application within which the Abdera Servlet is deployed
*/
IRI getBaseUri();
{quote}
Yet in the {{ServletRequestContext.initBaseUri(...)} method the webapp context
path is appended:
{quote}
private static IRI initBaseUri(
Provider provider,
HttpServletRequest request) {
StringBuilder buffer =
new StringBuilder(
(request.isSecure())?
"https":"http");
buffer.append("://");
buffer.append(getHost(provider,request));
int port = getPort(provider,request);
if (port != 80) {
buffer.append(":");
buffer.append(port);
}
buffer.append(request.getContextPath());
// So that .resolve() works appropriately.
buffer.append("/");
return new IRI(buffer.toString());
}
{quote}
Am I mis-reading the Javadoc, or is ServletRequestContext doing the incorrect
thing?
This bug is causing incorrect <collection> href urls to appear in our Service
Documents.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.