packages feed

http2 0.1.0 → 0.1.1

raw patch · 4 files changed

+41/−26 lines, 4 filesdep −http2

Dependencies removed: http2

Files

Network/HPACK.hs view
@@ -1,11 +1,7 @@+-- | HPACK: encoding and decoding a header set. module Network.HPACK (-  -- * Type-    ByteStream-  , HeaderSet-  , Context-  , newContext-  , DecodeError(..)-  , HPACKEncoding+  -- * Encoding and decoding+    HPACKEncoding   , HPACKDecoding   -- * Request   , encodeRequestHeader@@ -13,19 +9,37 @@   -- * Response   , encodeResponseHeader   , decodeResponseHeader+  -- * Contenxt+  , Context+  , newContext+  -- * Errors for decoding+  , DecodeError(..)+  -- * Headers+  , HeaderSet+  , Header+  , HeaderName+  , HeaderValue+  -- * Basic types+  , ByteStream+  , Size+  , Index   ) where  import Control.Applicative ((<$>)) import Control.Arrow (second) import Control.Exception (throwIO)-import Network.HPACK.Context-import Network.HPACK.HeaderBlock-import Network.HPACK.Huffman-import Network.HPACK.Types+import Network.HPACK.Context (Context, newContext, HeaderSet)+import Network.HPACK.HeaderBlock (toHeaderBlock, fromHeaderBlock, toByteStream, fromByteStream)+import Network.HPACK.Huffman (huffmanEncodeInRequest, huffmanDecodeInRequest, huffmanEncodeInResponse, huffmanDecodeInResponse)+import Network.HPACK.Table (Size)+import Network.HPACK.Types (ByteStream, DecodeError(..), Header, HeaderName, HeaderValue, Index)  ---------------------------------------------------------------- +-- | HPACK encoding, from 'HeaderSet' to 'ByteStream'. type HPACKEncoding = Context -> HeaderSet  -> IO (Context, ByteStream)++-- | HPACK decoding, from 'ByteStream' to 'HeaderSet'. type HPACKDecoding = Context -> ByteStream -> IO (Context, HeaderSet)  ----------------------------------------------------------------
Network/HPACK/Context.hs view
@@ -33,7 +33,7 @@  ---------------------------------------------------------------- --- | Context for encoding/decoding.+-- | Context for HPACK encoding/decoding. data Context = Context {     headerTable     :: !HeaderTable -- ^ A cache of headers   , oldReferenceSet :: ReferenceSet -- ^ References for not emitted@@ -61,7 +61,7 @@ ----------------------------------------------------------------  -- | Creating a new 'Context'.---   The first argument is the size of 'HeaderTable'.+--   The first argument is the size of a header table. newContext :: Size -> IO Context newContext maxsiz = do     hdrtbl <- newHeaderTable maxsiz
Network/HPACK/Types.hs view
@@ -36,9 +36,9 @@  -- | Errors for decoder. data DecodeError = IndexOverrun Index -- ^ Index is out of range-                 | EosInTheMiddle -- ^ Eos appears in the middle of string-                 | IllegalEos -- ^ Non-eos appears in the end of string-                 | TooLongEos -- ^ Eos is more than 7 bits+                 | EosInTheMiddle -- ^ Eos appears in the middle of huffman string+                 | IllegalEos -- ^ Non-eos appears in the end of huffman string+                 | TooLongEos -- ^ Eos of huffman string is more than 7 bits                  | EmptyEncodedString -- ^ Encoded string has no length                  | EmptyBlock -- ^ Header block is empty                  deriving (Eq,Show,Typeable)
http2.cabal view
@@ -1,5 +1,5 @@ Name:                   http2-Version:                0.1.0+Version:                0.1.1 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -7,9 +7,6 @@ Synopsis:               HTTP/2.0 library including HPACK Description:            HTTP/2.0 library including HPACK.                         Currently only (coming) HPACK 06 is supported.-                        Use Network.HPACK only.-                        Many modules are exported for debugging-                        purpose only. Please don't import them. Category:               Network Cabal-Version:          >= 1.10 Build-Type:             Simple@@ -18,7 +15,7 @@   Default-Language:     Haskell2010   GHC-Options:          -Wall   Exposed-Modules:      Network.HPACK-                        Network.HPACK.Builder+  Other-Modules:        Network.HPACK.Builder                         Network.HPACK.Context                         Network.HPACK.Context.HeaderSet                         Network.HPACK.Context.ReferenceSet@@ -58,7 +55,7 @@ Test-Suite spec   Type:                 exitcode-stdio-1.0   Default-Language:     Haskell2010-  HS-Source-Dirs:       test+  HS-Source-Dirs:       test, .   Ghc-Options:          -Wall   Main-Is:              Spec.hs   Other-Modules:        BitSpec@@ -70,26 +67,30 @@                         HeaderBlock                         HexString   Build-Depends:        base+                      , array+                      , blaze-builder                       , bytestring-                      , http2+                      , hashtables                       , hspec >= 1.3  Test-Suite hpack   Type:                 exitcode-stdio-1.0   Default-Language:     Haskell2010-  HS-Source-Dirs:       test-hpack+  HS-Source-Dirs:       test-hpack, .   Ghc-Options:          -Wall   Main-Is:              Spec.hs   Other-Modules:        HPACKSpec   Build-Depends:        base                       , aeson                       , aeson-pretty+                      , array+                      , blaze-builder                       , bytestring-                      , unordered-containers                       , directory                       , filepath-                      , http2+                      , hashtables                       , text+                      , unordered-containers                       , vector                       , hspec >= 1.3