Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#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)

doc-content_type.diff (749 bytes ) - added by Jeremy Dunck 16 years ago.

Download all attachments as: .zip

Change History (5)

by Jeremy Dunck, 16 years ago

Attachment: doc-content_type.diff added

comment:1 by Eric Holscher, 16 years ago

milestone: 1.0
Triage Stage: UnreviewedDesign decision needed

comment:2 by James Bennett, 16 years ago

Component: DocumentationHTTP handling

Recategorizing since this is actually a bug in how we're doing HTTP for the middleware, not a bug in Django's documentation.

comment:3 by Jacob, 16 years ago

Resolution: wontfix
Status: newclosed

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.

comment:4 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top