Comments (4)
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 aContent-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.
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.
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.
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)
- BufReadPlus with tokens larger than the underlying buffer capacity still wrong
- BufReadPlus token 'partial' should be a vec HOT 3
- Rework for asynchronous non-blocking use HOT 1
- Add support for multidata/formdata to servo/servo HOT 2
- Iron Plugin HOT 2
- Preserve the language tag of the filename HOT 1
- Restore serde_codegen
- Relicense under dual MIT/Apache-2.0 HOT 7
- Peeker is zero-length after parsing a file HOT 14
- Build failed with the latest syntex HOT 1
- Error 'no method named `deserialize_newtype_struct`' when compiling textnonce HOT 2
- Compile failed with rustc 1.8.0! HOT 2
- Please push remaining tags HOT 1
- Fails to build with current nightly. HOT 2
- Build failed for Rust 1.11.0 HOT 1
- Specifying a different filename; Not storing the ContentDisposition header. HOT 1
- Release a version supporting Hyper 0.10 HOT 4
- Update to hyper 0.12 HOT 6
- example does not build x64 windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formdata.