Ticket #29100: base.patch

File base.patch, 570 bytes (added by Håkan Lövdahl, 7 years ago)
  • base.py

    old new  
    7878        # Setup default url resolver for this thread
    7979        set_urlconf(settings.ROOT_URLCONF)
    8080
     81        if self._middleware_chain is None:
     82            if self.__class__.__name__ == 'StaticFilesHandler':
     83                uri = '%s' % (request.get_full_path() )
     84                raise ValueError('Bad path for static file: %s' % uri)
     85
    8186        response = self._middleware_chain(request)
    8287
    8388        response._closable_objects.append(request)
Back to Top