Fixed example in doc string

We have to pass a HTTPHeaders object to write_headers()
Merge pull request #1222 from glaslos/patch-1

Fixed example in doc string