comparison src/send_digest.c @ 740:5db75af2d0db

Fix Content-Transfer-Encoding: header for digests, and always close digest listtext
author Ben Schmidt
date Mon, 20 Sep 2010 01:41:32 +1000
parents c26e97a2207b
children b00eb39643c1
comparison
equal deleted inserted replaced
739:ada79809aac0 740:5db75af2d0db
319 319
320 if ((txtfd > 0) && !statctrl(listdir, "nodigesttext")) { 320 if ((txtfd > 0) && !statctrl(listdir, "nodigesttext")) {
321 321
322 tmp = concatstr(3, "\n--", boundary, 322 tmp = concatstr(3, "\n--", boundary,
323 "\nContent-Type: text/plain; charset=UTF-8" 323 "\nContent-Type: text/plain; charset=UTF-8"
324 "\nContent-Encoding: 8bit" 324 "\nContent-Transfer-Encoding: 8bit"
325 "\n\n"); 325 "\n\n");
326 if (writen(fd, tmp, strlen(tmp)) == -1) { 326 if (writen(fd, tmp, strlen(tmp)) == -1) {
327 log_error(LOG_ARGS, "Could not write digest text/plain" 327 log_error(LOG_ARGS, "Could not write digest text/plain"
328 " part headers to '%s'", queuename); 328 " part headers to '%s'", queuename);
329 close(fd); 329 close(fd);
373 } 373 }
374 myfree(tmp); 374 myfree(tmp);
375 } while ((line = mygetline(txtfd))); 375 } while ((line = mygetline(txtfd)));
376 } 376 }
377 377
378 close(txtfd);
379 } else if (txtfd > 0) {
378 close(txtfd); 380 close(txtfd);
379 } 381 }
380 382
381 myfree(line); 383 myfree(line);
382 myfree(listaddr); 384 myfree(listaddr);