0 | module Http2Responder
19 | Show FrameType where
22 | Headers => "Headers"
23 | Priority => "Priority"
24 | RstStream => "RstStream"
25 | Settings => "Settings"
26 | PushPromise => "PushPromise"
29 | WindowUpdate => "WindowUpdate"
30 | Continuation => "Continuation"
33 | parseType : Bits8 -> Maybe FrameType
41 | 5 => Just PushPromise
44 | 8 => Just WindowUpdate
45 | 9 => Just Continuation
49 | encodeFrameType : FrameType -> Bits8
65 | a == b = encodeFrameType a == encodeFrameType b
68 | data Payload = MkPayload (List Bits8)
71 | data Flags = MkFlags Bits8
76 | frameType : FrameType
78 | streamIdent : Bits32
91 | | Literal Bits8 String
92 | | LiteralStr String String
97 | MethodGet == MethodGet = True
98 | MethodPost == MethodPost = True
99 | PathSlash == PathSlash = True
100 | SchemeHttp == SchemeHttp = True
101 | SchemeHttps == SchemeHttps = True
102 | ContentLength == ContentLength = True
103 | UserAgent == UserAgent = True
104 | Literal idx val == Literal idx2 val2 = idx == idx2 && val == val2
105 | LiteralStr name val == LiteralStr name2 val2 = name == name2 && val == val2
106 | StatusOk == StatusOk = True
111 | show MethodGet = "MethodGet"
112 | show MethodPost = "MethodPost"
113 | show PathSlash = "PathSlash"
114 | show SchemeHttp = "SchemeHttp"
115 | show SchemeHttps = "SchemeHttps"
116 | show ContentLength = "ContentLength"
117 | show ProxyAuthenticate = "ProxyAuthenticate"
118 | show UserAgent = "UserAgent"
119 | show (Literal idx lit) = "Literal " ++ show idx ++ " " ++ lit
120 | show (LiteralStr name val) = "LiteralStr " ++ name ++ " " ++ val
121 | show StatusOk = "StatusOk"
124 | InnerCont : Type -> Type
125 | InnerCont a = Cont (DIterator (List Bits8) (List Bits8) PgRows PgInput Void) a
128 | record Request where
129 | constructor MkRequest
130 | streamIdent: Bits32
133 | headers: List Header