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

Boundary quotes #48

Closed
liaguh opened this issue Apr 29, 2013 · 3 comments
Closed

Boundary quotes #48

liaguh opened this issue Apr 29, 2013 · 3 comments

Comments

@liaguh
Copy link

liaguh commented Apr 29, 2013

Maybe slowpoke but happened to notice the boundaries are not enclose in quotes any more.
RFC 1521 - 7.2.1. : "This is not always necessary, but never hurts."
Content-Type: multipart/mixed;
boundary="gc0p4Jq0M:2Yt08jU534c0p"

@Synchro
Copy link
Member

Synchro commented Apr 29, 2013

Not slow at all - it was only just pushed and it's not in a tagged release yet. I did that because it was flagged as a warning in the IETF's msglint MIME checker and the way that boundaries are generated means we can be sure they never need quoting. Any value element in a header should be a token or a quoted-string (I think both are subsets of atom), and msglint flags anything not strictly necessary, for example if you mark a message body as 8-bit when it could be 7-bit. A related change is that filenames in content-disposition headers only get quoted if they need it.

RFC 2183 says:

A short (length <= 78 characters) parameter value containing only non-'tspecials' characters SHOULD be represented as a single 'token'. A short parameter value containing only ASCII characters, but including 'tspecials' characters, SHOULD be represented as 'quoted-string'. Parameter values longer than 78 characters, or which contain non-ASCII characters, MUST be encoded as specified in RFC 2184.

It would be better if we had a generic formatter for values in headers as it's a bit random at present.

@Synchro
Copy link
Member

Synchro commented Apr 30, 2013

I've done some more experiments and looked at how other email creators treat quotes on boundary definitions and decided to restore them. The way I'm treating filenames in content-dispositions is consistent with other mailers, so that will stay.

@Synchro
Copy link
Member

Synchro commented Apr 30, 2013

Fixed in c11c5af

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

No branches or pull requests

2 participants