Patches taken from [1]. [1] https://github.com/wireapp/restund/pull/7 Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>