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

Support reading multipart data with \n (LF) lines #3492

Merged
merged 5 commits into from
Jan 15, 2019

Commits on Jan 14, 2019

  1. Support reading multipart data with \n (LF) lines

    While RFC clearly says about `CRLF` newlines, there quite a lot of
    implementations which uses just `LF`. Even Python's stdlib produces
    multiparts with `\n` newlines by default for compatibility reasons.
    
    We wouldn't change how we produce multipart content - here we follow
    RFC. However, we can detect `\n` lines quite easily which makes their
    support quite cheap.
    kxepal committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    d05a640 View commit details
    Browse the repository at this point in the history
  2. Add test about mixed newlines

    Just for case. That's a strange case, but it seems we pass it.
    kxepal committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    e66e379 View commit details
    Browse the repository at this point in the history
  3. Make newline argument as keyword one and explicitly private one

    This argument is not designed to be defined by users. Depending on
    parsing multipart newline format it will be chosen automatically and
    due to recursive native of multipart format it have to be passed around
    for nested readers.
    kxepal committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    5536671 View commit details
    Browse the repository at this point in the history
  4. Update multipart.py

    asvetlov committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    e2b45ba View commit details
    Browse the repository at this point in the history
  5. Update multipart.py

    asvetlov committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    5f52ae1 View commit details
    Browse the repository at this point in the history