Fix httpdigest to be more testable.