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

Do not fix \r to \r\n #2154

Merged
merged 2 commits into from
Jan 23, 2023
Merged

Do not fix \r to \r\n #2154

merged 2 commits into from
Jan 23, 2023

Conversation

Wouter0100
Copy link
Contributor

As this may cause issues when a new buffer is exactly in between \r and \n.

Fixes #1624

As this may cause issues when a new buffer is exactly in between \r and \n.

Fixes postalserver#1624
@catphish
Copy link
Contributor

I like this. Will try to get it merged at some point.

@Wouter0100
Copy link
Contributor Author

We've been running this on prod for a while now and it did fix #1624.

@catphish
Copy link
Contributor

Annoyingly this patch is no longer valid with the recent SSL fix. Just bad luck we had 2 bugs in the same block of code. Can you redo the patch against the latest version?

@Wouter0100
Copy link
Contributor Author

@catphish I fixed it. Luckily the change was only a tab/space. The line contents did not change.

@catphish
Copy link
Contributor

I don't have a development environment running at the moment, so I have no way to test, but if you've been running this in production then I will happily merge it, because it looks good to me.
Personally I would have just done gsub("\r", '').gsub("\n", "\r\n"). I'm not sure what else the library is doing here, but I won't rock the boat if it works.

@catphish catphish merged commit 9f4ef8f into postalserver:main Jan 23, 2023
@Wouter0100
Copy link
Contributor Author

Awesome, if you plan on doing a new release I will be able to test in on prod again. :)

@catphish
Copy link
Contributor

I'm super busy at the moment, but I really hope to find some time to test more of the pull requests here soon and then will be worth doing a release.

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.

Postal is somehow missing headers on some received mails (and marking them as spam)
2 participants