Trim the DAV header to the addressbook class
Minimization round 7: class 1, 3, and access-control claims go
untested; RFC 6352 requires the addressbook token and the client has
no other observed dependency on the value.
Assisted-by: GLM 5.2 via pi
diff --git a/lib/pro_tacts/web.rb b/lib/pro_tacts/web.rb
index bfcdb11..6670887 100644
--- a/lib/pro_tacts/web.rb
+++ b/lib/pro_tacts/web.rb
@@ -102,7 +102,7 @@ module ProTacts
r.on "dav" do
r.options do
- response["DAV"] = "1, 3, access-control, addressbook"
+ response["DAV"] = "addressbook"
response["Allow"] = "OPTIONS, PROPFIND, REPORT"
""
end
diff --git a/test/fixtures/macos-exchange/03-options-principal/response b/test/fixtures/macos-exchange/03-options-principal/response
index b864f89..df20a27 100644
--- a/test/fixtures/macos-exchange/03-options-principal/response
+++ b/test/fixtures/macos-exchange/03-options-principal/response
@@ -1,5 +1,5 @@
200
Content-Type: text/html
-DAV: 1, 3, access-control, addressbook
+DAV: addressbook
Allow: OPTIONS, PROPFIND, REPORT
diff --git a/test/pro_tacts/test_web.rb b/test/pro_tacts/test_web.rb
index e26eec7..a381e98 100644
--- a/test/pro_tacts/test_web.rb
+++ b/test/pro_tacts/test_web.rb
@@ -16,7 +16,7 @@ class WebTest < Minitest::Test
options "/dav/"
assert_equal 200, last_response.status
- assert_equal "1, 3, access-control, addressbook", last_response["DAV"]
+ assert_equal "addressbook", last_response["DAV"]
assert_includes last_response["Allow"], "OPTIONS"
assert_includes last_response["Allow"], "PROPFIND"
end