yesod-eventsource 1.6.0.1 → 1.6.0.2
raw patch · 3 files changed
+9/−6 lines, 3 filesdep ~yesod-corenew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: yesod-core
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Yesod/EventSource.hs +3/−4
- yesod-eventsource.cabal +2/−2
ChangeLog.md view
@@ -1,3 +1,7 @@+## 1.6.0.2++* Support `yesod-core` 1.7+ ## 1.6.0.1 * Update documentation from `HandlerT` to `HandlerFor` [#1703](https://github.com/yesodweb/yesod/pull/1703)
Yesod/EventSource.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}+ -- | This module contains everything that you need to support -- server-sent events in Yesod applications. module Yesod.EventSource@@ -10,8 +11,6 @@ import Blaze.ByteString.Builder (Builder) import Control.Monad (when)-import Data.Functor ((<$>))-import Data.Monoid (Monoid (..)) import Yesod.Core import Data.Conduit import qualified Network.Wai as W@@ -24,7 +23,7 @@ -- set any necessary headers. prepareForEventSource :: MonadHandler m => m EventSourcePolyfill prepareForEventSource = do- reqWith <- lookup "X-Requested-With" . W.requestHeaders Data.Functor.<$> waiRequest+ reqWith <- lookup "X-Requested-With" . W.requestHeaders <$> waiRequest let polyfill | reqWith == Just "XMLHttpRequest" = Remy'sESPolyfill | otherwise = NoESPolyfill addHeader "Cache-Control" "no-cache" -- extremely important!@@ -90,7 +89,7 @@ -- when we the connection should be closed. joinEvents (ev:evs) acc = case ES.eventToBuilder ev of- Just b -> joinEvents evs (acc `Data.Monoid.mappend` b)+ Just b -> joinEvents evs (acc `mappend` b) Nothing -> (fst $ joinEvents [] acc, False) joinEvents [] acc = (acc, True)
yesod-eventsource.cabal view
@@ -1,6 +1,6 @@ cabal-version: >= 1.10 name: yesod-eventsource-version: 1.6.0.1+version: 1.6.0.2 license: MIT license-file: LICENSE author: Felipe Lessa <felipe.lessa@gmail.com>@@ -21,7 +21,7 @@ , transformers , wai >= 1.3 , wai-extra- , yesod-core == 1.6.*+ , yesod-core >= 1.6 && < 1.8 exposed-modules: Yesod.EventSource ghc-options: -Wall