2 Commits

Author SHA1 Message Date
Alberto Bertogli
d80c76f746 envelope: Handle zero-length keys in AddHeader
We don't expect the AddHeader function to be given an empty key;
however, if that were to happen, it currently crashes.

This patch fixes the bug, while also adding tests for that and other
similar cases.
2018-03-02 19:37:28 +00:00
Alberto Bertogli
362ef6f6d0 Introduce an "envelope" package
This patch introduces an "envelope" package which, for now, provides simple
utilities for getting the user and domain of an address.

It also changes the couriers to use it (but other implementations remain, will
be moved over in subsequent patches).
2016-07-22 01:44:45 +01:00