mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
carddav: make Discover fail when target is empty
This commit is contained in:
parent
4b24edf624
commit
7d2b6a3902
@ -36,7 +36,7 @@ func Discover(domain string) (string, error) {
|
|||||||
|
|
||||||
target := strings.TrimSuffix(addr.Target, ".")
|
target := strings.TrimSuffix(addr.Target, ".")
|
||||||
if target == "" {
|
if target == "" {
|
||||||
return "", nil
|
return "", fmt.Errorf("carddav: empty target in SRV record")
|
||||||
}
|
}
|
||||||
|
|
||||||
u := url.URL{Scheme: "https"}
|
u := url.URL{Scheme: "https"}
|
||||||
|
Loading…
Reference in New Issue
Block a user