in reply to HTTP header

It won't work the first way because you aren't specifying 'no parsed headers' to the server, so the server is trying to add the "HTTP/1.1 200 OK" or whatever and obviously this will give rise to an error. You will have to work out how to cause your server software to give you "non parsed headers".

/J\