luetzkendorf 2004/09/25 13:35:53
Modified: src/webdav/server/org/apache/slide/webdav/method Tag:
SLIDE_2_1_RELEASE_BRANCH AbstractWebdavMethod.java
Log:
fix for bug 28140; workaround to pass slide context path to search impl.;
removed buggy and unused getAbsoluteURL method
Revision Changes Path
No revision
No revision
1.43.2.8 +8 -36
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java
Index: AbstractWebdavMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java,v
retrieving revision 1.43.2.7
retrieving revision 1.43.2.8
diff -u -r1.43.2.7 -r1.43.2.8
--- AbstractWebdavMethod.java 22 Sep 2004 14:46:48 -0000 1.43.2.7
+++ AbstractWebdavMethod.java 25 Sep 2004 20:35:53 -0000 1.43.2.8
@@ -320,6 +320,11 @@
if (!this.config.isDefaultServlet()) {
this.slideContextPath += req.getServletPath();
}
+
+ // TODO this is a workaround to pass the slideContextPath to the search
+ // implementation
+ slideToken.addParameter("slideContextPath", this.slideContextPath);
+
parseRequestHeaders();
boolean transactionIsStarted = false;
@@ -735,39 +740,6 @@
new XMLOutputter(format).
output(new
Document(MethodUtil.getPreconditionViolationError(pve.getViolatedPrecondition())),
resp.getWriter());
}
- }
-
- /**
- * Returns the absolute URL of the given <code>uri</code>, e.g.
- * if the server is <code>aloha.com:80</code>, context path is
- * <code>have</code> and the URI is <code>much/fun</code> the string
- * <code>http://aloha:80/have/much/fun</code>.
- *
- * @param uri the URI for which to return the URL (may be
<code>null</code>).
- *
- * @return the absolute URL.
- */
- protected String getAbsoluteURL(String uri) {
-
- StringBuffer buffer = new StringBuffer();
- buffer.append(HTTP_PROTOCOL);
- buffer.append(req.getServerName());
- buffer.append(":");
- buffer.append(req.getServerPort());
-
- if ( ! req.getContextPath().startsWith("/") ) {
- buffer.append("/");
- }
- // FIXME what about servlet context, user getSlideContext() ?
- buffer.append(req.getContextPath());
-
- if (uri != null) {
- if ( !req.getContextPath().endsWith("/") && !uri.startsWith("/") ) {
- buffer.append("/");
- }
- buffer.append(uri);
- }
- return buffer.toString();
}
// -------------------------------------------------------- Private Methods
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]