Skip to content

Use mimetypes for the detection of files in form-data#89

Merged
Jericho merged 9 commits intoHttp-Multipart-Data-Parser:developfrom
bkrbtc:develop
Dec 1, 2020
Merged

Use mimetypes for the detection of files in form-data#89
Jericho merged 9 commits intoHttp-Multipart-Data-Parser:developfrom
bkrbtc:develop

Conversation

@bkrbtc
Copy link
Copy Markdown
Contributor

@bkrbtc bkrbtc commented Nov 30, 2020

RFC 7578 defines the "filename" parameter as "SHOULD". This means the existence of the parameter is not a sufficient criteria to distinguish between files and parameters. I added an option to detectet files by it's mimetype. This list can be enhanced by the user of the library

@Jericho
Copy link
Copy Markdown
Collaborator

Jericho commented Nov 30, 2020

Thank you for submitting this PR. Do you mind raising an issue to discuss the underlying problem you are trying to solve? Please include as much info as you can such as repro steps, describe the circumstances where you experience this problem etc.

@bkrbtc
Copy link
Copy Markdown
Contributor Author

bkrbtc commented Nov 30, 2020

#90
You can also find an example in the added Unit-Tests of this pull request.

@Jericho Jericho linked an issue Nov 30, 2020 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@Jericho Jericho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I get a few warnings in Visual Studio such as:

  • SA1001 Commas should be followed by whitespace.
  • SA1013 Closing brace should be preceded by a space.
  • SA1629 Documentation text should end with a period

I'll see if can push changes to your PR to fix those.

Comment thread Source/HttpMultipartParser/MultipartFormDataParser.cs Outdated
Co-authored-by: Jericho <desautelsj@hotmail.com>
@bkrbtc bkrbtc requested a review from Jericho December 1, 2020 13:33
Copy link
Copy Markdown
Collaborator

@Jericho Jericho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@bkrbtc
Copy link
Copy Markdown
Contributor Author

bkrbtc commented Dec 1, 2020

Looks good to me!

For me too. If you like to merge feel free. Thank you for your support.

@Jericho Jericho merged commit fcaf881 into Http-Multipart-Data-Parser:develop Dec 1, 2020
@Jericho
Copy link
Copy Markdown
Collaborator

Jericho commented Dec 3, 2020

I got busy with other projects in the last few days but I have some time now. Will look at releasing today or tomorrow.

@bkrbtc
Copy link
Copy Markdown
Contributor Author

bkrbtc commented Dec 4, 2020

No Problem. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Files without filename are not recognized

2 participants