X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FAbortion%2FInternal.hs;h=573dff01d22eea4fe534def58c10b43300ae52db;hb=19763f7de78daf2d4c794f4010039f70c7f73994;hp=6142c23ec6b97f783c906348c40f6ff9f43e0bf8;hpb=51eda5b02d4528e2e240cbfc228de02b1c83799a;p=Lucu.git diff --git a/Network/HTTP/Lucu/Abortion/Internal.hs b/Network/HTTP/Lucu/Abortion/Internal.hs index 6142c23..573dff0 100644 --- a/Network/HTTP/Lucu/Abortion/Internal.hs +++ b/Network/HTTP/Lucu/Abortion/Internal.hs @@ -12,6 +12,7 @@ import qualified Blaze.ByteString.Builder.Char.Utf8 as BB import Control.Arrow.ListArrow import Control.Arrow.Unicode import Control.Exception +import Data.Monoid.Unicode import Data.Text (Text) import qualified Data.Text as T import Data.Typeable @@ -20,7 +21,6 @@ import Network.HTTP.Lucu.DefaultPage import Network.HTTP.Lucu.Headers import Network.HTTP.Lucu.Request import Network.HTTP.Lucu.Response -import Prelude.Unicode import Text.XML.HXT.Arrow.WriteDocument import Text.XML.HXT.Arrow.XmlArrow import Text.XML.HXT.Arrow.XmlState @@ -67,8 +67,9 @@ abortPage conf reqM res abo in BB.fromString html Nothing - → let res' = res { resStatus = aboStatus abo } - res'' = foldl (∘) id [setHeader name value - | (name, value) ← fromHeaders $ aboHeaders abo] res' + → let res' = res { + resStatus = aboStatus abo + , resHeaders = resHeaders res ⊕ aboHeaders abo + } in - getDefaultPage conf reqM res'' + getDefaultPage conf reqM res'