[http1] reduce the number of allocations in response header generation