fixes to SaveResponse: memorize length of response header *after* changing it