1) Where is http defined? You'll have to show the code for it (also what browser are you testing in)
2) You are setting two headers I don't normally see. Content-length and Connection. Any particular reason?
Other than that at first glance it looks about right.