Projet

Général

Profil

0007-changed-mimetype-to-content_type-as-per-django1.5-de.patch

Nickolas Grigoriadis, 22 novembre 2014 06:28

Télécharger (2,42 ko)

Voir les différences:

Subject: [PATCH 7/7] changed mimetype to content_type as per django1.5
 deprecation rules.

License: MIT
 authentic2/idp/saml/saml2_endpoints.py | 2 +-
 authentic2/saml/common.py              | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
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
-