equal
deleted
inserted
replaced
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'): |