I'm not totally sure if I follow, the original implementation is compliant with the specs and RFC. Can you be more specific and show me what's wrong, which your patch is fixing (examples)?