packages feed

http2 1.0.2 → 1.0.3

raw patch · 4 files changed

+16/−17 lines, 4 files

Files

http2.cabal view
@@ -1,5 +1,5 @@ Name:                   http2-Version:                1.0.2+Version:                1.0.3 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -57,11 +57,11 @@                         Network.HTTP2.Encode                         Network.HTTP2.RandomSkewHeap                         Network.HTTP2.Types-  Build-Depends:        base >= 4 && < 5+  Build-Depends:        base >= 4.6 && < 5                       , array-                      , bytestring+                      , bytestring >= 0.10                       , bytestring-builder-                      , containers+                      , containers >= 0.5                       , mwc-random                       , stm                       , unordered-containers
test-hpack/HPACKDecode.hs view
@@ -29,8 +29,8 @@ data Result = Pass | Fail String deriving (Eq,Show)  run :: Bool -> Test -> IO Result-run _ (Test _ _ [])        = return $ Pass-run d (Test _ _ ccs@(c:_)) = do+run _ (Test _ [])        = return $ Pass+run d (Test _ ccs@(c:_)) = do     let siz = maybe 4096 id $ size c     dhdrtbl <- newDynamicTableForDecoding siz     let conf = Conf { debug = d }
test-hpack/HPACKEncode.hs view
@@ -9,6 +9,8 @@  import Control.Monad (when) import Data.ByteString (ByteString)+import qualified Data.ByteString.Char8 as C8+import Data.Char import Data.Hex import Network.HPACK import Network.HPACK.Table@@ -21,8 +23,8 @@   }  run :: Bool -> EncodeStrategy -> Test -> IO [ByteString]-run _ _    (Test _        _ [])        = return []-run d stgy (Test _ _ ccs@(c:_)) = do+run _ _    (Test        _ []) = return []+run d stgy (Test _ ccs@(c:_)) = do     let siz = maybe 4096 id $ size c     ehdrtbl <- newDynamicTableForEncoding siz     let conf = Conf { debug = d, enc = encodeHeader stgy }@@ -36,7 +38,7 @@ testLoop _    []     _    hexs = return $ reverse hexs testLoop conf (c:cs) ehdrtbl hxs = do     (ehdrtbl',hx) <- test conf c ehdrtbl-    testLoop conf cs ehdrtbl' (hx:hxs)+    testLoop conf cs ehdrtbl' (C8.map toLower hx : hxs)  test :: Conf      -> Case
test-hpack/JSON.hs view
@@ -33,8 +33,7 @@ -}  data Test = Test {-    draft :: Int-  , description :: String+    description :: String   , cases :: [Case]   } deriving Show @@ -46,16 +45,14 @@   } deriving Show  instance FromJSON Test where-    parseJSON (Object o) = Test <$> o .: "draft"-                                <*> o .: "description"+    parseJSON (Object o) = Test <$> o .: "description"                                 <*> o .: "cases"     parseJSON _          = mzero  instance ToJSON Test where-    toJSON (Test n desc cs) = object ["draft" .= n-                                     ,"description" .= desc-                                     ,"cases" .= cs-                                     ]+    toJSON (Test desc cs) = object ["description" .= desc+                                   ,"cases" .= cs+                                   ]  instance FromJSON Case where     parseJSON (Object o) = Case <$> o .:? "header_table_size"