Answer discovery PROPFINDs with current-user-principal only
Minimization round 4: root and .well-known responses drop
principal-URL and resourcetype; the client only needs the pointer to
the principal to walk the chain.

Assisted-by: GLM 5.2 via pi
change nsulpqzkqntrmowztuzmlptqpqyqmoqp
commit 51ae9c60aa0e26dad3b7b6b9400329cbefa2d320
author Alpha Chen <alpha@kejadlen.dev>
date
parent ryqvrxys
diff --git a/lib/pro_tacts/web.rb b/lib/pro_tacts/web.rb
index 83b4e6d..c202d0c 100644
--- a/lib/pro_tacts/web.rb
+++ b/lib/pro_tacts/web.rb
@@ -63,12 +63,6 @@ module ProTacts
                     <d:current-user-principal>
                       <d:href>/dav/principal/</d:href>
                     </d:current-user-principal>
-                    <d:principal-URL>
-                      <d:href>/dav/principal/</d:href>
-                    </d:principal-URL>
-                    <d:resourcetype>
-                      <d:collection/>
-                    </d:resourcetype>
                   </d:prop>
                   <d:status>HTTP/1.1 200 OK</d:status>
                 </d:propstat>
@@ -93,12 +87,6 @@ module ProTacts
                     <d:current-user-principal>
                       <d:href>/dav/principal/</d:href>
                     </d:current-user-principal>
-                    <d:principal-URL>
-                      <d:href>/dav/principal/</d:href>
-                    </d:principal-URL>
-                    <d:resourcetype>
-                      <d:collection/>
-                    </d:resourcetype>
                   </d:prop>
                   <d:status>HTTP/1.1 200 OK</d:status>
                 </d:propstat>
diff --git a/test/fixtures/macos-exchange/01-propfind-root/response b/test/fixtures/macos-exchange/01-propfind-root/response
index f992bee..71c8c1b 100644
--- a/test/fixtures/macos-exchange/01-propfind-root/response
+++ b/test/fixtures/macos-exchange/01-propfind-root/response
@@ -10,12 +10,6 @@ Content-Type: text/xml
         <d:current-user-principal>
           <d:href>/dav/principal/</d:href>
         </d:current-user-principal>
-        <d:principal-URL>
-          <d:href>/dav/principal/</d:href>
-        </d:principal-URL>
-        <d:resourcetype>
-          <d:collection/>
-        </d:resourcetype>
       </d:prop>
       <d:status>HTTP/1.1 200 OK</d:status>
     </d:propstat>
diff --git a/test/fixtures/macos-exchange/02-propfind-well-known/response b/test/fixtures/macos-exchange/02-propfind-well-known/response
index f696aa2..d82432a 100644
--- a/test/fixtures/macos-exchange/02-propfind-well-known/response
+++ b/test/fixtures/macos-exchange/02-propfind-well-known/response
@@ -10,12 +10,6 @@ Content-Type: text/xml
         <d:current-user-principal>
           <d:href>/dav/principal/</d:href>
         </d:current-user-principal>
-        <d:principal-URL>
-          <d:href>/dav/principal/</d:href>
-        </d:principal-URL>
-        <d:resourcetype>
-          <d:collection/>
-        </d:resourcetype>
       </d:prop>
       <d:status>HTTP/1.1 200 OK</d:status>
     </d:propstat>