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

Adds Part.ContentTypeParams to allow custom params #148

Merged
merged 2 commits into from Feb 22, 2020

Conversation

pzeinlinger
Copy link
Contributor

Custom ContentTypeParams are required in certain situations.
E.g. RFC3156 (MIME Security for OpenPGP) requires
protocol="application/pgp-encrypted" as Content-Type param.

 Custom ContentTypeParams are required in certain situations.
 E.g. RFC3156 (MIME Security for OpenPGP) requires
 protocol="application/pgp-encrypted" as Content-Type param.
@coveralls
Copy link

coveralls commented Feb 21, 2020

Coverage Status

Coverage increased (+0.008%) to 95.566% when pulling 5984e98 on pzeinlinger:feature/ContentTypeParams into 6c3c516 on jhillyerd:develop.

@jhillyerd
Copy link
Owner

Thanks, this is a good idea!

Can you add a unit test? Perhaps extend https://github.com/jhillyerd/enmime/blob/master/encode_test.go#L34 and its golden file. That way we can ensure any future refactoring doesn't break this functionality.

@pzeinlinger
Copy link
Contributor Author

Sure thing!

@jhillyerd jhillyerd merged commit b9d0f68 into jhillyerd:develop Feb 22, 2020
@jhillyerd
Copy link
Owner

Looks good, thank you!

jhillyerd added a commit that referenced this pull request Feb 23, 2020
Added
- Inject a `application/octet-stream` as default content type when none is
  present (#140, thanks requaos)
- Add support for content-type params to part & encoding (#148, thanks
  pzeinlinger)
- UTF-7 support (#17)

Fixed
- Handle missing parameter values in the middle of the media parameter list
  (#139, thanks requaos)
- Fix boundaryReader to respect length instead of capacity (#145, thanks
  dcormier)
- Handle very empty mime parts (#144, thanks dcormier)
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.

None yet

3 participants