mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
Bug fixes
* fix a bug in handling TXT records (hopefully fixes #383) * fix invalid translation strings
This commit is contained in:
parent
e98f0bd1ed
commit
bc8d63f233
@ -111,7 +111,7 @@
|
||||
|
||||
<string name="setup_add_account">Afegir compte</string>
|
||||
<string name="setup_querying_server">Contactant servidor. Espereu sisuplau.</string>
|
||||
<string name="setup_what_to_sync">Quines col·leccions s'han de sincronitzar?</string>
|
||||
<string name="setup_what_to_sync">Quines col·leccions s\'han de sincronitzar?</string>
|
||||
<string name="setup_address_books">Llibretes de contactes</string>
|
||||
<string name="setup_address_book">Llibreta de contactes</string>
|
||||
<string name="setup_calendars">Calendaris</string>
|
||||
@ -136,7 +136,7 @@
|
||||
<string name="settings_network_logging">Registra el tràfic de xarxa</string>
|
||||
<string name="settings_network_logging_enabled">Tot el tràfic de xarxa es reigstra (mode depuració)</string>
|
||||
<string name="settings_network_logging_disabled">No es registra el tràfic de xarxa</string>
|
||||
<string name="settings_report_an_issue">Informa d'un error</string>
|
||||
<string name="settings_report_an_issue">Informa d\'un error</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -202,7 +202,8 @@ public class DavResourceFinder implements Closeable {
|
||||
records = new Lookup(name, Type.TXT).run();
|
||||
if (records != null && records.length >= 1) {
|
||||
TXTRecord txt = (TXTRecord)records[0];
|
||||
for (String segment : (String[])txt.getStrings().toArray())
|
||||
for (Object o : txt.getStrings().toArray()) {
|
||||
String segment = (String)o;
|
||||
if (segment.startsWith("path=")) {
|
||||
path = segment.substring(5);
|
||||
Log.d(TAG, "Found initial context path for " + serviceName + " at " + domain + " -> " + path);
|
||||
@ -210,6 +211,7 @@ public class DavResourceFinder implements Closeable {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (TextParseException e) {
|
||||
throw new URISyntaxException(domain, "Invalid domain name");
|
||||
}
|
||||
@ -228,13 +230,14 @@ public class DavResourceFinder implements Closeable {
|
||||
* @param resource Location that will be queried
|
||||
* @param serviceName Well-known service name ("carddav", "caldav")
|
||||
* @return WebDavResource of current-user-principal for the given service, or null if it can't be found
|
||||
*
|
||||
* TODO: If a TXT record is given, always use it instead of trying .well-known first
|
||||
*/
|
||||
WebDavResource getCurrentUserPrincipal(ServerInfo serverInfo, String serviceName) throws URISyntaxException, IOException, NotAuthorizedException {
|
||||
URL initialURL = getInitialContextURL(serverInfo, serviceName);
|
||||
if (initialURL != null) {
|
||||
// determine base URL (host name and initial context path)
|
||||
WebDavResource base = new WebDavResource(httpClient,
|
||||
//new URI(URIUtils.ensureTrailingSlash(serverInfo.getBaseURI())),
|
||||
initialURL,
|
||||
serverInfo.getUserName(), serverInfo.getPassword(), serverInfo.isAuthPreemptive());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user