Skip to content

Wai Parse FilenameTooLong error incorrectly thrown for too long param name #1001

@moll

Description

@moll

Hey,

I think the FilenameTooLong error in Wai Parse is incorrectly thrown for a too long key name, not the file name.

Just (mct, name, Just filename) -> do
case prboKeyLength o of
Just maxKeyLength ->
when (S.length name > maxKeyLength) $
E.throwIO $
FilenameTooLong name maxKeyLength
Nothing -> return ()

The name length check mirrors the one just beneath the other Just (_ct, name, Nothing) case and that's for the parameter name. There's no code right now that checks the file name length, so the error itself seems unused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions