File "C:\Python26\Lib\site-packages\django\http\utils.py", line 77, in fix_IE_for_vary if response['Content-Type'].split(';')[0] not in safe_mime_types: AttributeError: 'tuple' object has no attribute 'split'
please check the 'tuple' where you have used. AttributeError: 'tuple' object has no attribute 'split' 在2009-03-31,"剑韬 付" <fuji...@hotmail.com> 写道: I use IE6.0 and encounter the following problem, I use django to provide download service. /////////////////////////////////////////////////// HTTP/1.0 500 INTERNAL SERVER ERROR Date: Tue, 31 Mar 2009 06:39:13 GMT Server: WSGIServer/0.1 Python/2.6.1 Content-Type: text/plain Content-Length: 850 Traceback (most recent call last): File "C:\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 278, in run self.result = application(self.environ, self.start_response) File "C:\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 635, in __call__ return self.application(environ, start_response) File "C:\Python26\Lib\site-packages\django\core\handlers\wsgi.py", line 246, in __call__ response = self.apply_response_fixes(request, response) File "C:\Python26\Lib\site-packages\django\core\handlers\base.py", line 174, in apply_response_fixes response = func(request, response) File "C:\Python26\Lib\site-packages\django\http\utils.py", line 77, in fix_IE_for_vary if response['Content-Type'].split(';')[0] not in safe_mime_types: AttributeError: 'tuple' object has no attribute 'split' ////////////////////////////////////////////////// here is the code snippets: resp = HttpResponse(S3FileIter(block_hash_list, data_start, content_length),\ mimetype = mimetypes.guess_type(os.path.basename(request.REQUEST['srv_path']))) resp['CONTENT_LENGTH']=content_length resp['Content_Disposition']='attachment; filename=%s'%os.path.basename(request.REQUEST['srv_path']) and I have three question: 1.what's the reason of problem 2.where is response['Content-Type'] assigned 3.How to solve the problem Thanks in advance! Get news, entertainment and everything you care about at Live.com. Check it out! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---