Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When parsing a multi-part POST, retain original pairs #2088

Merged
merged 1 commit into from
Jul 17, 2023

Commits on Jun 22, 2023

  1. When parsing a multi-part POST, retain original pairs

    The input is not guaranteed to be rewindable, and the default parameter
    expansion loses details of the parameter names.
    
    For form-encoded data, we (already) retain the full string: it contains
    only simple key/value pairs, and will be of a manageable size.
    
    Multipart data may contain uploaded files, so we don't wish to retain
    the full input string -- that's why we dropped the rewindability
    requirement on the input stream. Instead, we retain an array of
    two-element arrays representing the "raw" key-value pairs as we parsed
    the stream. This minimizes additional memory use, because the values are
    the same objects we use in the params hash, while still allowing an
    interested consumer to apply their own logic to parameter name
    interpretation.
    matthewd committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    37f4815 View commit details
    Browse the repository at this point in the history