Code Monkey home page Code Monkey logo

Comments (4)

mikedilger avatar mikedilger commented on May 31, 2024

Hi Conrad,

IETF RFC 2388 section 4.4 mentions the "file" disposition which may be used in the case of multiple files within a sub-part.

We tried to code the library to handle all the cases that might reasonably be expected to show up. In any of these cases:

  • If the filename parameter is set in a Content-Disposition of a subpart,
  • if the Content-Type header exists in a subpart,
  • if a Content-Disposition of a subpart is set to "file"

...then that part of the whole is interpreted as a File and we move to the CapturingFile state.

Hope that helps, and feel free to ask for more details if you need them. If you see anything that looks wrong, I certainly would like to know.

Thanks,
Mike

from formdata.

conradkleinespel avatar conradkleinespel commented on May 31, 2024

Hi Mike,

Thanks for the explanations 👍

I agree with you that this all makes a lot of sense.

I wonder why the new RFC 7578, which obsoletes 2388, does not mention the Content-Disposition: file. That sounds like a breaking change in the RFC. Or maybe I missed the part about Content-Disposition: file there as well ?

Thanks again,
Conrad

from formdata.

mikedilger avatar mikedilger commented on May 31, 2024

RFC 7578 part 4.3 deprecates the use of multipart/mixed within multipart/form-data. Clients certainly should not be producing such things any more. However, we like to be resilient; if some client uses it, we understand it.

I suppose the IETF should have deprecated it in two steps: step 1 - clients no longer writing requests this way, and step 2 - servers no longer need to recognize them. But that did not seem to happen.

from formdata.

conradkleinespel avatar conradkleinespel commented on May 31, 2024

Great to hear you're being resilient :-)

Thanks for everything !

Edit: I had misunderstoof the obsoleted RFC before. I hadn't understood that Content-Disposition: file was only to be used in a subpart of multipart/mixed. This all makes a lot more sense now.

from formdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.