#3700: Middleware to degrade XHTML into HTML
--------------------------------------------+-------------------------------
Reporter: Dave Hodder <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: Contrib
apps
Version: SVN | Resolution:
Keywords: xhtml middleware | Stage: Design
decision needed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------------------------+-------------------------------
Comment (by Dave Hodder <[EMAIL PROTECTED]>):
Ah, I wasn't aware of Sune Kirkeby's middleware when I first wrote this.
I've attached another version which doesn't examine the User-Agent header
inside _supports_xhtml().
The first two versions fall back to User-Agent sniffing when the Accept
header is '*/*' or not present. My thinking was that this would allow the
likes of Apple Safari ("Accept: */*") and the W3C validator (no Accept
header) to still receive application/xhtml+xml contents. Given your
Google example, and the fact that Safari 3.0beta has fixed it's Accept
header, I've decided to remove the UA sniffing.
(The first two versions also don't properly cope with the default
PlayStation 3 browser.)
--
Ticket URL: <http://code.djangoproject.com/ticket/3700#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---