Skip to content

Multipart inputs with boundary parameter aren't parsed properly #221

@dmlambea

Description

@dmlambea

Describe the bug
Whenever a content type like "multipart/form-data; boundary=<random string>" is processed by the decoder, the submitted data is not parsed.

Commit 41ffc11 introduced an if in line 81 which checks for an exact value of the content type "multipart/form-data". That comparison is not taking into account the optional parameter "boundary". Therefore, all parameterized submits would not succeed.

To Reproduce
Fields submitted while using the content type "multipart/form-data; boundary=thisisanexample" would fail to be parsed.

Expected behavior
The exact string "multipart/form-data" as well as "multipart/form-data; boundary=<1 to 70 chars>" must be treated the same and the data must be parsed.

Additional context
Link to Content Type header in Mozilla's MDN: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions