7e1b55
From d43b513927d6dd0a12464dd24287ce40ccaf33e4 Mon Sep 17 00:00:00 2001
7e1b55
From: Chris Kelley <ckelley@redhat.com>
7e1b55
Date: Fri, 10 Sep 2021 16:47:22 +0100
7e1b55
Subject: [PATCH] Make Dogtag return XML for ipa cert-find
7e1b55
7e1b55
Using JSON by default within Dogtag appears to cause ipa cert-find to
7e1b55
return JSON, when the request was made with XML. We can request that XML
7e1b55
is returned as before by specifying so in the request header.
7e1b55
7e1b55
Fixes: https://pagure.io/freeipa/issue/8980
7e1b55
Signed-off-by: Chris Kelley <ckelley@redhat.com>
7e1b55
Reviewed-By: Francois Cami <fcami@redhat.com>
7e1b55
---
7e1b55
 ipaserver/plugins/dogtag.py | 3 ++-
7e1b55
 1 file changed, 2 insertions(+), 1 deletion(-)
7e1b55
7e1b55
diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py
7e1b55
index be2e4bb4e2a1b96c1bff6056da30c704c36789f3..b4feddfac19a4c5659d29bf7b6f5fd9b1247524c 100644
7e1b55
--- a/ipaserver/plugins/dogtag.py
7e1b55
+++ b/ipaserver/plugins/dogtag.py
7e1b55
@@ -1832,7 +1832,8 @@ class ra(rabase.rabase, RestClient):
7e1b55
             method='POST',
7e1b55
             headers={'Accept-Encoding': 'gzip, deflate',
7e1b55
                      'User-Agent': 'IPA',
7e1b55
-                     'Content-Type': 'application/xml'},
7e1b55
+                     'Content-Type': 'application/xml',
7e1b55
+                     'Accept': 'application/xml'},
7e1b55
             body=payload
7e1b55
         )
7e1b55
 
7e1b55
-- 
7e1b55
2.31.1
7e1b55