on master help sign in
Move the comment about the max. header length to where it makes more sense
commitef4106de60bdb7fdd6b845c7f8ae5ef991591073 authorHans-Christian Esperer <hc@hcesperer.org> dateTue 5 Jul 2016, 13:12 (10 years ago) parent952f3a8
1 file changed+3−5
wai-extra/Network/Wai/Parse.hs+3−5
wai-extra/Network/Wai/Parse.hs+3−5
@@ -219,8 +219,9 @@ clearMaxHeaderLineLength p = p { prboMaxHeaderLineLength=Nothing }
219219-- maximum files: 10; filesize unlimited; maximum
220220-- size for parameters: 64kbytes; maximum number of header
221221-- lines: 32 bytes (applies only to headers of a mime/multipart message);
222−-- maximum header line length: 8190 bytes (applies only to headers of
223−-- a mime/multipart message)
222+-- maximum header line length: Apache's default for that is 8190 bytes
223+-- (http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline)
224+-- so we're using that here as well.
224225defaultParseRequestBodyOptions :: ParseRequestBodyOptions
225226defaultParseRequestBodyOptions = ParseRequestBodyOptions
226227 { prboKeyLength=Just 32
@@ -380,9 +381,6 @@ conduitRequestBodyEx o backend (Multipart bound) rbody add =
380381
381382
382383-- | Take one header or subheader line.
383−-- It makes sense to limit the maximum line length.
384−-- Apache's default is 8190 (http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline)
385−-- so we're using that here as well.
386384takeLine :: Maybe Int -> Source -> IO (Maybe S.ByteString)
387385takeLine maxlen src =
388386 go ""