|
@@ -110,7 +110,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
|
|
public static final byte ACTION_CREATE = 0;
|
|
|
public static final byte ACTION_UPDATE_TOKEN = 1;
|
|
|
|
|
|
-
|
|
|
+ public static final String WEBDAV_PATH= "/remote.php/webdav";
|
|
|
+
|
|
|
private String mHostBaseUrl;
|
|
|
private OwnCloudVersion mDiscoveredVersion;
|
|
|
|
|
@@ -426,7 +427,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
|
|
|
|
|
|
|
|
private void checkOcServer() {
|
|
|
- String uri = mHostUrlInput.getText().toString().trim();
|
|
|
+ String uri = trimUrlWebdav(mHostUrlInput.getText().toString().trim());
|
|
|
mServerIsValid = false;
|
|
|
mServerIsChecked = false;
|
|
|
mOkButton.setEnabled(false);
|
|
@@ -641,15 +642,29 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
|
|
} else {
|
|
|
url = "http://" + url;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
+ // OC-208: Add suffix remote.php/webdav to normalize (OC-34)
|
|
|
+ url = trimUrlWebdav(url);
|
|
|
+
|
|
|
if (url.endsWith("/")) {
|
|
|
url = url.substring(0, url.length() - 1);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+ Log_OC.d(TAG, "URL Normalize " + url);
|
|
|
return (url != null ? url : "");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private String trimUrlWebdav(String url){
|
|
|
+ if(url.toLowerCase().endsWith(WEBDAV_PATH)){
|
|
|
+ url = url.substring(0, url.length() - WEBDAV_PATH.length());
|
|
|
+ }
|
|
|
+ return (url != null ? url : "");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* Chooses the right icon and text to show to the user for the received operation result.
|
|
|
*
|