Bug: discover carddav filed, but discover caldav succeeeded (carddav not using full domain but only top domain?)
Status: UNCONFIRMED
Priority: --
Created: 2023-11-12 12:57:06+00:00
Resolved: 2023-11-17 13:14:32+00:00

Steps to reproduce:

Markdown Format.
I have done setup caldav and carddav server with `sabre/dav` latest version.
The carddav server locate ini `carddav.systemix.id`, and the caldav server locate in `caldav.systemix.id`. Web Server is nginx plus lets encrypt as CA.
i have done setup nginx,  that will redirect 301 `systemix.id/.well-known/caldav` to `caldav.systemix.id` and `systemix.id/.well-known/carddav` to `carddav.systemix.id`
i have create one user principal named ijortengab, and create one address book and one calender. Everything is OK.
i install Thunderbird, then add new calender, select Network Calendar. Type *ijortengab* in Username field, and *systemix.id* in Location field, then i click Find Calendar. The password input prompt, i type password correctly then the available calendar is exists. Evertything is OK for calendar.
The bug is there in address book.
I add new Carddav Address Book, Type *ijortengab* in Username field, and *systemix.id* in Location field, then i click Continue. The password input prompt, there are warning sentence like this: https://carddav.systemix.id is requesting your username and password. Then i type the password correctly. The error obtained. Showing the yellow warning with sentence like this: Failed to connect. I check the access.log of nginx, 
this the log:

Line 1
$time_local = 12/Nov/2023:19:31:10 +0700
$remote_addr = 182.2.166.133
$remote_user =
$host = systemix.id
$request = PROPFIND /.well-known/carddav HTTP/1.1
$status = 301
$body_bytes_sent = 169
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 2
$time_local = 12/Nov/2023:19:31:10 +0700
$remote_addr = 182.2.166.133
$remote_user =
$host = carddav.systemix.id
$request = PROPFIND /addressbooks HTTP/1.1
$status = 401
$body_bytes_sent = 426
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 3
$time_local = 12/Nov/2023:19:31:14 +0700
$remote_addr = 182.2.166.133
$remote_user =
$host = carddav.systemix.id
$request = REPORT /addressbooks/ijortengab/default/ HTTP/1.1
$status = 207
$body_bytes_sent = 214
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 3
$time_local = 12/Nov/2023:19:31:14 +0700
$remote_addr = 182.2.166.133
$remote_user = ijortengab
$host = carddav.systemix.id
$request = PROPFIND /addressbooks HTTP/1.1
$status = 207
$body_bytes_sent = 385
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 4
$time_local = 12/Nov/2023:19:31:15 +0700
$remote_addr = 182.2.166.133
$remote_user =
$host = systemix.id
$request = PROPFIND /principals/ijortengab/ HTTP/1.1
$status = 404
$body_bytes_sent = 4435
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Failed because we are using the domain `systemix.id`. How about if we use the real name server `carddav.systemix.id`. The login is success, and the address book is display which is ready to add. This the nginx access log.


Line 1
$time_local = 12/Nov/2023:19:47:17 +0700
$remote_addr = 182.2.166.133
$remote_user =
$host = carddav.systemix.id
$request = PROPFIND /.well-known/carddav HTTP/1.1
$status = 404
$body_bytes_sent = 290
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 2
$time_local = 12/Nov/2023:19:47:17 +0700
$remote_addr = 182.2.166.133
$remote_user =
$host = carddav.systemix.id
$request = PROPFIND / HTTP/1.1
$status = 401
$body_bytes_sent = 414
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 3
$time_local = 12/Nov/2023:19:47:19
$remote_addr = 182.2.166.133
$remote_user = ijortengab
$host = carddav.systemix.id
$request = PROPFIND / HTTP/1.1
$status = 207
$body_bytes_sent = 372
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 4
$time_local = 12/Nov/2023:19:47:19
$remote_addr = 182.2.166.133
$remote_user = ijortengab
$host = carddav.systemix.id
$request = PROPFIND /principals/ijortengab/ HTTP/1.1
$status = 207
$body_bytes_sent = 398
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2

Line 5
$time_local = 12/Nov/2023:19:47:19
$remote_addr = 182.2.166.133
$remote_user = ijortengab
$host = carddav.systemix.id
$request = PROPFIND /addressbooks/ijortengab/ HTTP/1.1
$status = 207
$body_bytes_sent = 1753
$http_referer = -
$http_user_agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderbird/115.4.2




Actual results:

Thunderbird is failed to login to CardDav if we use the domain name for service discovery as Location. 



Expected results:

CardDav login with domain name for service discovery as Location is success like Caldav.
I have test with Davx5 in Android, and login just only with domain as service discover and success both CardDav and CalDav, so i think the bug is not in server. But the CardDav Client equals Thunderbird.