web/request.py
changeset 9736 e0b3fcf1c205
parent 9601 e5a80bd337e8
child 9818 e3d2012adcd0
equal deleted inserted replaced
9730:8347e6d613c9 9736:e0b3fcf1c205
   767         # Forge expected response
   767         # Forge expected response
   768         if modified:
   768         if modified:
   769             if 'Expires' not in self.headers_out:
   769             if 'Expires' not in self.headers_out:
   770                 # Expires header seems to be required by IE7 -- Are you sure ?
   770                 # Expires header seems to be required by IE7 -- Are you sure ?
   771                 self.add_header('Expires', 'Sat, 01 Jan 2000 00:00:00 GMT')
   771                 self.add_header('Expires', 'Sat, 01 Jan 2000 00:00:00 GMT')
   772             if self.http_method() == 'HEAD':
       
   773                 self.status_out = 200
       
   774                 # XXX replace by True once validate_cache bw compat method is dropped
       
   775                 return 200
       
   776             # /!\ no raise, the function returns and we keep processing the request
   772             # /!\ no raise, the function returns and we keep processing the request
   777         else:
   773         else:
   778             # overwrite headers_out to forge a brand new not-modified response
   774             # overwrite headers_out to forge a brand new not-modified response
   779             self.headers_out = self._forge_cached_headers()
   775             self.headers_out = self._forge_cached_headers()
   780             if self.http_method() in ('HEAD', 'GET'):
   776             if self.http_method() in ('HEAD', 'GET'):