It won't. To see why just capture the output of executing the program to a file. The header according to HTTP specification is only the text untill the first blank line (or every character until two consecutive new lines). You'll see that this program would output a blank line between parts of what should be the header.