- if (!strcasecmp(desired_section, mbuf2)) {
- cprintf("Content-type: %s", cbtype);
- if (!IsEmptyStr(cbcharset))
- cprintf("; charset=\"%s\"", cbcharset);
- if (!IsEmptyStr(name))
- cprintf("; name=\"%s\"", name);
- cprintf("\r\n");
- if (!IsEmptyStr(encoding))
- cprintf("Content-Transfer-Encoding: %s\r\n", encoding);
+ if (!strcasecmp(ChrPtr(desired_section), mimebuf2)) {
+ client_write(HKEY("Content-type: "));
+ client_write(cbtype, strlen(cbtype));
+ if (!IsEmptyStr(cbcharset)) {
+ client_write(HKEY("; charset=\""));
+ client_write(cbcharset, strlen(cbcharset));
+ client_write(HKEY("\""));
+ }
+ if (!IsEmptyStr(name)) {
+ client_write(HKEY("; name=\""));
+ client_write(name, strlen(name));
+ client_write(HKEY("\""));
+ }
+ client_write(HKEY("\r\n"));
+ if (!IsEmptyStr(encoding)) {
+ client_write(HKEY("Content-Transfer-Encoding: "));
+ client_write(encoding, strlen(encoding));
+ client_write(HKEY("\r\n"));
+ }