#7495 closed (wontfix)
XViewMiddleware gets Content-Type wrong
Reported by: | Jeremy Dunck | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The doc.XViewMiddleware gives short-circuits views to supply the X-View header.
It doesn't actually call the view, and uses the default Content-Type of HttpRequest.
This means that HEAD requests for people logged in as staff function incorrectly; in our case, this was a staffer's HEAD request for an RSS feed getting text/html.
I understand the performance implications of calling the view despite its content not being returned, but I think it's the right thing to do.
Attachments (1)
Change History (5)
by , 17 years ago
Attachment: | doc-content_type.diff added |
---|
comment:1 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 16 years ago
Component: | Documentation → HTTP handling |
---|
comment:3 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The X-view middleware is a hack, and a kinda nasty one at that. I'd like to keep it that way, though, so this is something for a custom/extended x-view middleware.
Recategorizing since this is actually a bug in how we're doing HTTP for the middleware, not a bug in Django's documentation.