lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Can't view the source on XML pages. Bug?


From: Thorsten Glaser
Subject: Re: [Lynx-dev] Can't view the source on XML pages. Bug?
Date: Wed, 24 Aug 2011 08:36:59 +0000 (UTC)

Keith Bowes dixit:

>Odd.  When I try to view the source I see:
>application/xml D)ownload, or C)ancel

That’s because you serve it wrong, server-side. The correct thing,
despite what the with-each-other-conflicting “standards” say, is
to deliver ANY kind of HTML/XHTML as text/html unless the browser
explicitly indicates otherwise:

# serve XHTML stuff as text/html by default, but upgrade
# to application/xml+xhtml if the client requests it
AddType 'text/html; charset=utf-8' htm
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule \.htm$ - [T=application/xhtml+xml]

HTH & HAND,
//mirabilos
-- 
08:05⎜<XTaran:#grml> mika: Does grml have an tool to read Apple
     ⎜    System Log (asl) files? :)
08:08⎜<ft:#grml> yeah. /bin/rm. ;)       08:09⎜<mrud:#grml> hexdump -C
08:31⎜<XTaran:#grml> ft, mrud: *g*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]