greg: do not leak headers and trailer