Kitura / Swift-SMTP

Swift SMTP client
Apache License 2.0
260 stars 60 forks source link

Modify Mail to allow folding of long header fields #123

Open sbeitzel opened 2 years ago

sbeitzel commented 2 years ago

Description

Add a folding function to the Mail struct and apply it to headers which might generate lines longer than the RFC-suggested 78 characters (or mandated 998 characters).

Motivation and Context

This change fixes issue #121.

How Has This Been Tested?

I have added unit tests for the wrap/unwrap functions.

Checklist:

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

dannys42 commented 2 years ago

@sbeitzel I had to make some changes to CI, would you mind rebasing?

sbeitzel commented 2 years ago

@dannys42 When you say, "rebasing," um, what is it that you would like me to do? I have never performed that git operation before. I've just read some documentation that sort of explains what rebasing does to the history, but I'm not entirely sure what that means in the context of a pull request. Does it mean, create a new branch and merge this PR branch into it via rebase, then close this PR and open a new PR with the new branch? Or something else? I mean, I'm happy to cooperate and make your life easier; I just need to understand what I'm supposed to do.

dannys42 commented 2 years ago

@sbeitzel Ah sorry... Yeah there's different approaches to this. My preference is rebasing. So my strategy here would be to:

git pull --rebase origin master

This will pull in any changes that have occurred on master. Then resolve any conflicts that occur (there shouldn't be any in your case).

Then when you're done, you'll have to do a git push --force or git push -f. This is because the history of your branch no longer matches your original commit.

Note you normally wouldn't have to do this if there are no merge conflicts (as is the case right now)... but in this case we have to bring in the changes to the CI configuration for the build to run correctly.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication