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

Don't use #eof? when parsing multipart #1201

Commits on Aug 18, 2017

  1. Don't use #eof? when parsing multipart

    On chunked requests (`Transfer-Encoding: chunked`) content length won't
    be present, so `#eof?` will be called on the Rack input directly.
    However, the Rack input doesn't have to respond to `#eof?`, it's not
    part of the Rack specification. For example, `Rack::Lint::InputWrapper`
    and `Unicorn::StreamInput` don't respond to `#eof?`. This means that in
    development and on Unicorn, multipart parsing will fail for chunked
    request.
    
    This change refactors the multipart parser so that it doesn't call
    `#eof?`.
    janko committed Aug 18, 2017
    Copy the full SHA
    df4a028 View commit details
    Browse the repository at this point in the history