/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/controllers/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2011-02-10 05:49:24 UTC
  • mto: This revision was merged to the branch mainline in revision 424.
  • Revision ID: john@arbash-meinel.com-20110210054924-tdxcko62y6ouizq9
Address bugs #716201, and #716217.

Don't expand a template if we get a HEAD request.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        if 'Content-Type' not in headers:
98
98
            headers['Content-Type'] = 'text/html'
99
99
        writer = start_response("200 OK", headers.items())
 
100
        if environ.get('REQUEST_METHOD') == 'HEAD':
 
101
            # No content for a HEAD request
 
102
            return []
100
103
        template = load_template(self.template_path)
101
104
        z = time.time()
102
105
        w = BufferingWriter(writer, 8192)