Actually, I think there might be a space (optionally) after the colon when you send HTTP headers. I don't know what the http lib used by youtube-dl does though.