-
Notifications
You must be signed in to change notification settings - Fork 165
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
content-disposition is optional for multipart/related #175
Comments
Pull requests welcome! |
hello @dougwilson, I'm figuring out how to distinguish between a field or a file. My initial point should be use the |
I'm not sure. I would expect it to distinguish them however the spec says. |
This is the spec this module is trying to adhere to: https://tools.ietf.org/html/rfc7578 and it states (in https://tools.ietf.org/html/rfc7578#section-4.2):
I haven't really looked at the one you linked to, but figured to state what this module is trying to do may help here. |
The spec you mention is for In talking about for |
Right, it is for multipart/form-data. The first line in the README is as follows:
I honestly had no idea this module allowed multipart/related. Seems weird because they seems to have different requirements in some areas. I don't know much about multipart/related so will defer to you on what changes need to be made in that regard, but they shouldn't break the multipart/form-data compliance of this module, at least. |
I just noticed this module seems to have zero tests for multipart/related. Perhaps we should just release a new major just removing that content-type? Or are the similar enough to support both? Can you help me understand multipart/related ? How does it related to multipart/form-data ; like what are the similarities and the differences. If both are supported, that would help, since afaik there is just a single parsing code path, so I assume it is just parsing multipart/related as if it was multipart/form-data, so writing down what the differences are between the two will help understand what is broken today and how much of a different code path would need to be added. |
of course, I want to keep the behaviour of this module for When I faced the issue of looking for According
|
According https://tools.ietf.org/html/rfc2387#section-4 on
multipart/related
content-disposition
header is optional.Library only grab a file if
content-disposition
exists.I think library should be able to handle files without this optional header and save it with a random (based on timestamp for example) filename.
The text was updated successfully, but these errors were encountered: