commit ghc-wai-extra for openSUSE:Factory

2020-10-23 Thread root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2020-10-23 15:15:28

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.3463 (New)


Package is "ghc-wai-extra"

Fri Oct 23 15:15:28 2020 rev:4 rq:842776 version:3.1.1

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2020-09-30 19:53:49.440754276 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.3463/ghc-wai-extra.changes
2020-10-23 15:15:33.734169407 +0200
@@ -1,0 +2,8 @@
+Tue Oct  6 08:55:59 UTC 2020 - psim...@suse.com
+
+- Update wai-extra to version 3.1.1.
+  ## 3.1.1
+
+  * 'Network.Wai.Middleware.RequestSizeLimit': Add a new middleware to reject 
request bodies above a certain size. 
[#818](https://github.com/yesodweb/wai/pull/818/files)
+
+---

Old:

  wai-extra-3.1.0.tar.gz

New:

  wai-extra-3.1.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.JoSplP/_old  2020-10-23 15:15:36.450170717 +0200
+++ /var/tmp/diff_new_pack.JoSplP/_new  2020-10-23 15:15:36.454170719 +0200
@@ -19,7 +19,7 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:3.1.0
+Version:3.1.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.1.0.tar.gz -> wai-extra-3.1.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.1.0/ChangeLog.md 
new/wai-extra-3.1.1/ChangeLog.md
--- old/wai-extra-3.1.0/ChangeLog.md2020-09-21 12:43:49.0 +0200
+++ new/wai-extra-3.1.1/ChangeLog.md2020-10-05 20:20:57.0 +0200
@@ -1,5 +1,9 @@
 # Changelog for wai-extra
 
+## 3.1.1
+
+* 'Network.Wai.Middleware.RequestSizeLimit': Add a new middleware to reject 
request bodies above a certain size. 
[#818](https://github.com/yesodweb/wai/pull/818/files)
+
 ## 3.1.0
 
 * `Network.Wai.Test`: Add support for source locations to assertion primitives 
[#817](https://github.com/yesodweb/wai/pull/817)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.1.0/Network/Wai/Middleware/RequestSizeLimit/Internal.hs 
new/wai-extra-3.1.1/Network/Wai/Middleware/RequestSizeLimit/Internal.hs
--- old/wai-extra-3.1.0/Network/Wai/Middleware/RequestSizeLimit/Internal.hs 
1970-01-01 01:00:00.0 +0100
+++ new/wai-extra-3.1.1/Network/Wai/Middleware/RequestSizeLimit/Internal.hs 
2020-10-05 20:20:57.0 +0200
@@ -0,0 +1,57 @@
+-- | Internal constructors and helper functions. Note that no guarantees are 
given for stability of these interfaces.
+module Network.Wai.Middleware.RequestSizeLimit.Internal
+( RequestSizeLimitSettings(..)
+, setMaxLengthForRequest
+, setOnLengthExceeded
+) where
+
+import Network.Wai
+import Data.Word (Word64)
+
+-- | Settings to configure 'requestSizeLimitMiddleware'.
+--
+-- This type (but not the constructor, or record fields) is exported from 
"Network.Wai.Middleware.RequestSizeLimit".
+-- Since the constructor isn't exported, create a default value with 
'defaultRequestSizeLimitSettings' first,
+-- then set the values using 'setMaxLengthForRequest' and 
'setOnLengthExceeded' (See the examples below).
+--
+-- If you need to access the constructor directly, it's exported from 
"Network.Wai.Middleware.RequestSizeLimit.Internal".
+--
+--  __Examples__
+--
+-- = Conditionally setting the limit based on the request
+-- > {-# LANGUAGE OverloadedStrings #-}
+-- > import Network.Wai
+-- > import Network.Wai.Middleware.RequestSizeLimit
+-- >
+-- > let megabyte = 1024 * 1024
+-- > let sizeForReq req = if pathInfo req == ["upload", "image"] then pure $ 
Just $ megabyte * 20 else pure $ Just $ megabyte * 2
+-- > let finalSettings = setMaxLengthForRequest sizeForReq 
defaultRequestSizeLimitSettings
+--
+-- = JSON response
+-- > {-# LANGUAGE OverloadedStrings #-}
+-- > import Network.Wai
+-- > import Network.Wai.Middleware.RequestSizeLimit
+-- > import Network.HTTP.Types.Status (requestEntityTooLarge413)
+-- > import Data.Aeson
+-- > import Data.Text (Text)
+-- >
+-- > let jsonResponse = \_maxLen _app _req sendResponse -> sendResponse $ 
responseLBS requestEntityTooLarge413 [("Content-Type", "application/json")] 
(encode $ object ["error" .= ("request size too large" :: Text)])
+-- > let finalSettings = setOnLengthExceeded jsonResponse 
defaultRequestSizeLimitSettings
+--
+-- @since 3.1.1
+data RequestSizeLimitSettings = RequestSizeLimitSettings
+{ maxLengthForRequest :: Request -> IO (Maybe 

commit ghc-wai-extra for openSUSE:Factory

2020-09-30 Thread root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2020-09-30 19:53:43

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.4249 (New)


Package is "ghc-wai-extra"

Wed Sep 30 19:53:43 2020 rev:3 rq:838497 version:3.1.0

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2020-08-28 21:41:07.084881515 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.4249/ghc-wai-extra.changes
2020-09-30 19:53:49.440754276 +0200
@@ -1,0 +2,21 @@
+Tue Sep 22 09:35:49 UTC 2020 - psim...@suse.com
+
+- Update wai-extra to version 3.1.0.
+  Upstream has edited the change log file since the last release in
+  a non-trivial way, i.e. they did more than just add a new entry
+  at the top. You can review the file at:
+  http://hackage.haskell.org/package/wai-extra-3.1.0/src/ChangeLog.md
+
+---
+Fri Sep 18 02:00:38 UTC 2020 - psim...@suse.com
+
+- Update wai-extra to version 3.0.31.
+  ## 3.0.31
+
+  * Undo WaiTestFailure change in previous release
+
+  ## 3.0.30
+
+  * `Network.Wai.Test`: Add support source locations to assertion primitives 
[#812](https://github.com/yesodweb/wai/pull/812)
+
+---

Old:

  wai-extra-3.0.29.2.tar.gz

New:

  wai-extra-3.1.0.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.VdpOPs/_old  2020-09-30 19:53:50.196754952 +0200
+++ /var/tmp/diff_new_pack.VdpOPs/_new  2020-09-30 19:53:50.200754955 +0200
@@ -19,17 +19,19 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:3.0.29.2
+Version:3.1.0
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT
 URL:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-ansi-terminal-devel
 BuildRequires:  ghc-base64-bytestring-devel
 BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-call-stack-devel
 BuildRequires:  ghc-case-insensitive-devel
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-cookie-devel
@@ -57,7 +59,6 @@
 BuildRequires:  ghc-word8-devel
 BuildRequires:  ghc-zlib-devel
 %if %{with tests}
-BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-hspec-devel
 %endif
 

++ wai-extra-3.0.29.2.tar.gz -> wai-extra-3.1.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.29.2/ChangeLog.md 
new/wai-extra-3.1.0/ChangeLog.md
--- old/wai-extra-3.0.29.2/ChangeLog.md 2020-05-26 05:33:27.0 +0200
+++ new/wai-extra-3.1.0/ChangeLog.md2020-09-21 12:43:49.0 +0200
@@ -1,5 +1,21 @@
 # Changelog for wai-extra
 
+## 3.1.0
+
+* `Network.Wai.Test`: Add support for source locations to assertion primitives 
[#817](https://github.com/yesodweb/wai/pull/817)
+
+## 3.0.32
+
+* Undo previous two release, restore code from 3.0.29.2
+
+## 3.0.31
+
+* Undo WaiTestFailure change in previous release
+
+## 3.0.30
+
+* `Network.Wai.Test`: Add support for source locations to assertion primitives 
[#812](https://github.com/yesodweb/wai/pull/812)
+
 ## 3.0.29.2
 
 * flush SSE headers early [#804](https://github.com/yesodweb/wai/pull/804)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.29.2/Network/Wai/Test.hs 
new/wai-extra-3.1.0/Network/Wai/Test.hs
--- old/wai-extra-3.0.29.2/Network/Wai/Test.hs  2020-02-17 08:07:12.0 
+0100
+++ new/wai-extra-3.1.0/Network/Wai/Test.hs 2020-09-21 12:43:49.0 
+0200
@@ -29,7 +29,6 @@
 , assertClientCookieExists
 , assertNoClientCookieExists
 , assertClientCookieValue
-, WaiTestFailure (..)
 ) where
 
 #if __GLASGOW_HASKELL__ < 710
@@ -62,6 +61,8 @@
 import qualified Data.Text.Encoding as TE
 import Data.IORef
 import Data.Time.Clock (getCurrentTime)
+import qualified Test.HUnit as HUnit
+import Data.CallStack (HasCallStack)
 
 -- |
 --
@@ -206,20 +207,16 @@
   where
 (s, h, withBody) = responseToStream res
 
-assertBool :: String -> Bool -> Session ()
+assertBool :: HasCallStack => String -> Bool -> Session ()
 assertBool s b = unless b $ assertFailure s
 
-assertString :: String -> Session ()
+assertString :: HasCallStack => String -> Session ()
 assertString s = unless (null s) $ assertFailure s
 
-assertFailure :: String -> Session ()
-assertFailure 

commit ghc-wai-extra for openSUSE:Factory

2020-08-28 Thread root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2020-08-28 21:41:06

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.3399 (New)


Package is "ghc-wai-extra"

Fri Aug 28 21:41:06 2020 rev:2 rq:829489 version:3.0.29.2

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2020-06-19 17:05:40.720866695 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.3399/ghc-wai-extra.changes
2020-08-28 21:41:07.084881515 +0200
@@ -1,0 +2,5 @@
+Tue Aug 18 10:46:36 UTC 2020 - Peter Simons 
+
+- Replace %setup -q with the more modern %autosetup macro.
+
+---



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.AnNC2q/_old  2020-08-28 21:41:09.152882277 +0200
+++ /var/tmp/diff_new_pack.AnNC2q/_new  2020-08-28 21:41:09.156882278 +0200
@@ -134,7 +134,7 @@
 This package provides the Haskell %{pkg_name} library development files.
 
 %prep
-%setup -q -n %{pkg_name}-%{version}
+%autosetup -n %{pkg_name}-%{version}
 
 %build
 %ghc_lib_build




commit ghc-wai-extra for openSUSE:Factory

2017-09-15 Thread root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2017-09-15 22:23:52

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Fri Sep 15 22:23:52 2017 rev:19 rq:525657 version:3.0.20.0

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2017-07-06 00:03:45.679240829 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2017-09-15 22:23:53.630161347 +0200
@@ -1,0 +2,5 @@
+Thu Aug  3 15:38:38 UTC 2017 - psim...@suse.com
+
+- Updated with latest spec-cleaner version 0.9.8-8-geadfbbf.
+
+---



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.Vjd9rX/_old  2017-09-15 22:23:54.550031752 +0200
+++ /var/tmp/diff_new_pack.Vjd9rX/_new  2017-09-15 22:23:54.558030626 +0200
@@ -23,8 +23,8 @@
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT
-Group:  Development/Languages/Other
-Url:https://hackage.haskell.org/package/%{pkg_name}
+Group:  Development/Libraries/Haskell
+URL:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
@@ -59,7 +59,6 @@
 BuildRequires:  ghc-wai-logger-devel
 BuildRequires:  ghc-word8-devel
 BuildRequires:  ghc-zlib-devel
-BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-hspec-devel
@@ -129,7 +128,7 @@
 
 %package devel
 Summary:Haskell %{pkg_name} library development files
-Group:  Development/Libraries/Other
+Group:  Development/Libraries/Haskell
 Requires:   %{name} = %{version}-%{release}
 Requires:   ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}
@@ -157,11 +156,9 @@
 %ghc_pkg_recache
 
 %files -f %{name}.files
-%defattr(-,root,root,-)
 %doc LICENSE
 
 %files devel -f %{name}-devel.files
-%defattr(-,root,root,-)
 %doc ChangeLog.md README.md
 
 %changelog




commit ghc-wai-extra for openSUSE:Factory

2017-07-05 Thread root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2017-07-06 00:03:44

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Thu Jul  6 00:03:44 2017 rev:18 rq:508042 version:3.0.20.0

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2017-02-11 01:42:23.638759056 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2017-07-06 00:03:45.679240829 +0200
@@ -1,0 +2,5 @@
+Sun Jun 25 18:41:33 UTC 2017 - psim...@suse.com
+
+- Update to version 3.0.20.0.
+
+---

Old:

  wai-extra-3.0.19.1.tar.gz

New:

  wai-extra-3.0.20.0.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.7ADjWu/_old  2017-07-06 00:03:46.435134341 +0200
+++ /var/tmp/diff_new_pack.7ADjWu/_new  2017-07-06 00:03:46.439133777 +0200
@@ -19,7 +19,7 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:3.0.19.1
+Version:3.0.20.0
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.19.1.tar.gz -> wai-extra-3.0.20.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/ChangeLog.md 
new/wai-extra-3.0.20.0/ChangeLog.md
--- old/wai-extra-3.0.19.1/ChangeLog.md 2017-01-17 12:29:22.0 +0100
+++ new/wai-extra-3.0.20.0/ChangeLog.md 2017-06-22 18:16:39.0 +0200
@@ -1,3 +1,7 @@
+## 3.0.20.0
+
+* runSessionWith (runSession variant that gives access to ClientState) 
[#629](https://github.com/yesodweb/wai/pull/629)
+
 ## 3.0.19.1
 
 * All loggers follow the autoFlush setting 
[#604](https://github.com/yesodweb/wai/pull/604)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.19.1/Network/Wai/Middleware/MethodOverride.hs 
new/wai-extra-3.0.20.0/Network/Wai/Middleware/MethodOverride.hs
--- old/wai-extra-3.0.19.1/Network/Wai/Middleware/MethodOverride.hs 
2017-01-17 12:29:22.0 +0100
+++ new/wai-extra-3.0.20.0/Network/Wai/Middleware/MethodOverride.hs 
2017-06-01 14:48:32.0 +0200
@@ -5,12 +5,11 @@
 import Network.Wai
 import Control.Monad (join)
 
--- | Allows overriding of the HTTP request method via the _method query string
--- parameter.
+-- | Overriding of HTTP request method via `_method` query string parameter.
 --
--- This middleware only applies when the initial request method is POST. This
--- allow submitting of normal HTML forms, without worries of semantics
--- mismatches in the HTTP spec.
+-- This middleware only applies when the initial request method is POST.
+-- Allows submitting of normal HTML forms, without worries of semantic
+-- mismatches with the HTTP spec.
 methodOverride :: Middleware
 methodOverride app req =
 app req'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/Network/Wai/Test/Internal.hs 
new/wai-extra-3.0.20.0/Network/Wai/Test/Internal.hs
--- old/wai-extra-3.0.19.1/Network/Wai/Test/Internal.hs 1970-01-01 
01:00:00.0 +0100
+++ new/wai-extra-3.0.20.0/Network/Wai/Test/Internal.hs 2017-06-22 
18:16:39.0 +0200
@@ -0,0 +1,35 @@
+module Network.Wai.Test.Internal where
+
+import Network.Wai
+import qualified Control.Monad.Trans.State as ST
+import Control.Monad.Trans.Reader (ReaderT, runReaderT)
+import Data.Map (Map)
+import qualified Data.Map as Map
+import qualified Web.Cookie as Cookie
+import Data.ByteString (ByteString)
+
+type Session = ReaderT Application (ST.StateT ClientState IO)
+
+-- |
+--
+-- Since 3.0.6
+type ClientCookies = Map ByteString Cookie.SetCookie
+
+data ClientState = ClientState
+{ clientCookies :: ClientCookies
+}
+
+-- |
+--
+-- Since 3.0.20.0
+initState :: ClientState
+initState = ClientState Map.empty
+
+-- | Like 'runSession', but if allows you to hand in cookies and get
+-- the updated cookies back.  One use case for this is writing tests
+-- that address the application under test alternatingly through rest
+-- api and through db handle.
+--
+-- Since 3.0.20.0
+runSessionWith :: ClientState -> Session a -> Application -> IO (a, 
ClientState)
+runSessionWith st session app = ST.runStateT (runReaderT session app) st
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19.1/Network/Wai/Test.hs 
new/wai-extra-3.0.20.0/Network/Wai/Test.hs
--- old/wai-extra-3.0.19.1/Network/Wai/Test.hs  2017-01-17 12:29:22.0 
+0100
+++ 

commit ghc-wai-extra for openSUSE:Factory

2017-02-10 Thread root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2017-02-11 01:42:23

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-11-04 21:00:59.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2017-02-11 01:42:23.638759056 +0100
@@ -1,0 +2,5 @@
+Thu Jan 26 16:22:12 UTC 2017 - psim...@suse.com
+
+- Update to version 3.0.19.1 with cabal2obs.
+
+---

Old:

  wai-extra-3.0.19.tar.gz

New:

  wai-extra-3.0.19.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.ByeZk2/_old  2017-02-11 01:42:24.670613458 +0100
+++ /var/tmp/diff_new_pack.ByeZk2/_new  2017-02-11 01:42:24.674612893 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-wai-extra
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:3.0.19
+Version:3.0.19.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.19.tar.gz -> wai-extra-3.0.19.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19/ChangeLog.md 
new/wai-extra-3.0.19.1/ChangeLog.md
--- old/wai-extra-3.0.19/ChangeLog.md   2016-10-21 09:04:14.0 +0200
+++ new/wai-extra-3.0.19.1/ChangeLog.md 2017-01-17 12:29:22.0 +0100
@@ -1,3 +1,7 @@
+## 3.0.19.1
+
+* All loggers follow the autoFlush setting 
[#604](https://github.com/yesodweb/wai/pull/604)
+
 ## 3.0.19
 
 * Add a new function basicAuth', which passes request to the CheckCreds 
argument.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.19/Network/Wai/Middleware/RequestLogger.hs 
new/wai-extra-3.0.19.1/Network/Wai/Middleware/RequestLogger.hs
--- old/wai-extra-3.0.19/Network/Wai/Middleware/RequestLogger.hs
2016-10-21 09:04:14.0 +0200
+++ new/wai-extra-3.0.19.1/Network/Wai/Middleware/RequestLogger.hs  
2017-01-17 12:29:22.0 +0100
@@ -95,20 +95,19 @@
 Handle h -> (BS.hPutStr h . logToByteString, when autoFlush 
(hFlush h))
 Logger l -> (pushLogStr l, when autoFlush (flushLogStr l))
 Callback c -> (c, return ())
+callbackAndFlush str = callback str >> flusher
 case outputFormat of
 Apache ipsrc -> do
 getdate <- getDateGetter flusher
 apache <- initLogger ipsrc (LogCallback callback flusher) getdate
 return $ apacheMiddleware apache
-Detailed useColors -> detailedMiddleware
-  (\str -> callback str >> flusher)
-  useColors
+Detailed useColors -> detailedMiddleware callbackAndFlush useColors
 CustomOutputFormat formatter -> do
 getDate <- getDateGetter flusher
-return $ customMiddleware callback getDate formatter
+return $ customMiddleware callbackAndFlush getDate formatter
 CustomOutputFormatWithDetails formatter -> do
 getdate <- getDateGetter flusher
-return $ customMiddlewareWithDetails callback getdate formatter
+return $ customMiddlewareWithDetails callbackAndFlush getdate 
formatter
 
 apacheMiddleware :: ApacheLoggerActions -> Middleware
 apacheMiddleware ala app req sendResponse = app req $ \res -> do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.19/wai-extra.cabal 
new/wai-extra-3.0.19.1/wai-extra.cabal
--- old/wai-extra-3.0.19/wai-extra.cabal2016-10-21 09:04:14.0 
+0200
+++ new/wai-extra-3.0.19.1/wai-extra.cabal  2017-01-17 12:29:22.0 
+0100
@@ -1,5 +1,5 @@
 Name:wai-extra
-Version: 3.0.19
+Version: 3.0.19.1
 Synopsis:Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:




commit ghc-wai-extra for openSUSE:Factory

2016-11-04 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-11-04 21:00:58

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-10-22 13:21:20.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-11-04 21:00:59.0 +0100
@@ -1,0 +2,5 @@
+Thu Oct 27 15:54:48 UTC 2016 - psim...@suse.com
+
+- Update to version 3.0.19 with cabal2obs.
+
+---

Old:

  wai-extra-3.0.18.tar.gz

New:

  wai-extra-3.0.19.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.57crHq/_old  2016-11-04 21:01:00.0 +0100
+++ /var/tmp/diff_new_pack.57crHq/_new  2016-11-04 21:01:00.0 +0100
@@ -19,7 +19,7 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:3.0.18
+Version:3.0.19
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.18.tar.gz -> wai-extra-3.0.19.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.18/ChangeLog.md 
new/wai-extra-3.0.19/ChangeLog.md
--- old/wai-extra-3.0.18/ChangeLog.md   2016-09-26 06:19:24.0 +0200
+++ new/wai-extra-3.0.19/ChangeLog.md   2016-10-21 09:04:14.0 +0200
@@ -1,3 +1,7 @@
+## 3.0.19
+
+* Add a new function basicAuth', which passes request to the CheckCreds 
argument.
+
 ## 3.0.18
 
 * ForceSSL: preserve port number when redirecting to https. 
[#582](https://github.com/yesodweb/wai/pull/582)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.18/Network/Wai/Middleware/ForceSSL.hs 
new/wai-extra-3.0.19/Network/Wai/Middleware/ForceSSL.hs
--- old/wai-extra-3.0.18/Network/Wai/Middleware/ForceSSL.hs 2016-09-26 
06:19:24.0 +0200
+++ new/wai-extra-3.0.19/Network/Wai/Middleware/ForceSSL.hs 2016-10-21 
09:04:14.0 +0200
@@ -17,8 +17,6 @@
 import Data.Monoid ((<>))
 import Network.HTTP.Types (hLocation, methodGet, status301, status307)
 
-import Data.Word8 (_colon)
-
 -- | For requests that don't appear secure, redirect to https
 --
 -- Since 3.0.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.18/Network/Wai/Middleware/HttpAuth.hs 
new/wai-extra-3.0.19/Network/Wai/Middleware/HttpAuth.hs
--- old/wai-extra-3.0.18/Network/Wai/Middleware/HttpAuth.hs 2016-09-26 
06:19:24.0 +0200
+++ new/wai-extra-3.0.19/Network/Wai/Middleware/HttpAuth.hs 2016-10-21 
09:04:14.0 +0200
@@ -5,6 +5,7 @@
 module Network.Wai.Middleware.HttpAuth
 ( -- * Middleware
   basicAuth
+, basicAuth'
 , CheckCreds
 , AuthSettings
 , authRealm
@@ -36,11 +37,19 @@
 --
 -- > basicAuth (\u p -> return $ u == "michael" && p == "mypass") "My Realm"
 --
--- Since 1.3.4
+-- @since 1.3.4
 basicAuth :: CheckCreds
   -> AuthSettings
   -> Middleware
-basicAuth checkCreds AuthSettings {..} app req sendResponse = do
+basicAuth checkCreds = basicAuth' (\_ -> checkCreds)
+
+-- | Like 'basicAuth', but also passes a request to the authentication 
function.
+--
+-- @since 3.0.19
+basicAuth' :: (Request -> CheckCreds)
+   -> AuthSettings
+   -> Middleware
+basicAuth' checkCreds AuthSettings {..} app req sendResponse = do
 isProtected <- authIsProtected req
 allowed <- if isProtected then check else return True
 if allowed
@@ -51,8 +60,7 @@
 case (lookup hAuthorization $ requestHeaders req)
  >>= extractBasicAuth of
 Nothing -> return False
-Just (username, password) -> checkCreds username password
-
+Just (username, password) -> checkCreds req username password
 
 -- | Basic authentication settings. This value is an instance of
 -- @IsString@, so the recommended approach to create a value is to
@@ -61,23 +69,23 @@
 --
 -- > "My Realm" { authIsProtected = someFunc } :: AuthSettings
 --
--- Since 1.3.4
+-- @since 1.3.4
 data AuthSettings = AuthSettings
 { authRealm :: !ByteString
 -- ^
 --
--- Since 1.3.4
+-- @since 1.3.4
 , authOnNoAuth :: !(ByteString -> Application)
 -- ^ Takes the realm and returns an appropriate 401 response when
 -- authentication is not provided.
 --
--- Since 1.3.4
+-- @since 1.3.4
 , authIsProtected :: !(Request -> IO Bool)
 -- ^ Determine if access to the 

commit ghc-wai-extra for openSUSE:Factory

2016-10-22 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-10-22 13:21:18

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-07-20 09:23:22.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-10-22 13:21:20.0 +0200
@@ -1,0 +2,10 @@
+Sat Oct  1 17:18:08 UTC 2016 - psim...@suse.com
+
+- Update to version 3.0.18 with cabal2obs.
+
+---
+Thu Sep 15 06:45:37 UTC 2016 - psim...@suse.com
+
+- Update to version 3.0.17 revision 0 with cabal2obs.
+
+---

Old:

  wai-extra-3.0.16.1.tar.gz

New:

  wai-extra-3.0.18.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.bwQUK5/_old  2016-10-22 13:21:21.0 +0200
+++ /var/tmp/diff_new_pack.bwQUK5/_new  2016-10-22 13:21:21.0 +0200
@@ -19,15 +19,14 @@
 %global pkg_name wai-extra
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:3.0.16.1
+Version:3.0.18
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT
-Group:  System/Libraries
+Group:  Development/Languages/Other
 Url:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-ansi-terminal-devel
 BuildRequires:  ghc-base64-bytestring-devel
@@ -65,7 +64,6 @@
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-hspec-devel
 %endif
-# End cabal-rpm deps
 
 %description
 Provides basic WAI handler and middleware functionality:
@@ -143,20 +141,14 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache

++ wai-extra-3.0.16.1.tar.gz -> wai-extra-3.0.18.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.16.1/ChangeLog.md 
new/wai-extra-3.0.18/ChangeLog.md
--- old/wai-extra-3.0.16.1/ChangeLog.md 2016-07-06 11:53:58.0 +0200
+++ new/wai-extra-3.0.18/ChangeLog.md   2016-09-26 06:19:24.0 +0200
@@ -1,3 +1,11 @@
+## 3.0.18
+
+* ForceSSL: preserve port number when redirecting to https. 
[#582](https://github.com/yesodweb/wai/pull/582)
+
+## 3.0.17
+
+* Gzip pre compressed [#580](https://github.com/yesodweb/wai/pull/580)
+
 ## 3.0.16.1
 
 * Fix the way the header length is checked (for limiting the max header length)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.16.1/Network/Wai/Middleware/ForceSSL.hs 
new/wai-extra-3.0.18/Network/Wai/Middleware/ForceSSL.hs
--- old/wai-extra-3.0.16.1/Network/Wai/Middleware/ForceSSL.hs   2016-07-06 
11:53:58.0 +0200
+++ new/wai-extra-3.0.18/Network/Wai/Middleware/ForceSSL.hs 2016-09-26 
06:19:24.0 +0200
@@ -17,7 +17,6 @@
 import Data.Monoid ((<>))
 import Network.HTTP.Types (hLocation, methodGet, status301, status307)
 
-import qualified Data.ByteString as S
 import Data.Word8 (_colon)
 
 -- | For requests that don't appear secure, redirect to https
@@ -31,13 +30,10 @@
 
 redirectResponse :: Request -> Maybe Response
 redirectResponse req = do
-(host, _) <- S.break (== _colon) <$> requestHeaderHost req
-
-return $ responseBuilder status [(hLocation, location host)] mempty
-
+  host <- requestHeaderHost req
+  return $ responseBuilder status [(hLocation, location host)] mempty
   where
 location h = "https://; <> h <> rawPathInfo req <> rawQueryString req
-
 status
 | requestMethod req == methodGet = status301
 | otherwise = status307
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.16.1/Network/Wai/Middleware/Gzip.hs 
new/wai-extra-3.0.18/Network/Wai/Middleware/Gzip.hs
--- old/wai-extra-3.0.16.1/Network/Wai/Middleware/Gzip.hs   2016-07-06 
11:53:58.0 +0200
+++ new/wai-extra-3.0.18/Network/Wai/Middleware/Gzip.hs 2016-09-26 
06:19:24.0 +0200
@@ -58,6 +58,10 @@
-- platforms.
 | GzipCacheFolder FilePath -- ^ Compress files, caching them in
-- some directory.
+| GzipPreCompressed GzipFiles -- ^ If we 

commit ghc-wai-extra for openSUSE:Factory

2016-07-20 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-07-20 09:23:20

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-07-12 23:52:58.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-07-20 09:23:22.0 +0200
@@ -1,0 +2,5 @@
+Mon Jul 18 07:50:33 UTC 2016 - psim...@suse.com
+
+- Update to version 3.0.16.1 revision 0 with cabal2obs.
+
+---



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.nBXEAN/_old  2016-07-20 09:23:23.0 +0200
+++ /var/tmp/diff_new_pack.nBXEAN/_new  2016-07-20 09:23:23.0 +0200
@@ -17,22 +17,16 @@
 
 
 %global pkg_name wai-extra
-
 %bcond_with tests
-
-Name:   ghc-wai-extra
+Name:   ghc-%{pkg_name}
 Version:3.0.16.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT
 Group:  System/Libraries
-
 Url:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-BuildRoot:  %{_tmppath}/%{name}-%{version}-build
-
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-rpm-macros
 # Begin cabal-rpm deps:
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-ansi-terminal-devel
@@ -52,6 +46,7 @@
 BuildRequires:  ghc-network-devel
 BuildRequires:  ghc-old-locale-devel
 BuildRequires:  ghc-resourcet-devel
+BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-streaming-commons-devel
 BuildRequires:  ghc-stringsearch-devel
 BuildRequires:  ghc-text-devel
@@ -64,55 +59,69 @@
 BuildRequires:  ghc-wai-devel
 BuildRequires:  ghc-wai-logger-devel
 BuildRequires:  ghc-word8-devel
+BuildRequires:  ghc-zlib-devel
+BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-hspec-devel
-BuildRequires:  ghc-zlib-devel
 %endif
 # End cabal-rpm deps
 
 %description
 Provides basic WAI handler and middleware functionality:
+
 * WAI Testing Framework
 
 Hspec testing facilities and helpers for WAI.
+
 * Event Source/Event Stream
 
 Send server events to the client. Compatible with the JavaScript EventSource
 API.
+
 * Accept Override
 
 Override the Accept header in a request. Special handling for the _accept query
 parameter (which is used throughout WAI override the Accept header).
+
 * Add Headers
 
 WAI Middleware for adding arbitrary headers to an HTTP request.
+
 * Clean Path
 
 Clean a request path to a canonical form.
+
 * GZip Compression
 
 Negotiate HTTP payload gzip compression.
+
 * HTTP Basic Authentication
 
 WAI Basic Authentication Middleware which uses Authorization header.
+
 * JSONP
 
 "JSON with Padding" middleware. Automatic wrapping of JSON responses to convert
 into JSONP.
+
 * Method Override / Post
 
 Allows overriding of the HTTP request method via the _method query string
 parameter.
+
 * Request Logging
 
 Request logging middleware for development and production environments
+
 * Request Rewrite
 
 Rewrite request path info based on a custom conversion rules.
+
 * Stream Files
 
 Convert ResponseFile type responses into ResponseStream type.
+
 * Virtual Host
 
 Redirect incoming requests to a new host based on custom rules.
@@ -120,33 +129,35 @@
 API docs and the README are available at
 .
 
-
 %package devel
 Summary:Haskell %{pkg_name} library development files
 Group:  Development/Libraries/Other
+Requires:   %{name} = %{version}-%{release}
 Requires:   ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}
 Requires(postun): ghc-compiler = %{ghc_version}
-Requires:   %{name} = %{version}-%{release}
 
 %description devel
 This package provides the Haskell %{pkg_name} library development files.
 
-
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
+
 %build
 %ghc_lib_build
 
+
 %install
 %ghc_lib_install
 
+
 %check
 %if %{with tests}
-%cabal test
+%{cabal} test
 %endif
 
+
 %post devel
 %ghc_pkg_recache
 
@@ -159,6 +170,6 @@
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
-%doc README.md
+%doc ChangeLog.md README.md
 
 %changelog




commit ghc-wai-extra for openSUSE:Factory

2016-07-12 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-07-12 23:52:56

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-06-25 02:21:59.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-07-12 23:52:58.0 +0200
@@ -1,0 +2,7 @@
+Sun Jul 10 16:05:30 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.16.1
+* Fix the way the header length is checked (for limiting the max header length)
+* Add a new function "parseRequestBodyEx" that allows various size limits to 
be set.
+
+---

Old:

  wai-extra-3.0.15.2.tar.gz

New:

  wai-extra-3.0.16.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.2FWCfy/_old  2016-07-12 23:52:59.0 +0200
+++ /var/tmp/diff_new_pack.2FWCfy/_new  2016-07-12 23:52:59.0 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-wai-extra
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.15.2
+Version:3.0.16.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.15.2.tar.gz -> wai-extra-3.0.16.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15.2/ChangeLog.md 
new/wai-extra-3.0.16.1/ChangeLog.md
--- old/wai-extra-3.0.15.2/ChangeLog.md 2016-06-16 13:53:10.0 +0200
+++ new/wai-extra-3.0.16.1/ChangeLog.md 2016-07-06 11:53:58.0 +0200
@@ -1,3 +1,15 @@
+## 3.0.16.1
+
+* Fix the way the header length is checked (for limiting the max header length)
+
+## 3.0.16.0
+
+* Add a new function "parseRequestBodyEx" that allows various size limits to 
be set.
+
+## 3.0.15.3
+
+* Allow wai-logger 2.3
+
 ## 3.0.15.2
 
 * Doc improvements
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15.2/Network/Wai/Parse.hs 
new/wai-extra-3.0.16.1/Network/Wai/Parse.hs
--- old/wai-extra-3.0.15.2/Network/Wai/Parse.hs 2016-06-16 13:53:10.0 
+0200
+++ new/wai-extra-3.0.16.1/Network/Wai/Parse.hs 2016-07-06 11:53:58.0 
+0200
@@ -11,6 +11,7 @@
 , RequestBodyType (..)
 , getRequestBodyType
 , sinkRequestBody
+, sinkRequestBodyEx
 , BackEnd
 , lbsBackEnd
 , tempFileBackEnd
@@ -19,6 +20,23 @@
 , File
 , FileInfo (..)
 , parseContentType
+, ParseRequestBodyOptions
+, defaultParseRequestBodyOptions
+, parseRequestBodyEx
+, setMaxRequestKeyLength
+, clearMaxRequestKeyLength
+, setMaxRequestNumFiles
+, clearMaxRequestNumFiles
+, setMaxRequestFileSize
+, clearMaxRequestFileSize
+, setMaxRequestFilesSize
+, clearMaxRequestFilesSize
+, setMaxRequestParmsSize
+, clearMaxRequestParmsSize
+, setMaxHeaderLines
+, clearMaxHeaderLines
+, setMaxHeaderLineLength
+, clearMaxHeaderLineLength
 #if TEST
 , Bound (..)
 , findBound
@@ -34,19 +52,23 @@
 import qualified Data.ByteString.Lazy as L
 import qualified Data.ByteString.Char8 as S8
 import Data.Word (Word8)
-import Data.Maybe (fromMaybe)
+import Data.Int (Int64)
+import Data.Maybe (catMaybes, fromMaybe)
 import Data.List (sortBy)
 import Data.Function (on, fix)
 import System.Directory (removeFile, getTemporaryDirectory)
 import System.IO (hClose, openBinaryTempFile)
 import Network.Wai
 import qualified Network.HTTP.Types as H
+import Control.Applicative ((<$>))
 import Control.Monad (when, unless)
 import Control.Monad.Trans.Resource (allocate, release, register, 
InternalState, runInternalState)
 import Data.IORef
 import Network.HTTP.Types (hContentType)
 import Data.CaseInsensitive (mk)
 
+import Prelude hiding (lines)
+
 breakDiscard :: Word8 -> S.ByteString -> (S.ByteString, S.ByteString)
 breakDiscard w s =
 let (x, y) = S.break (== w) s
@@ -103,10 +125,8 @@
 -> ignored2
 -> IO S.ByteString
 -> IO FilePath
-tempFileBackEndOpts getTmpDir pattern internalState _ _ popper = do
-(key, (fp, h)) <- flip runInternalState internalState $ allocate (do
-tempDir <- getTmpDir
-openBinaryTempFile tempDir 

commit ghc-wai-extra for openSUSE:Factory

2016-06-24 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-06-25 02:21:11

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-04-30 23:30:51.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-06-25 02:21:59.0 +0200
@@ -1,0 +2,6 @@
+Fri Jun 17 06:33:09 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.15.2
+* Doc improvements
+
+---

Old:

  wai-extra-3.0.15.1.tar.gz

New:

  wai-extra-3.0.15.2.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.yIyWK4/_old  2016-06-25 02:22:00.0 +0200
+++ /var/tmp/diff_new_pack.yIyWK4/_new  2016-06-25 02:22:00.0 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.15.1
+Version:3.0.15.2
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.15.1.tar.gz -> wai-extra-3.0.15.2.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15.1/ChangeLog.md 
new/wai-extra-3.0.15.2/ChangeLog.md
--- old/wai-extra-3.0.15.1/ChangeLog.md 2016-04-25 15:20:48.0 +0200
+++ new/wai-extra-3.0.15.2/ChangeLog.md 2016-06-16 13:53:10.0 +0200
@@ -1,3 +1,7 @@
+## 3.0.15.2
+
+* Doc improvements
+
 ## 3.0.15.1
 
 * don't use deprecated CRT functions on Windows 
[#544](https://github.com/yesodweb/wai/pull/544)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15.1/Network/Wai/Middleware/Gzip.hs 
new/wai-extra-3.0.15.2/Network/Wai/Middleware/Gzip.hs
--- old/wai-extra-3.0.15.1/Network/Wai/Middleware/Gzip.hs   2016-01-11 
18:14:32.0 +0100
+++ new/wai-extra-3.0.15.2/Network/Wai/Middleware/Gzip.hs   2016-06-16 
13:53:10.0 +0200
@@ -50,12 +50,23 @@
 , gzipCheckMime :: S.ByteString -> Bool
 }
 
-data GzipFiles = GzipIgnore | GzipCompress | GzipCacheFolder FilePath
+-- | Gzip behavior for files.
+data GzipFiles
+= GzipIgnore -- ^ Do not compress file responses.
+| GzipCompress -- ^ Compress files. Note that this may counteract
+   -- zero-copy response optimizations on some
+   -- platforms.
+| GzipCacheFolder FilePath -- ^ Compress files, caching them in
+   -- some directory.
 deriving (Show, Eq, Read)
 
+-- | Use default MIME settings; /do not/ compress files.
 instance Default GzipSettings where
 def = GzipSettings GzipIgnore defaultCheckMime
 
+-- | MIME types that will be compressed by default:
+-- @text/*@, @application/json@, @application/javascript@,
+-- @application/ecmascript@, @image/x-icon@.
 defaultCheckMime :: S.ByteString -> Bool
 defaultCheckMime bs =
 S8.isPrefixOf "text/" bs || bs' `Set.member` toCompress
@@ -73,9 +84,7 @@
 -- Analyzes the \"Accept-Encoding\" header from the client to determine
 -- if gzip is supported.
 --
--- Possible future enhancements:
---
--- * Only compress if the response is above a certain size.
+-- File responses will be compressed according to the 'GzipFiles' setting.
 gzip :: GzipSettings -> Middleware
 gzip set app env sendResponse = app env $ \res ->
 case res of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15.1/wai-extra.cabal 
new/wai-extra-3.0.15.2/wai-extra.cabal
--- old/wai-extra-3.0.15.1/wai-extra.cabal  2016-04-25 15:20:53.0 
+0200
+++ new/wai-extra-3.0.15.2/wai-extra.cabal  2016-06-16 13:53:10.0 
+0200
@@ -1,5 +1,5 @@
 Name:wai-extra
-Version: 3.0.15.1
+Version: 3.0.15.2
 Synopsis:Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:




commit ghc-wai-extra for openSUSE:Factory

2016-04-30 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-04-30 23:30:50

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-03-31 13:02:45.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-04-30 23:30:51.0 +0200
@@ -1,0 +2,6 @@
+Tue Apr 26 09:19:11 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.15.1
+* don't use deprecated CRT functions on Windows
+
+---

Old:

  wai-extra-3.0.15.tar.gz

New:

  wai-extra-3.0.15.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.qUEMFg/_old  2016-04-30 23:30:51.0 +0200
+++ /var/tmp/diff_new_pack.qUEMFg/_new  2016-04-30 23:30:51.0 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.15
+Version:3.0.15.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.15.tar.gz -> wai-extra-3.0.15.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15/ChangeLog.md 
new/wai-extra-3.0.15.1/ChangeLog.md
--- old/wai-extra-3.0.15/ChangeLog.md   2016-03-22 10:15:32.0 +0100
+++ new/wai-extra-3.0.15.1/ChangeLog.md 2016-04-25 15:20:48.0 +0200
@@ -1,3 +1,7 @@
+## 3.0.15.1
+
+* don't use deprecated CRT functions on Windows 
[#544](https://github.com/yesodweb/wai/pull/544)
+
 ## 3.0.15
 
 * add requestSizeCheck [#525](https://github.com/yesodweb/wai/pull/525)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15/Network/Wai/Handler/SCGI.hs 
new/wai-extra-3.0.15.1/Network/Wai/Handler/SCGI.hs
--- old/wai-extra-3.0.15/Network/Wai/Handler/SCGI.hs2016-03-22 
10:15:32.0 +0100
+++ new/wai-extra-3.0.15.1/Network/Wai/Handler/SCGI.hs  2016-04-25 
15:20:34.0 +0200
@@ -1,4 +1,4 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface #-}
 module Network.Wai.Handler.SCGI
 ( run
 , runSendfile
@@ -86,6 +86,16 @@
 foreign import ccall unsafe "accept"
 c'accept :: CInt -> Ptr a -> Ptr a -> IO CInt
 
+#if WINDOWS
+foreign import ccall unsafe "_close"
+c'close :: CInt -> IO CInt
+
+foreign import ccall unsafe "_write"
+c'write :: CInt -> Ptr CChar -> CInt -> IO CInt
+
+foreign import ccall unsafe "_read"
+c'read :: CInt -> Ptr CChar -> CInt -> IO CInt
+#else
 foreign import ccall unsafe "close"
 c'close :: CInt -> IO CInt
 
@@ -94,3 +104,4 @@
 
 foreign import ccall unsafe "read"
 c'read :: CInt -> Ptr CChar -> CInt -> IO CInt
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.15/wai-extra.cabal 
new/wai-extra-3.0.15.1/wai-extra.cabal
--- old/wai-extra-3.0.15/wai-extra.cabal2016-03-22 10:15:32.0 
+0100
+++ new/wai-extra-3.0.15.1/wai-extra.cabal  2016-04-25 15:20:53.0 
+0200
@@ -1,5 +1,5 @@
 Name:wai-extra
-Version: 3.0.15
+Version: 3.0.15.1
 Synopsis:Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:
@@ -82,7 +82,7 @@
   README.md
 
 Library
-  Build-Depends: base  >= 4 && < 5
+  Build-Depends: base  >= 4.6 && < 5
, bytestring>= 0.9.1.4
, wai   >= 3.0.3.0  && < 3.3
, old-locale>= 1.0.0.2  && < 1.1
@@ -95,8 +95,8 @@
, text  >= 0.7
, case-insensitive  >= 0.2
, data-default-class
-   , fast-logger   >= 2.1  && < 2.5
-   , wai-logger>= 2.0  && < 2.3
+   , fast-logger   >= 2.4.5&& < 2.5
+   , wai-logger>= 2.2.6&& < 2.3
, ansi-terminal
, resourcet >= 0.4.6&& < 1.2
, void  >= 0.5




commit ghc-wai-extra for openSUSE:Factory

2016-03-31 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-03-31 13:02:43

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-03-26 15:26:24.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-03-31 13:02:45.0 +0200
@@ -1,0 +2,6 @@
+Wed Mar 23 08:24:05 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.15
+* add requestSizeCheck
+
+---

Old:

  wai-extra-3.0.14.3.tar.gz

New:

  wai-extra-3.0.15.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.CMbPSh/_old  2016-03-31 13:02:48.0 +0200
+++ /var/tmp/diff_new_pack.CMbPSh/_new  2016-03-31 13:02:48.0 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.14.3
+Version:3.0.15
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.14.3.tar.gz -> wai-extra-3.0.15.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14.3/ChangeLog.md 
new/wai-extra-3.0.15/ChangeLog.md
--- old/wai-extra-3.0.14.3/ChangeLog.md 2016-03-16 13:47:43.0 +0100
+++ new/wai-extra-3.0.15/ChangeLog.md   2016-03-22 10:15:32.0 +0100
@@ -1,3 +1,7 @@
+## 3.0.15
+
+* add requestSizeCheck [#525](https://github.com/yesodweb/wai/pull/525)
+
 ## 3.0.14.3
 
 * Add missing `requestHeaderReferer` and `requestHeaderUserAgent` fields to 
CGI [yesod#1186](https://github.com/yesodweb/yesod/issues/1186)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14.3/Network/Wai/Request.hs 
new/wai-extra-3.0.15/Network/Wai/Request.hs
--- old/wai-extra-3.0.14.3/Network/Wai/Request.hs   2016-03-16 
13:47:43.0 +0100
+++ new/wai-extra-3.0.15/Network/Wai/Request.hs 2016-03-22 10:15:32.0 
+0100
@@ -1,17 +1,25 @@
+{-# LANGUAGE DeriveDataTypeable #-}
 -- | Some helpers for interrogating a WAI 'Request'.
 
 module Network.Wai.Request
 ( appearsSecure
 , guessApproot
+, RequestSizeException(..)
+, requestSizeCheck
 ) where
 
 import Data.ByteString (ByteString)
 import Data.Maybe (fromMaybe)
 import Network.HTTP.Types (HeaderName)
-import Network.Wai (Request, isSecure, requestHeaders, requestHeaderHost)
+import Network.Wai
 
 import qualified Data.ByteString as S
 import qualified Data.ByteString.Char8 as C
+import Control.Exception (Exception, throwIO)
+import Data.Typeable (Typeable)
+import Data.Word (Word64)
+import Data.IORef (atomicModifyIORef', newIORef)
+
 
 -- | Does this request appear to have been made over an SSL connection?
 --
@@ -24,7 +32,7 @@
 -- force a non-SSL request to SSL by redirect. One can safely choose not to
 -- redirect when the request /appears/ secure, even if it's actually not.
 --
--- Since 3.0.7
+-- @since 3.0.7
 appearsSecure :: Request -> Bool
 appearsSecure request = isSecure request || any (uncurry matchHeader)
 [ ("HTTPS"  , (== "on"))
@@ -44,8 +52,50 @@
 -- application. For more information and relevant caveats, please see
 -- "Network.Wai.Middleware.Approot".
 --
--- Since 3.0.7
+-- @since 3.0.7
 guessApproot :: Request -> ByteString
 guessApproot req =
 (if appearsSecure req then "https://; else "http://;) `S.append`
 (fromMaybe "localhost" $ requestHeaderHost req)
+
+-- | see 'requestSizeCheck'
+--
+-- @since 3.0.15
+data RequestSizeException
+= RequestSizeException Word64
+deriving (Eq, Ord, Typeable)
+
+instance Exception RequestSizeException
+
+instance Show RequestSizeException where
+showsPrec p (RequestSizeException limit) =
+showString ("Request Body is larger than ") . showsPrec p limit . 
showString " bytes."
+
+-- | Check request body size to avoid server crash when request is too large.
+--
+-- This function first checks @'requestBodyLength'@, if content-length is known
+-- but larger than limit, or it's unknown but we have received too many chunks,
+-- a 'RequestSizeException' are thrown when user use @'requestBody'@ to extract
+-- request body inside IO.
+--
+-- @since 3.0.15
+requestSizeCheck :: Word64 -> Request -> IO Request
+requestSizeCheck maxSize req =
+case requestBodyLength req of
+KnownLength len  ->
+if len > maxSize
+then return $ req { requestBody = throwIO 
(RequestSizeException maxSize) }
+else return req
+   

commit ghc-wai-extra for openSUSE:Factory

2016-03-26 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-03-26 15:26:20

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-03-16 10:33:46.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-03-26 15:26:24.0 +0100
@@ -1,0 +2,7 @@
+Fri Mar 18 08:35:50 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.14.3
+* Add missing requestHeaderReferer and requestHeaderUserAgent fields to CGI
+* Case insensitive multipart request header lookup
+
+---

Old:

  wai-extra-3.0.14.1.tar.gz

New:

  wai-extra-3.0.14.3.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.TxooqJ/_old  2016-03-26 15:26:25.0 +0100
+++ /var/tmp/diff_new_pack.TxooqJ/_new  2016-03-26 15:26:25.0 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.14.1
+Version:3.0.14.3
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.14.1.tar.gz -> wai-extra-3.0.14.3.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14.1/ChangeLog.md 
new/wai-extra-3.0.14.3/ChangeLog.md
--- old/wai-extra-3.0.14.1/ChangeLog.md 2016-02-29 09:16:01.0 +0100
+++ new/wai-extra-3.0.14.3/ChangeLog.md 2016-03-16 13:47:43.0 +0100
@@ -1,3 +1,11 @@
+## 3.0.14.3
+
+* Add missing `requestHeaderReferer` and `requestHeaderUserAgent` fields to 
CGI [yesod#1186](https://github.com/yesodweb/yesod/issues/1186)
+
+## 3.0.14.2
+
+* Case insensitive multipart request header lookup 
[#518](https://github.com/yesodweb/wai/pull/518)
+
 ## 3.0.14.1
 
 * Doc update for logStdout and logStdoutDev 
[#515](https://github.com/yesodweb/wai/issues/515)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14.1/Network/Wai/Handler/CGI.hs 
new/wai-extra-3.0.14.3/Network/Wai/Handler/CGI.hs
--- old/wai-extra-3.0.14.1/Network/Wai/Handler/CGI.hs   2016-02-29 
09:16:01.0 +0100
+++ new/wai-extra-3.0.14.3/Network/Wai/Handler/CGI.hs   2016-03-16 
13:47:43.0 +0100
@@ -118,6 +118,10 @@
 , requestBodyLength = KnownLength $ fromIntegral contentLength
 , requestHeaderHost = lookup "host" reqHeaders
 , requestHeaderRange = lookup hRange reqHeaders
+#if MIN_VERSION_wai(3,2,0)
+, requestHeaderReferer = lookup "referer" reqHeaders
+, requestHeaderUserAgent = lookup "user-agent" reqHeaders
+#endif
 }
 void $ app env $ \res ->
 case (xsendfile, res) of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14.1/Network/Wai/Parse.hs 
new/wai-extra-3.0.14.3/Network/Wai/Parse.hs
--- old/wai-extra-3.0.14.1/Network/Wai/Parse.hs 2016-02-29 09:16:01.0 
+0100
+++ new/wai-extra-3.0.14.3/Network/Wai/Parse.hs 2016-03-16 13:47:43.0 
+0100
@@ -45,6 +45,7 @@
 import Control.Monad.Trans.Resource (allocate, release, register, 
InternalState, runInternalState)
 import Data.IORef
 import Network.HTTP.Types (hContentType)
+import Data.CaseInsensitive (mk)
 
 breakDiscard :: Word8 -> S.ByteString -> (S.ByteString, S.ByteString)
 breakDiscard w s =
@@ -94,7 +95,7 @@
 tempFileBackEnd :: InternalState -> ignored1 -> ignored2 -> IO S.ByteString -> 
IO FilePath
 tempFileBackEnd = tempFileBackEndOpts getTemporaryDirectory "webenc.buf"
 
--- | Same as 'tempFileSink', but use configurable temp folders and patterns.
+-- | Same as 'tempFileBackEnd', but use configurable temp folders and patterns.
 tempFileBackEndOpts :: IO FilePath -- ^ get temporary directory
 -> String -- ^ filename pattern
 -> InternalState
@@ -300,11 +301,11 @@
 (wasFound, ()) <- sinkTillBound bound iter seed src
 when wasFound (loop src)
   where
-contDisp = S8.pack "Content-Disposition"
-contType = S8.pack "Content-Type"
+contDisp = mk $ S8.pack "Content-Disposition"
+contType = mk $ S8.pack "Content-Type"
 parsePair s =
 let (x, y) = breakDiscard 58 s -- colon
- in (x, S.dropWhile (== 32) y) -- space
+ in (mk $ x, S.dropWhile (== 32) y) -- space
 
 data Bound = FoundBound S.ByteString S.ByteString
| NoBound
diff -urN '--exclude=CVS' 

commit ghc-wai-extra for openSUSE:Factory

2016-03-16 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-03-16 10:33:45

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-01-22 01:08:20.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-03-16 10:33:46.0 +0100
@@ -1,0 +2,6 @@
+Tue Mar  8 09:15:03 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.14.1
+* Doc update for logStdout and logStdoutDev 
+
+---

Old:

  wai-extra-3.0.14.tar.gz

New:

  wai-extra-3.0.14.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.4YiBxo/_old  2016-03-16 10:33:47.0 +0100
+++ /var/tmp/diff_new_pack.4YiBxo/_new  2016-03-16 10:33:47.0 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.14
+Version:3.0.14.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.14.tar.gz -> wai-extra-3.0.14.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14/ChangeLog.md 
new/wai-extra-3.0.14.1/ChangeLog.md
--- old/wai-extra-3.0.14/ChangeLog.md   2016-01-12 14:53:39.0 +0100
+++ new/wai-extra-3.0.14.1/ChangeLog.md 2016-02-29 09:16:01.0 +0100
@@ -1,3 +1,7 @@
+## 3.0.14.1
+
+* Doc update for logStdout and logStdoutDev 
[#515](https://github.com/yesodweb/wai/issues/515)
+
 ## 3.0.14
 
 * Middleware to force domain names. 
[#506](https://github.com/yesodweb/wai/issues/506) 
[#507](https://github.com/yesodweb/wai/pull/507)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.14/Network/Wai/Middleware/RequestLogger.hs 
new/wai-extra-3.0.14.1/Network/Wai/Middleware/RequestLogger.hs
--- old/wai-extra-3.0.14/Network/Wai/Middleware/RequestLogger.hs
2016-01-12 14:53:39.0 +0100
+++ new/wai-extra-3.0.14.1/Network/Wai/Middleware/RequestLogger.hs  
2016-02-29 09:16:01.0 +0100
@@ -140,14 +140,16 @@
 return rspRcv
 
 -- | Production request logger middleware.
+--
+-- This uses the 'Apache' logging format, and takes IP addresses for clients 
from
+-- the socket (see 'IPAddrSource' for more information). It logs to 'stdout'.
 {-# NOINLINE logStdout #-}
 logStdout :: Middleware
 logStdout = unsafePerformIO $ mkRequestLogger def { outputFormat = Apache 
FromSocket }
 
 -- | Development request logger middleware.
 --
--- Flushes 'stdout' on each request, which would be inefficient in production 
use.
--- Use "logStdout" in production.
+-- This uses the 'Detailed' 'True' logging format and logs to 'stdout'.
 {-# NOINLINE logStdoutDev #-}
 logStdoutDev :: Middleware
 logStdoutDev = unsafePerformIO $ mkRequestLogger def
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.14/wai-extra.cabal 
new/wai-extra-3.0.14.1/wai-extra.cabal
--- old/wai-extra-3.0.14/wai-extra.cabal2016-01-12 14:53:39.0 
+0100
+++ new/wai-extra-3.0.14.1/wai-extra.cabal  2016-02-29 09:16:01.0 
+0100
@@ -1,5 +1,5 @@
 Name:wai-extra
-Version: 3.0.14
+Version: 3.0.14.1
 Synopsis:Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:




commit ghc-wai-extra for openSUSE:Factory

2016-01-21 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-01-21 23:43:15

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2016-01-07 00:25:08.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-01-22 01:08:20.0 +0100
@@ -1,0 +2,6 @@
+Fri Jan 15 10:21:47 UTC 2016 - mimi...@gmail.com
+
+- update to 3.0.14
+* Middleware to force domain names.
+
+---

Old:

  wai-extra-3.0.13.1.tar.gz

New:

  wai-extra-3.0.14.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.o5Bz0e/_old  2016-01-22 01:08:22.0 +0100
+++ /var/tmp/diff_new_pack.o5Bz0e/_new  2016-01-22 01:08:22.0 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.13.1
+Version:3.0.14
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.13.1.tar.gz -> wai-extra-3.0.14.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.13.1/ChangeLog.md 
new/wai-extra-3.0.14/ChangeLog.md
--- old/wai-extra-3.0.13.1/ChangeLog.md 2015-12-30 07:49:09.0 +0100
+++ new/wai-extra-3.0.14/ChangeLog.md   2016-01-12 14:53:39.0 +0100
@@ -1,3 +1,7 @@
+## 3.0.14
+
+* Middleware to force domain names. 
[#506](https://github.com/yesodweb/wai/issues/506) 
[#507](https://github.com/yesodweb/wai/pull/507)
+
 ## 3.0.13.1
 
 * Support wai 3.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.13.1/Network/Wai/Middleware/ForceDomain.hs 
new/wai-extra-3.0.14/Network/Wai/Middleware/ForceDomain.hs
--- old/wai-extra-3.0.13.1/Network/Wai/Middleware/ForceDomain.hs
1970-01-01 01:00:00.0 +0100
+++ new/wai-extra-3.0.14/Network/Wai/Middleware/ForceDomain.hs  2016-01-12 
14:53:39.0 +0100
@@ -0,0 +1,38 @@
+-- |
+--
+-- @since 3.0.14
+module Network.Wai.Middleware.ForceDomain where
+
+import Data.ByteString (ByteString)
+import Data.Monoid ((<>), mempty)
+import Network.HTTP.Types (hLocation, methodGet, status301, status307)
+import Prelude
+
+import Network.Wai
+import Network.Wai.Request
+
+-- | Force a domain by redirecting.
+-- The `checkDomain` function takes the current domain and checks whether it 
is correct.
+-- It should return `Nothing` if the domain is correct, or `Just "domain.com"` 
if it is incorrect.
+--
+-- @since 3.0.14
+forceDomain :: (ByteString -> Maybe ByteString) -> Middleware
+forceDomain checkDomain app req sendResponse =
+case requestHeaderHost req >>= checkDomain of
+Nothing ->
+app req sendResponse
+Just domain ->
+sendResponse $ redirectResponse domain
+
+where
+-- From: Network.Wai.Middleware.ForceSSL
+redirectResponse domain =
+responseBuilder status [(hLocation, location domain)] mempty
+
+location h =
+let p = if appearsSecure req then "https://; else "http://; in
+p <> h <> rawPathInfo req <> rawQueryString req
+
+status
+| requestMethod req == methodGet = status301
+| otherwise = status307
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.13.1/Network/Wai/Middleware/Gzip.hs 
new/wai-extra-3.0.14/Network/Wai/Middleware/Gzip.hs
--- old/wai-extra-3.0.13.1/Network/Wai/Middleware/Gzip.hs   2015-12-30 
07:49:09.0 +0100
+++ new/wai-extra-3.0.14/Network/Wai/Middleware/Gzip.hs 2016-01-12 
14:53:39.0 +0100
@@ -65,6 +65,7 @@
 [ "application/json"
 , "application/javascript"
 , "application/ecmascript"
+, "image/x-icon"
 ]
 
 -- | Use gzip to compress the body of the response.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.13.1/wai-extra.cabal 
new/wai-extra-3.0.14/wai-extra.cabal
--- old/wai-extra-3.0.13.1/wai-extra.cabal  2015-12-30 07:49:09.0 
+0100
+++ new/wai-extra-3.0.14/wai-extra.cabal2016-01-12 14:53:39.0 
+0100
@@ -1,5 +1,5 @@
 Name:wai-extra
-Version: 3.0.13.1
+Version: 3.0.14
 Synopsis:Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:
@@ -141,6 +141,7 @@
  

commit ghc-wai-extra for openSUSE:Factory

2016-01-06 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2016-01-07 00:24:56

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2015-11-23 07:30:26.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2016-01-07 00:25:08.0 +0100
@@ -1,0 +2,6 @@
+Thu Dec 31 11:46:32 UTC 2015 - mimi...@gmail.com
+
+- update to 3.0.13.1
+* support wai 3.2
+
+---

Old:

  wai-extra-3.0.13.tar.gz

New:

  wai-extra-3.0.13.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.ftzQUS/_old  2016-01-07 00:25:09.0 +0100
+++ /var/tmp/diff_new_pack.ftzQUS/_new  2016-01-07 00:25:09.0 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.13
+Version:3.0.13.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.13.tar.gz -> wai-extra-3.0.13.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.13/ChangeLog.md 
new/wai-extra-3.0.13.1/ChangeLog.md
--- old/wai-extra-3.0.13/ChangeLog.md   2015-11-18 08:03:26.0 +0100
+++ new/wai-extra-3.0.13.1/ChangeLog.md 2015-12-30 07:49:09.0 +0100
@@ -1,3 +1,7 @@
+## 3.0.13.1
+
+* Support wai 3.2
+
 ## 3.0.13
 
 * Autoflush handle [#466](https://github.com/yesodweb/wai/pull/466)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.13/wai-extra.cabal 
new/wai-extra-3.0.13.1/wai-extra.cabal
--- old/wai-extra-3.0.13/wai-extra.cabal2015-11-18 08:03:26.0 
+0100
+++ new/wai-extra-3.0.13.1/wai-extra.cabal  2015-12-30 07:49:09.0 
+0100
@@ -1,5 +1,5 @@
 Name:wai-extra
-Version: 3.0.13
+Version: 3.0.13.1
 Synopsis:Provides some basic WAI handlers and middleware.
 description:
   Provides basic WAI handler and middleware functionality:
@@ -84,7 +84,7 @@
 Library
   Build-Depends: base  >= 4 && < 5
, bytestring>= 0.9.1.4
-   , wai   >= 3.0.3.0  && < 3.1
+   , wai   >= 3.0.3.0  && < 3.3
, old-locale>= 1.0.0.2  && < 1.1
, time  >= 1.1.4
, network   >= 2.6.1.0




commit ghc-wai-extra for openSUSE:Factory

2015-11-22 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2015-11-23 07:30:26

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2015-10-20 00:04:38.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2015-11-23 07:30:26.0 +0100
@@ -1,0 +2,9 @@
+Sun Nov 22 09:48:19 UTC 2015 - mimi...@gmail.com
+
+- update to 3.0.13
+* Autoflush handle
+* Add Network.Wai.Header.contentLength to read the Content-Length header
+of a response
+* The gzip middleware no longer zips responses smaller than 860 bytes
+
+---

Old:

  wai-extra-3.0.11.1.tar.gz

New:

  wai-extra-3.0.13.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.uUQDB2/_old  2015-11-23 07:30:27.0 +0100
+++ /var/tmp/diff_new_pack.uUQDB2/_new  2015-11-23 07:30:27.0 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.11.1
+Version:3.0.13
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.11.1.tar.gz -> wai-extra-3.0.13.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.11.1/ChangeLog.md 
new/wai-extra-3.0.13/ChangeLog.md
--- old/wai-extra-3.0.11.1/ChangeLog.md 2015-10-06 20:41:51.0 +0200
+++ new/wai-extra-3.0.13/ChangeLog.md   2015-11-18 08:03:26.0 +0100
@@ -1,3 +1,12 @@
+## 3.0.13
+
+* Autoflush handle [#466](https://github.com/yesodweb/wai/pull/466)
+
+## 3.0.12
+
+* Add Network.Wai.Header.contentLength to read the Content-Length header of a 
response
+* The gzip middleware no longer zips responses smaller than 860 bytes
+
 ## 3.0.11
 
 * Add constructor for more detailed custom output formats for RequestLogger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.11.1/Network/Wai/Header.hs 
new/wai-extra-3.0.13/Network/Wai/Header.hs
--- old/wai-extra-3.0.11.1/Network/Wai/Header.hs1970-01-01 
01:00:00.0 +0100
+++ new/wai-extra-3.0.13/Network/Wai/Header.hs  2015-11-18 08:03:26.0 
+0100
@@ -0,0 +1,18 @@
+-- | Some helpers for dealing with WAI 'Header's.
+
+module Network.Wai.Header
+( contentLength
+) where
+
+import qualified Data.ByteString.Char8 as S8
+import Network.HTTP.Types as H
+
+-- | More useful for a response. A Wai Request already has a requestBodyLength
+contentLength :: [(HeaderName, S8.ByteString)] -> Maybe Integer
+contentLength hdrs = lookup H.hContentLength hdrs >>= readInt
+
+readInt :: S8.ByteString -> Maybe Integer
+readInt bs =
+case S8.readInteger bs of
+Just (i, "") -> Just i
+_ -> Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.11.1/Network/Wai/Middleware/Gzip.hs 
new/wai-extra-3.0.13/Network/Wai/Middleware/Gzip.hs
--- old/wai-extra-3.0.11.1/Network/Wai/Middleware/Gzip.hs   2015-08-14 
22:03:39.0 +0200
+++ new/wai-extra-3.0.13/Network/Wai/Middleware/Gzip.hs 2015-11-18 
08:03:26.0 +0100
@@ -33,6 +33,7 @@
 import Blaze.ByteString.Builder (fromByteString)
 import Control.Exception (try, SomeException)
 import qualified Data.Set as Set
+import Network.Wai.Header
 import Network.Wai.Internal
 import qualified Data.Streaming.Blaze as B
 import qualified Data.Streaming.Zlib as Z
@@ -79,7 +80,7 @@
 case res of
 ResponseRaw{} -> sendResponse res
 ResponseFile{} | gzipFiles set == GzipIgnore -> sendResponse res
-_ -> if "gzip" `elem` enc && not isMSIE6 && not (isEncoded res)
+_ -> if "gzip" `elem` enc && not isMSIE6 && not (isEncoded res) && 
(bigEnough res)
 then
 case (res, gzipFiles set) of
 (ResponseFile s hs file Nothing, GzipCacheFolder 
cache) ->
@@ -96,6 +97,16 @@
 isMSIE6 = "MSIE 6" `S.isInfixOf` ua
 isEncoded res = isJust $ lookup hContentEncoding $ responseHeaders res
 
+bigEnough rsp = case contentLength (responseHeaders rsp) of
+  Nothing -> True -- This could be a streaming case
+  Just len -> len >= minimumLength
+
+-- For a small enough response, gzipping will actually increase the size
+-- Potentially for anything less than 860 bytes gzipping could be a net 
loss
+-- The actual number is application specific though and may need to be 
adjusted
+-- 

commit ghc-wai-extra for openSUSE:Factory

2015-10-19 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2015-10-19 22:50:33

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is "ghc-wai-extra"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2015-08-05 06:50:57.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2015-10-20 00:04:38.0 +0200
@@ -1,0 +2,7 @@
+Mon Oct 12 19:04:07 UTC 2015 - mimi...@gmail.com
+
+- update to 3.0.11.1
+* Add constructor for more detailed custom output formats for RequestLogger
+* Add JSON output formatter for RequestLogger
+
+---

Old:

  wai-extra-3.0.10.tar.gz

New:

  wai-extra-3.0.11.1.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.H8EeHx/_old  2015-10-20 00:04:39.0 +0200
+++ /var/tmp/diff_new_pack.H8EeHx/_new  2015-10-20 00:04:39.0 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.10
+Version:3.0.11.1
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT
@@ -34,6 +34,7 @@
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
 # Begin cabal-rpm deps:
+BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-ansi-terminal-devel
 BuildRequires:  ghc-base64-bytestring-devel
 BuildRequires:  ghc-blaze-builder-devel
@@ -46,6 +47,7 @@
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-fast-logger-devel
 BuildRequires:  ghc-http-types-devel
+BuildRequires:  ghc-iproute-devel
 BuildRequires:  ghc-lifted-base-devel
 BuildRequires:  ghc-network-devel
 BuildRequires:  ghc-old-locale-devel

++ wai-extra-3.0.10.tar.gz -> wai-extra-3.0.11.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.10/ChangeLog.md 
new/wai-extra-3.0.11.1/ChangeLog.md
--- old/wai-extra-3.0.10/ChangeLog.md   2015-07-24 19:15:26.0 +0200
+++ new/wai-extra-3.0.11.1/ChangeLog.md 2015-10-06 20:41:51.0 +0200
@@ -1,3 +1,8 @@
+## 3.0.11
+
+* Add constructor for more detailed custom output formats for RequestLogger
+* Add JSON output formatter for RequestLogger
+
 ## 3.0.10
 
 * Adding Request Body to RequestLogger 
[#401](https://github.com/yesodweb/wai/pull/401)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.10/Network/Wai/EventSource/EventStream.hs 
new/wai-extra-3.0.11.1/Network/Wai/EventSource/EventStream.hs
--- old/wai-extra-3.0.10/Network/Wai/EventSource/EventStream.hs 2015-07-24 
19:15:26.0 +0200
+++ new/wai-extra-3.0.11.1/Network/Wai/EventSource/EventStream.hs   
2015-08-14 22:03:39.0 +0200
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE CPP #-}
 {- code adapted by Mathias Billman originaly from Chris Smith 
https://github.com/cdsmith/gloss-web -}
 
 {-|
@@ -11,7 +11,9 @@
 
 import Blaze.ByteString.Builder
 import Blaze.ByteString.Builder.Char8
+#if __GLASGOW_HASKELL__ < 710
 import Data.Monoid
+#endif
 
 {-|
 Type representing a communication over an event stream.  This can be an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.10/Network/Wai/EventSource.hs 
new/wai-extra-3.0.11.1/Network/Wai/EventSource.hs
--- old/wai-extra-3.0.10/Network/Wai/EventSource.hs 2015-07-24 
19:15:26.0 +0200
+++ new/wai-extra-3.0.11.1/Network/Wai/EventSource.hs   2015-08-14 
22:03:39.0 +0200
@@ -1,4 +1,3 @@
-{-# LANGUAGE OverloadedStrings #-}
 {-|
 A WAI adapter to the HTML5 Server-Sent Events API.
 -}
@@ -8,12 +7,11 @@
 eventSourceAppIO
 ) where
 
-import   Blaze.ByteString.Builder (Builder)
 import   Data.Function (fix)
 import   Control.Concurrent.Chan (Chan, dupChan, readChan)
 import   Control.Monad.IO.Class (liftIO)
-import   Network.HTTP.Types (status200)
-import   Network.Wai (Application, Response, responseStream)
+import   Network.HTTP.Types (status200, hContentType)
+import   Network.Wai (Application, responseStream)
 
 import Network.Wai.EventSource.EventStream
 
@@ -30,7 +28,7 @@
 eventSourceAppIO src _ sendResponse =
 sendResponse $ responseStream
 status200
-[("Content-Type", "text/event-stream")]
+[(hContentType, "text/event-stream")]
 $ \sendChunk flush -> fix $ \loop -> do
 se <- src
 case eventToBuilder se of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' 

commit ghc-wai-extra for openSUSE:Factory

2015-08-04 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2015-08-05 06:50:55

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is ghc-wai-extra

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2015-07-16 17:19:00.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2015-08-05 06:50:57.0 +0200
@@ -1,0 +2,7 @@
+Mon Jul 27 08:03:04 UTC 2015 - mimi...@gmail.com
+
+- update to 3.0.10
+* Network.Wai.Middleware.Routed module added 
+* Adding Request Body to RequestLogger
+
+---

Old:

  wai-extra-3.0.8.2.tar.gz

New:

  wai-extra-3.0.10.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.MTZ9Ht/_old  2015-08-05 06:50:58.0 +0200
+++ /var/tmp/diff_new_pack.MTZ9Ht/_new  2015-08-05 06:50:58.0 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:   ghc-wai-extra
-Version:3.0.8.2
+Version:3.0.10
 Release:0
 Summary:Provides some basic WAI handlers and middleware
 License:MIT

++ wai-extra-3.0.8.2.tar.gz - wai-extra-3.0.10.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.8.2/ChangeLog.md 
new/wai-extra-3.0.10/ChangeLog.md
--- old/wai-extra-3.0.8.2/ChangeLog.md  2015-07-09 20:35:55.0 +0200
+++ new/wai-extra-3.0.10/ChangeLog.md   2015-07-24 19:15:26.0 +0200
@@ -1,3 +1,11 @@
+## 3.0.10
+
+* Adding Request Body to RequestLogger 
[#401](https://github.com/yesodweb/wai/pull/401)
+
+## 3.0.9
+
+* Network.Wai.Middleware.Routed module added
+
 ## 3.0.7
 
 * Add appearsSecure: check if a request appears to be using SSL even in the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.8.2/Network/Wai/Middleware/RequestLogger.hs 
new/wai-extra-3.0.10/Network/Wai/Middleware/RequestLogger.hs
--- old/wai-extra-3.0.8.2/Network/Wai/Middleware/RequestLogger.hs   
2015-07-09 20:35:55.0 +0200
+++ new/wai-extra-3.0.10/Network/Wai/Middleware/RequestLogger.hs
2015-07-24 19:15:26.0 +0200
@@ -44,6 +44,7 @@
 import Data.Default.Class (Default (def))
 import Network.Wai.Logger
 import Network.Wai.Middleware.RequestLogger.Internal
+import Data.Text.Encoding (decodeUtf8')
 
 data OutputFormat = Apache IPAddrSource
   | Detailed Bool -- ^ use colors?
@@ -222,6 +223,8 @@
  return (req', body)
 _ - return (req, [])
 
+let reqbodylog _ = if null body then [] else ansiColor White   Request 
Body:   body  [\n]
+reqbody = concatMap (either (const []) reqbodylog . decodeUtf8') body
 postParams - if requestMethod req `elem` [GET, HEAD]
 then return []
 else do postParams - liftIO $ allPostParams body
@@ -247,7 +250,7 @@
 -- log the status of the response
 cb $ mconcat $ map toLogStr $
 ansiMethod (requestMethod req) ++ [ , rawPathInfo req, \n] ++
-params ++
+params ++ reqbody ++
 ansiColor White   Accept:  ++ [accept, \n] ++
 if isRaw then [] else
 ansiColor White   Status:  ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-extra-3.0.8.2/Network/Wai/Middleware/Routed.hs 
new/wai-extra-3.0.10/Network/Wai/Middleware/Routed.hs
--- old/wai-extra-3.0.8.2/Network/Wai/Middleware/Routed.hs  1970-01-01 
01:00:00.0 +0100
+++ new/wai-extra-3.0.10/Network/Wai/Middleware/Routed.hs   2015-07-24 
19:15:26.0 +0200
@@ -0,0 +1,39 @@
+-- |
+--
+-- Since 3.0.9
+module Network.Wai.Middleware.Routed
+( routedMiddleware
+, hostedMiddleware
+) where
+
+import Network.Wai
+import Data.ByteString (ByteString)
+import Data.Text (Text)
+
+-- | Apply a middleware based on a test of pathInfo
+--
+-- example:
+--
+--  let corsify = routedMiddleWare (static `elem`) addCorsHeaders
+--
+-- Since 3.0.9
+routedMiddleware :: ([Text] - Bool) -- ^ Only use middleware if this pathInfo 
test returns True
+ - Middleware -- ^ middleware to apply the path prefix guard 
to
+ - Middleware -- ^ modified middleware
+routedMiddleware pathCheck middle app req
+  | pathCheck (pathInfo req) = middle app req
+  | otherwise= app req
+
+-- | Only apply the middleware to certain hosts
+--
+-- Since 3.0.9
+hostedMiddleware :: ByteString -- ^ Domain the middleware applies to
+ - Middleware -- ^ middleware to 

commit ghc-wai-extra for openSUSE:Factory

2015-07-16 Thread h_root
Hello community,

here is the log from the commit of package ghc-wai-extra for openSUSE:Factory 
checked in at 2015-07-16 17:18:59

Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-wai-extra.new (New)


Package is ghc-wai-extra

Changes:

--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes  
2015-05-29 10:38:29.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new/ghc-wai-extra.changes 
2015-07-16 17:19:00.0 +0200
@@ -1,0 +2,5 @@
+Mon Jul 13 05:56:11 UTC 2015 - mimi...@gmail.com
+
+- update to 3.0.8.2
+
+---

Old:

  wai-extra-3.0.7.1.tar.gz

New:

  wai-extra-3.0.8.2.tar.gz



Other differences:
--
++ ghc-wai-extra.spec ++
--- /var/tmp/diff_new_pack.4G4tbG/_old  2015-07-16 17:19:00.0 +0200
+++ /var/tmp/diff_new_pack.4G4tbG/_new  2015-07-16 17:19:00.0 +0200
@@ -15,17 +15,18 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 %global pkg_name wai-extra
 
 %bcond_with tests
 
-Name:   ghc-%{pkg_name}
-Version:3.0.7.1
+Name:   ghc-wai-extra
+Version:3.0.8.2
 Release:0
 Summary:Provides some basic WAI handlers and middleware
+License:MIT
 Group:  System/Libraries
 
-License:MIT
 Url:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
@@ -133,37 +134,29 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
 %if %{with tests}
 %cabal test
 %endif
 
-
 %post devel
 %ghc_pkg_recache
 
-
 %postun devel
 %ghc_pkg_recache
 
-
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
 
-
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
 %doc README.md
 
-
 %changelog

++ wai-extra-3.0.7.1.tar.gz - wai-extra-3.0.8.2.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.7.1/Network/Wai/Middleware/AddHeaders.hs 
new/wai-extra-3.0.8.2/Network/Wai/Middleware/AddHeaders.hs
--- old/wai-extra-3.0.7.1/Network/Wai/Middleware/AddHeaders.hs  2015-04-22 
07:02:35.0 +0200
+++ new/wai-extra-3.0.8.2/Network/Wai/Middleware/AddHeaders.hs  2015-07-09 
20:35:55.0 +0200
@@ -6,7 +6,7 @@
 ) where
 
 import Network.HTTP.Types   (ResponseHeaders, Header)
-import Network.Wai  (Middleware)
+import Network.Wai  (Middleware, modifyResponse, mapResponseHeaders)
 import Network.Wai.Internal (Response(..))
 import Data.ByteString  (ByteString)
 
@@ -18,13 +18,7 @@
 --
 -- Since 3.0.3
 
-addHeaders h app req respond = app req $ respond . addHeaders' (map (first 
CI.mk) h)
-
-mapHeader :: (ResponseHeaders - ResponseHeaders) - Response - Response
-mapHeader f (ResponseFile s h b1 b2) = ResponseFile s (f h) b1 b2
-mapHeader f (ResponseBuilder s h b) = ResponseBuilder s (f h) b
-mapHeader f (ResponseStream s h b) = ResponseStream s (f h) b
-mapHeader _ r@(ResponseRaw _ _) = r
+addHeaders h = modifyResponse $ addHeaders' (map (first CI.mk) h)
 
 addHeaders' :: [Header] - Response - Response
-addHeaders' h = mapHeader (\hs - h ++ hs)
+addHeaders' h = mapResponseHeaders (\hs - h ++ hs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.7.1/Network/Wai/Middleware/RequestLogger.hs 
new/wai-extra-3.0.8.2/Network/Wai/Middleware/RequestLogger.hs
--- old/wai-extra-3.0.7.1/Network/Wai/Middleware/RequestLogger.hs   
2015-04-22 07:02:35.0 +0200
+++ new/wai-extra-3.0.8.2/Network/Wai/Middleware/RequestLogger.hs   
2015-07-09 20:35:55.0 +0200
@@ -118,15 +118,15 @@
 sendResponse res
 
 -- | Production request logger middleware.
--- Implemented on top of logCallback, but prints to 'stdout'
+{-# NOINLINE logStdout #-}
 logStdout :: Middleware
 logStdout = unsafePerformIO $ mkRequestLogger def { outputFormat = Apache 
FromSocket }
 
 -- | Development request logger middleware.
--- Implemented on top of logCallbackDev, but prints to 'stdout'
 --
 -- Flushes 'stdout' on each request, which would be inefficient in production 
use.
 -- Use logStdout in production.
+{-# NOINLINE logStdoutDev #-}
 logStdoutDev :: Middleware
 logStdoutDev = unsafePerformIO $ mkRequestLogger def
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-extra-3.0.7.1/Network/Wai/Middleware/StripHeaders.hs 
new/wai-extra-3.0.8.2/Network/Wai/Middleware/StripHeaders.hs
---