X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FResource.hs;fp=Rakka%2FResource.hs;h=e1166b4d33079b0096d81a63f2d8c00af1d8b396;hb=885faf1cabc3f79c90e1885268e2a9138b1ddefb;hp=c79b215cfe5fb5e1bce74101982c18ee3cc7922c;hpb=03585f9c5773f6c0b59497f4f563909576c402b5;p=Rakka.git diff --git a/Rakka/Resource.hs b/Rakka/Resource.hs index c79b215..e1166b4 100644 --- a/Rakka/Resource.hs +++ b/Rakka/Resource.hs @@ -70,10 +70,9 @@ outputXmlPage :: XmlTree -> IOSArrow XmlTree XmlTree -> Resource () outputXmlPage tree toXHTML = do mType <- getEntityType setContentType mType - let formatter = if mType == read "text/xml" then - this - else - toXHTML + let formatter = case mType of + MIMEType "application" "xhtml+xml" _ -> toXHTML + MIMEType "text" "xml" _ -> this [resultStr] <- liftIO $ runX ( setErrorMsgHandler False fail >>> constA tree