-writeDefaultPage ∷ Interaction → STM ()
-writeDefaultPage !itr
- -- Content-Type が正しくなければ補完できない。
- = do res ← readItr itr itrResponse id
- when (getHeader "Content-Type" res == Just defaultPageContentType)
- $ do reqM ← readItr itr itrRequest id
-
- let conf = itrConfig itr
- page = getDefaultPage conf reqM res
-
- writeTVar (itrBodyToSend itr)
- (S.singleton (encodeUtf8 page))
+defaultPageContentType ∷ Ascii
+{-# INLINE defaultPageContentType #-}
+defaultPageContentType = "application/xhtml+xml"