@@ -137,6 +137,19 @@ caseParseRequestBody = do
137137 SRequest req4 bod4 <- toRequest'' ctype2 content4
138138 (parseRequestBodyEx def lbsBackEnd req4) `shouldThrow` anyErrorCall
139139
140+ it "Testing parseRequestBodyEx with application/x-www-form-urlencoded" $ do
141+ let content = "thisisalongparameterkey=andthisbeanevenlongerparametervaluehelloworldhowareyou"
142+ let ctype = "application/x-www-form-urlencoded"
143+ SRequest req _bod <- toRequest'' ctype content
144+ result <- parseRequestBodyEx def lbsBackEnd req
145+ result `shouldBe` ([( "thisisalongparameterkey"
146+ , "andthisbeanevenlongerparametervaluehelloworldhowareyou" )], [])
147+ it "exceeding max parm value size with x-www-form-urlencoded mimetype" $ do
148+ let content = "thisisalongparameterkey=andthisbeanevenlongerparametervaluehelloworldhowareyou"
149+ let ctype = "application/x-www-form-urlencoded"
150+ SRequest req _bod <- toRequest'' ctype content
151+ (parseRequestBodyEx (def { prboMaxParmsValueSize = 10 }) lbsBackEnd req) `shouldThrow` anyErrorCall
152+
140153 where
141154 content2 =
142155 "--AaB03x\n"