def read(self):
response = HttpResponse()
full_path = self.get_abs_path().encode('utf-8')
if self.quote:
full_path = urllib.parse.quote(full_path)
response['X-SendFile'] = full_path
response['Content-Type'] = mimetypes.guess_type(self.displayname)
response['Content-Length'] = self.getcontentlength
response['Last-Modified'] = http_date(self.getlastmodified)
response['ETag'] = self.getetag
raise ResponseException(response)
评论列表
文章目录