@@ -142,6 +142,8 @@ tempFileBackEndOpts getTmpDir pattrn internalState _ _ popper = do
142142
143143-- | A data structure that describes the behavior of
144144-- the parseRequestBodyEx function.
145+--
146+-- @since 3.0.16.0
145147data ParseRequestBodyOptions = ParseRequestBodyOptions
146148 { -- | The maximum length of a filename
147149 prboKeyLength :: Maybe Int
@@ -159,58 +161,86 @@ data ParseRequestBodyOptions = ParseRequestBodyOptions
159161 prboMaxHeaderLineLength :: Maybe Int }
160162
161163-- | Set the maximum length of a filename.
164+--
165+-- @since 3.0.16.0
162166setMaxRequestKeyLength :: Int -> ParseRequestBodyOptions -> ParseRequestBodyOptions
163167setMaxRequestKeyLength l p = p { prboKeyLength=Just l }
164168
165169-- | Do not limit the length of filenames.
170+--
171+-- @since 3.0.16.0
166172clearMaxRequestKeyLength :: ParseRequestBodyOptions -> ParseRequestBodyOptions
167173clearMaxRequestKeyLength p = p { prboKeyLength=Nothing }
168174
169175-- | Set the maximum number of files per request.
176+--
177+-- @since 3.0.16.0
170178setMaxRequestNumFiles :: Int -> ParseRequestBodyOptions -> ParseRequestBodyOptions
171179setMaxRequestNumFiles l p = p { prboMaxNumFiles=Just l }
172180
173181-- | Do not limit the maximum number of files per request.
182+--
183+-- @since 3.0.16.0
174184clearMaxRequestNumFiles :: ParseRequestBodyOptions -> ParseRequestBodyOptions
175185clearMaxRequestNumFiles p = p { prboMaxNumFiles=Nothing }
176186
177187-- | Set the maximum filesize per file.
188+--
189+-- @since 3.0.16.0
178190setMaxRequestFileSize :: Int64 -> ParseRequestBodyOptions -> ParseRequestBodyOptions
179191setMaxRequestFileSize l p = p { prboMaxFileSize=Just l }
180192
181193-- | Do not limit the maximum filesize per file.
194+--
195+-- @since 3.0.16.0
182196clearMaxRequestFileSize :: ParseRequestBodyOptions -> ParseRequestBodyOptions
183197clearMaxRequestFileSize p = p { prboMaxFileSize=Nothing }
184198
185199-- | Set the maximum size of all files per request.
200+--
201+-- @since 3.0.16.0
186202setMaxRequestFilesSize :: Int64 -> ParseRequestBodyOptions -> ParseRequestBodyOptions
187203setMaxRequestFilesSize l p = p { prboMaxFilesSize=Just l }
188204
189205-- | Do not limit the maximum size of all files per request.
206+--
207+-- @since 3.0.16.0
190208clearMaxRequestFilesSize :: ParseRequestBodyOptions -> ParseRequestBodyOptions
191209clearMaxRequestFilesSize p = p { prboMaxFilesSize=Nothing }
192210
193211-- | Set the maximum size of the sum of all parameters.
212+--
213+-- @since 3.0.16.0
194214setMaxRequestParmsSize :: Int -> ParseRequestBodyOptions -> ParseRequestBodyOptions
195215setMaxRequestParmsSize l p = p { prboMaxParmsSize=Just l }
196216
197217-- | Do not limit the maximum size of the sum of all parameters.
218+--
219+-- @since 3.0.16.0
198220clearMaxRequestParmsSize :: ParseRequestBodyOptions -> ParseRequestBodyOptions
199221clearMaxRequestParmsSize p = p { prboMaxParmsSize=Nothing }
200222
201223-- | Set the maximum header lines per mime/multipart entry.
224+--
225+-- @since 3.0.16.0
202226setMaxHeaderLines :: Int -> ParseRequestBodyOptions -> ParseRequestBodyOptions
203227setMaxHeaderLines l p = p { prboMaxHeaderLines=Just l }
204228
205229-- | Do not limit the maximum header lines per mime/multipart entry.
230+--
231+-- @since 3.0.16.0
206232clearMaxHeaderLines:: ParseRequestBodyOptions -> ParseRequestBodyOptions
207233clearMaxHeaderLines p = p { prboMaxHeaderLines=Nothing }
208234
209235-- | Set the maximum header line length per mime/multipart entry.
236+--
237+-- @since 3.0.16.0
210238setMaxHeaderLineLength :: Int -> ParseRequestBodyOptions -> ParseRequestBodyOptions
211239setMaxHeaderLineLength l p = p { prboMaxHeaderLineLength=Just l }
212240
213241-- | Do not limit the maximum header lines per mime/multipart entry.
242+--
243+-- @since 3.0.16.0
214244clearMaxHeaderLineLength :: ParseRequestBodyOptions -> ParseRequestBodyOptions
215245clearMaxHeaderLineLength p = p { prboMaxHeaderLineLength=Nothing }
216246
@@ -222,6 +252,8 @@ clearMaxHeaderLineLength p = p { prboMaxHeaderLineLength=Nothing }
222252-- maximum header line length: Apache's default for that is 8190 bytes
223253-- (http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline)
224254-- so we're using that here as well.
255+--
256+-- @since 3.0.16.0
225257defaultParseRequestBodyOptions :: ParseRequestBodyOptions
226258defaultParseRequestBodyOptions = ParseRequestBodyOptions
227259 { prboKeyLength=Just 32
@@ -233,6 +265,8 @@ defaultParseRequestBodyOptions = ParseRequestBodyOptions
233265 , prboMaxHeaderLineLength=Just 8190 }
234266
235267-- | Do not impose any memory limits.
268+--
269+-- @since 3.0.16.0
236270noLimitParseRequestBodyOptions :: ParseRequestBodyOptions
237271noLimitParseRequestBodyOptions = ParseRequestBodyOptions
238272 { prboKeyLength=Nothing
@@ -339,6 +373,9 @@ sinkRequestBody :: BackEnd y
339373 -> IO ([Param], [File y])
340374sinkRequestBody = sinkRequestBodyEx noLimitParseRequestBodyOptions
341375
376+-- |
377+--
378+-- @since 3.0.16.0
342379sinkRequestBodyEx :: ParseRequestBodyOptions
343380 -> BackEnd y
344381 -> RequestBodyType