commit ghc-http-types for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-http-types for openSUSE:Factory checked in at 2018-10-25 08:16:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-http-types (Old) and /work/SRC/openSUSE:Factory/.ghc-http-types.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-http-types" Thu Oct 25 08:16:53 2018 rev:8 rq:642868 version:0.12.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-http-types/ghc-http-types.changes 2018-07-21 10:21:59.155004278 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-http-types.new/ghc-http-types.changes 2018-10-25 08:17:23.328043277 +0200 @@ -1,0 +2,10 @@ +Wed Oct 10 19:24:15 UTC 2018 - psimons@suse.com + +- Update http-types to version 0.12.2. + * 0.12.2 [2018-09-26] + + Add new parseQueryReplacePlus function, which allows specifying whether to replace '+' with ' '. + + Add header name constants for "Prefer" and "Preference-Applied" (RFC 7240). + +------------------------------------------------------------------- Old: ---- http-types-0.12.1.tar.gz New: ---- http-types-0.12.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-http-types.spec ++++++ --- /var/tmp/diff_new_pack.jOlKJo/_old 2018-10-25 08:17:25.032042532 +0200 +++ /var/tmp/diff_new_pack.jOlKJo/_new 2018-10-25 08:17:25.036042531 +0200 @@ -12,14 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global pkg_name http-types %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.12.1 +Version: 0.12.2 Release: 0 Summary: Generic HTTP types for Haskell (for both client and server code) License: BSD-3-Clause ++++++ http-types-0.12.1.tar.gz -> http-types-0.12.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.12.1/CHANGELOG new/http-types-0.12.2/CHANGELOG --- old/http-types-0.12.1/CHANGELOG 2018-01-31 21:18:52.000000000 +0100 +++ new/http-types-0.12.2/CHANGELOG 2018-09-26 22:02:56.000000000 +0200 @@ -1,3 +1,9 @@ +* 0.12.2 [2018-09-26] + +Add new parseQueryReplacePlus function, which allows specifying whether to replace '+' with ' '. + +Add header name constants for "Prefer" and "Preference-Applied" (RFC 7240). + * 0.12.1 [2018-01-31] Add new functions for constructing a query URI where not all parts are escaped. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.12.1/Network/HTTP/Types/Header.hs new/http-types-0.12.2/Network/HTTP/Types/Header.hs --- old/http-types-0.12.1/Network/HTTP/Types/Header.hs 2018-01-31 21:18:52.000000000 +0100 +++ new/http-types-0.12.2/Network/HTTP/Types/Header.hs 2018-09-26 22:02:56.000000000 +0200 @@ -40,6 +40,8 @@ , hMaxForwards , hOrigin , hPragma +, hPrefer +, hPreferenceApplied , hProxyAuthenticate , hProxyAuthorization , hRange @@ -159,6 +161,11 @@ hOrigin :: HeaderName hOrigin = "Origin" +-- | HTTP Header names according to https://tools.ietf.org/html/rfc7240 +hPrefer, hPreferenceApplied :: HeaderName +hPrefer = "Prefer" +hPreferenceApplied = "Preference-Applied" + -- | RFC 2616 Byte range (individual). -- -- Negative indices are not allowed! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.12.1/Network/HTTP/Types/URI.hs new/http-types-0.12.2/Network/HTTP/Types/URI.hs --- old/http-types-0.12.1/Network/HTTP/Types/URI.hs 2018-01-31 21:18:52.000000000 +0100 +++ new/http-types-0.12.2/Network/HTTP/Types/URI.hs 2018-09-26 22:02:56.000000000 +0200 @@ -11,6 +11,7 @@ , renderQueryBuilder , renderSimpleQuery , parseQuery +, parseQueryReplacePlus , parseSimpleQuery -- **Escape only parts , renderQueryPartialEscape @@ -61,8 +62,8 @@ -- | Query. -- --- General form: a=b&c=d, but if the value is Nothing, it becomes --- a&c=d. +-- General form: @a=b&c=d@, but if the value is Nothing, it becomes +-- @a&c=d@. type Query = [QueryItem] -- | Like Query, but with 'Text' instead of 'B.ByteString' (UTF8-encoded). @@ -137,10 +138,17 @@ -- decoding here. Most likely, you will want to use UTF-8 decoding, but this is -- left to the user of the library. -- --- * Percent decoding errors are ignored. In particular, "%Q" will be output as --- "%Q". +-- * Percent decoding errors are ignored. In particular, @"%Q"@ will be output as +-- @"%Q"@. +-- +-- * It decodes @\'+\'@ characters to @\' \'@ parseQuery :: B.ByteString -> Query -parseQuery = parseQueryString' . dropQuestion +parseQuery = parseQueryReplacePlus True + +-- | Same functionality as 'parseQuery' with the option to decode @\'+\'@ characters to @\' \'@ +-- or preserve @\'+\'@ +parseQueryReplacePlus :: Bool -> B.ByteString -> Query +parseQueryReplacePlus replacePlus bs = parseQueryString' $ dropQuestion bs where dropQuestion q = case B.uncons q of @@ -155,9 +163,9 @@ let (k, v) = B.break (== 61) x -- equal sign v'' = case B.uncons v of - Just (_, v') -> Just $ urlDecode True v' + Just (_, v') -> Just $ urlDecode replacePlus v' _ -> Nothing - in (urlDecode True k, v'') + in (urlDecode replacePlus k, v'') queryStringSeparators :: B.ByteString queryStringSeparators = B.pack [38,59] -- ampersand, semicolon @@ -207,13 +215,13 @@ urlEncodeBuilder False = urlEncodeBuilder' unreservedPI -- | Percent-encoding for URLs. -urlEncode :: Bool -- ^ Whether to decode '+' to ' ' +urlEncode :: Bool -- ^ Whether to decode @\'+\'@ to @\' \'@ -> B.ByteString -- ^ The ByteString to encode as URL -> B.ByteString -- ^ The encoded URL urlEncode q = BL.toStrict . B.toLazyByteString . urlEncodeBuilder q -- | Percent-decoding. -urlDecode :: Bool -- ^ Whether to decode '+' to ' ' +urlDecode :: Bool -- ^ Whether to decode @\'+\'@ to @\' \'@ -> B.ByteString -> B.ByteString urlDecode replacePlus z = fst $ B.unfoldrN (B.length z) go z where @@ -242,22 +250,19 @@ -- -- * UTF-8 encodes the characters. -- --- * Performs percent encoding on all unreserved characters, as well as \:\@\=\+\$, +-- * Performs percent encoding on all unreserved characters, as well as @\:\@\=\+\$@, -- -- * Prepends each segment with a slash. -- -- For example: -- -- > encodePathSegments [\"foo\", \"bar\", \"baz\"] --- -- \"\/foo\/bar\/baz\" -- -- > encodePathSegments [\"foo bar\", \"baz\/bin\"] --- -- \"\/foo\%20bar\/baz\%2Fbin\" -- -- > encodePathSegments [\"שלום\"] --- -- \"\/%D7%A9%D7%9C%D7%95%D7%9D\" -- -- Huge thanks to Jeremy Shaw who created the original implementation of this @@ -333,12 +338,12 @@ ----------------------------------------------------------------------------------------- -- | For some URIs characters must not be URI encoded, --- eg '+' or ':' in q=a+language:haskell+created:2009-01-01..2009-02-01&sort=stars +-- e.g. @\'+\'@ or @\':\'@ in @q=a+language:haskell+created:2009-01-01..2009-02-01&sort=stars@ -- The character list unreservedPI instead of unreservedQS would solve this. -- But we explicitly decide what part to encode. --- This is mandatory when searching for '+': q=%2B+language:haskell. +-- This is mandatory when searching for @\'+\'@: @q=%2B+language:haskell@. data EscapeItem = QE B.ByteString -- will be URL encoded - | QN B.ByteString -- will not be url encoded, eg '+' or ':' + | QN B.ByteString -- will not be url encoded, e.g. @\'+\'@ or @\':\'@ deriving (Show, Eq, Ord) -- | Query item @@ -346,7 +351,7 @@ -- | Query with some chars that should not be escaped. -- --- General form: a=b&c=d:e+f&g=h +-- General form: @a=b&c=d:e+f&g=h@ type PartialEscapeQuery = [PartialEscapeQueryItem] -- | Convert 'PartialEscapeQuery' to 'ByteString'. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.12.1/http-types.cabal new/http-types-0.12.2/http-types.cabal --- old/http-types-0.12.1/http-types.cabal 2018-01-31 21:18:52.000000000 +0100 +++ new/http-types-0.12.2/http-types.cabal 2018-09-26 22:02:56.000000000 +0200 @@ -1,5 +1,5 @@ Name: http-types -Version: 0.12.1 +Version: 0.12.2 Synopsis: Generic HTTP types for Haskell (for both client and server code). Description: Generic HTTP types for Haskell (for both client and server code). Homepage: https://github.com/aristidb/http-types @@ -16,7 +16,7 @@ Source-repository this type: git location: https://github.com/aristidb/http-types.git - tag: 0.12.1 + tag: 0.12.2 Source-repository head type: git
participants (1)
-
root