This method smells like it can get moved to haproxy helpers :)