commit: provide a function to find a header in a buffer