projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consider possible trailing / in input URL in login view
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
authentication
/
AuthenticatorActivity.java
diff --git
a/src/com/owncloud/android/authentication/AuthenticatorActivity.java
b/src/com/owncloud/android/authentication/AuthenticatorActivity.java
index
d88b8dc
..
2087a27
100644
(file)
--- a/
src/com/owncloud/android/authentication/AuthenticatorActivity.java
+++ b/
src/com/owncloud/android/authentication/AuthenticatorActivity.java
@@
-733,7
+733,10
@@
SsoWebViewClientListener, OnSslUntrustedCertListener {
\r
Intent getServerInfoIntent = new Intent();
\r
getServerInfoIntent.setAction(OperationsService.ACTION_GET_SERVER_INFO);
\r
\r
Intent getServerInfoIntent = new Intent();
\r
getServerInfoIntent.setAction(OperationsService.ACTION_GET_SERVER_INFO);
\r
- getServerInfoIntent.putExtra(OperationsService.EXTRA_SERVER_URL, uri);
\r
+ getServerInfoIntent.putExtra(
\r
+ OperationsService.EXTRA_SERVER_URL,
\r
+ normalizeUrlSuffix(uri)
\r
+ );
\r
if (mOperationsServiceBinder != null) {
\r
mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent);
\r
} else {
\r
if (mOperationsServiceBinder != null) {
\r
mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent);
\r
} else {
\r
@@
-1080,16
+1083,20
@@
SsoWebViewClientListener, OnSslUntrustedCertListener {
url = "http://" + url;
\r
}
\r
}
\r
url = "http://" + url;
\r
}
\r
}
\r
-
\r
- url = trimUrlWebdav(url);
\r
-
\r
- if (url.endsWith("/")) {
\r
- url = url.substring(0, url.length() - 1);
\r
- }
\r
-
\r
+
\r
+ url = normalizeUrlSuffix(url);
\r
}
\r
return (url != null ? url : "");
\r
}
\r
}
\r
return (url != null ? url : "");
\r
}
\r
+
\r
+
\r
+ private String normalizeUrlSuffix(String url) {
\r
+ if (url.endsWith("/")) {
\r
+ url = url.substring(0, url.length() - 1);
\r
+ }
\r
+ url = trimUrlWebdav(url);
\r
+ return url;
\r
+ }
\r
\r
\r
// TODO remove, if possible
\r
\r
\r
// TODO remove, if possible
\r