0009-changed-mimetype-to-content_type-as-per-django1.5-de.patch
authentic2/idp/saml/saml2_endpoints.py | ||
---|---|---|
103 | 103 |
'''Endpoint to retrieve the metadata file''' |
104 | 104 |
logger.info('return metadata') |
105 | 105 |
return HttpResponse(get_metadata(request, request.path), |
106 |
mimetype='text/xml')
|
|
106 |
content_type='text/xml')
|
|
107 | 107 | |
108 | 108 |
def log_assert(func, exception_classes=(AssertionError,)): |
109 | 109 |
'''Convert assertion errors to warning logs and report them to the user |
authentic2/saml/common.py | ||
---|---|---|
174 | 174 |
'body': profile.msgBody, |
175 | 175 |
'relay_state': profile.msgRelayState }, |
176 | 176 |
context_instance=context_instance) |
177 |
return HttpResponse(profile.msgBody, mimetype = 'text/xml')
|
|
177 |
return HttpResponse(profile.msgBody, content_type = 'text/xml')
|
|
178 | 178 |
elif profile.msgUrl: |
179 | 179 |
return HttpResponseRedirect(profile.msgUrl) |
180 | 180 |
else: |
... | ... | |
213 | 213 |
return True |
214 | 214 | |
215 | 215 |
def return_saml_soap_response(profile): |
216 |
return HttpResponse(profile.msgBody, mimetype = 'text/xml')
|
|
216 |
return HttpResponse(profile.msgBody, content_type = 'text/xml')
|
|
217 | 217 | |
218 | 218 |
# Helper method to handle profiles endpoints |
219 | 219 |
# In the future we should move away from monolithic object (LassoIdentity and |
... | ... | |
633 | 633 |
<faultcode>%(faultcode)s</faultcode>%(faultstring)s |
634 | 634 |
</soap:Fault></soap:Body> |
635 | 635 |
</soap:Envelope>''' % locals() |
636 |
return HttpResponse(content, mimetype = "text/xml")
|
|
636 |
return HttpResponse(content, content_type = "text/xml")
|
|
637 | 637 | |
638 | 638 |
def get_idp_options_policy(provider): |
639 | 639 |
try: |
640 |
- |