Write status code and headers
Merge pull request #2 from kenhkan/write_head

Write status code and headers