"\r\nDate: " is used in a couple of places. Would it be worth making it a file-wide static const? (then the size could strlen(const) which will be statically optimized to 8 anyway).