Ticket #14047: middleware-doc.diff
File middleware-doc.diff, 1.3 KB (added by , 14 years ago) |
---|
-
django/middleware/common.py
80 80 return http.HttpResponsePermanentRedirect(newurl) 81 81 82 82 def process_response(self, request, response): 83 " Check for a flat page (for 404s) and calculatethe Etag, if needed."83 "Send broken link emails and calculates the Etag, if needed." 84 84 if response.status_code == 404: 85 85 if settings.SEND_BROKEN_LINK_EMAILS: 86 86 # If the referrer was from an internal link or a non-search-engine site, -
docs/ref/middleware.txt
68 68 indexer would treat them as separate URLs -- so it's best practice to 69 69 normalize URLs. 70 70 71 * Sends broken link notification email to managers if 72 :setting:`SEND_BROKEN_LINK_EMAILS` is set to ``True``. 73 71 74 * Handles ETags based on the :setting:`USE_ETAGS` setting. If 72 75 :setting:`USE_ETAGS` is set to ``True``, Django will calculate an ETag 73 76 for each request by MD5-hashing the page content, and it'll take care of