summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2013-07-11 16:46:34 -0400
committerMartin Kosek <mkosek@redhat.com>2013-07-15 15:36:46 +0200
commit689399fce930fb9d28ca81dfffbad411d12186e3 (patch)
tree7b21eacd74449b0886c64fd25258e80ccf52e070
parent57fd275d7a75e1a257e5f49976aa374457aa9059 (diff)
downloadfreeipa-689399fce930fb9d28ca81dfffbad411d12186e3.zip
freeipa-689399fce930fb9d28ca81dfffbad411d12186e3.tar.gz
freeipa-689399fce930fb9d28ca81dfffbad411d12186e3.tar.xz
Return the correct Content-type on negotiated XML-RPC requests.
https://fedorahosted.org/freeipa/ticket/3745
-rw-r--r--ipaserver/rpcserver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index 203825e..eb9b073 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -699,6 +699,7 @@ class xmlserver(WSGIExecutioner, HTTP_Status, KerberosSession):
self.debug('WSGI xmlserver.__call__:')
user_ccache=environ.get('KRB5CCNAME')
+ headers = [('Content-Type', 'text/xml; charset=utf-8')]
if user_ccache is None:
self.internal_error(environ, start_response,
'xmlserver.__call__: KRB5CCNAME not defined in HTTP request environment')
@@ -708,11 +709,10 @@ class xmlserver(WSGIExecutioner, HTTP_Status, KerberosSession):
response = super(xmlserver, self).__call__(environ, start_response)
if getattr(context, 'session_data', None) is None and \
self.env.context != 'lite':
- self.finalize_kerberos_acquisition('xmlserver', user_ccache, environ, start_response)
+ self.finalize_kerberos_acquisition('xmlserver', user_ccache, environ, start_response, headers)
except PublicError, e:
status = HTTP_STATUS_SUCCESS
response = status
- headers = [('Content-Type', 'text/plain; charset=utf-8')]
start_response(status, headers)
return self.marshal(None, e)
finally: