note that you can also do

res.put_header_lines (h)

this avoids the `.string' conversion