old_contents: from django.conf import settings
  from django.http import HttpResponse
  
  class PistonKeyAuthentication(object):
      
      def is_authenticated(self, request):
          return hasattr(request, 'apikey') and request.apikey.status == 'A'
      
      def challenge(self):
          resp = HttpResponse("Authorization Required", content_type="text/plain")
          resp['WWW-Authenticate'] = 'Basic realm="API"'
          resp.status_code = 401
          return resp
new_contents: from django.conf import settings
  from django.http import HttpResponse
  
  class PistonKeyAuthentication(object):
  
      def is_authenticated(self, request):
          return hasattr(request, 'apikey') and request.apikey.status == 'A'
  
      def challenge(self):
          resp = HttpResponse("Authorization Required", content_type="text/plain")
          resp.status_code = 401
          return resp
  
subject: remove WWW-Authenticate header