You need an extra \n at the end to tell the system the header is done. Otherwise it can't know if there will be more header fields.