loggerhead performs more work than is necessary to answer HEAD request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
loggerhead |
Triaged
|
Low
|
Unassigned | ||
loggerhead-breezy |
Triaged
|
Low
|
Unassigned |
Bug Description
This is a bit of an extension of bug #716201. That bug is originally that we return the BODY content for a HEAD request, which is in pure violation of the http spec.
This bug is that even though we suppress the body content (once bug #716201 is fixed) we still do more work than is strictly necessary to get to the point where we can answer a HEAD request.
The current fix for bug #716201 is to generate the BODY but throw it away.
Looking at the code, it appears it would be easy to at least not render the content. The layering in loggerhead.
To go a step beyond that would probably require a new api than 'get_values()'. Currently get_values() is where we get enough information to set headers.
Note that stuff like ChangeLogUI doesn't actually set any headers. And the current HEAD response gives:
HTTP/1.0 200 OK
Server: PasteWSGIServer/0.5 Python/2.6.4
Date: Thu, 10 Feb 2011 02:46:10 GMT
Content-Type: text/html
Connection: close
All of that we know as soon as we determine that we *have* a controller that could respond to the given URL. (so there exists a branch at that location, and the part after the branch is in the controllers dict. (/changes, /+filediff, etc))
Related branches
- Gavin Panella (community): Approve
-
Diff: 112 lines (+56/-2)4 files modifiedNEWS (+8/-0)
info.py (+2/-1)
loggerhead/controllers/__init__.py (+3/-0)
loggerhead/tests/test_controllers.py (+43/-1)
Changed in loggerhead: | |
status: | Confirmed → Triaged |
Changed in loggerhead-breezy: | |
status: | New → Triaged |
importance: | Undecided → Low |