You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by lu...@apache.org on 2004/10/06 20:57:08 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/search SlideUri.java
luetzkendorf 2004/10/06 11:57:08
Modified: src/share/org/apache/slide/search Tag:
SLIDE_2_1_RELEASE_BRANCH SlideUri.java
Log:
fix for special case if slide runs as servlet in a root application
Revision Changes Path
No revision
No revision
1.10.2.2 +7 -7 jakarta-slide/src/share/org/apache/slide/search/SlideUri.java
Index: SlideUri.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SlideUri.java,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -r1.10.2.1 -r1.10.2.2
--- SlideUri.java 25 Sep 2004 20:25:40 -0000 1.10.2.1
+++ SlideUri.java 6 Oct 2004 18:57:07 -0000 1.10.2.2
@@ -47,9 +47,9 @@
* @return the created SlideUri
*/
public static SlideUri createWithRequestUri(String slideContextPath, String requestUri) {
- if (slideContextPath.length() == 1) {
- // this.slideContextPath == "/"
- return new SlideUri(slideContextPath, requestUri);
+ if (slideContextPath.length() <= 1) {
+ // this.slideContextPath == "" or this.slideContextPath = "/"
+ return new SlideUri("/", requestUri);
} else {
return new SlideUri(slideContextPath,
requestUri.substring(slideContextPath.length()));
@@ -109,7 +109,7 @@
if (davPath.length() == this.context.length()) {
return "/";
}
- if (davPath.charAt(this.context.length()) != '/') {
+ if (this.context.length() > 1 && davPath.charAt(this.context.length()) != '/') {
throw new InvalidScopeException (
"Uri \"" + davPath + "\" does not refer to " + context
+ ". If an absolute scope is used, it must start with \""
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org