XViewMiddleware gets Content-Type wrong
|Reported by:||Jeremy Dunck||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
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.