comparison src/readpst.c @ 349:a57c15b3108a

Jeffrey Morlan - fix multiple Content-Type headers
author Carl Byington <carl@five-ten-sg.com>
date Fri, 11 Sep 2015 09:46:12 -0700
parents a8577226f7a9
children 7a91e30826d8
comparison
equal deleted inserted replaced
348:c006b76da81d 349:a57c15b3108a
1299 } 1299 }
1300 1300
1301 1301
1302 void header_strip_field(char *header, char *field) 1302 void header_strip_field(char *header, char *field)
1303 { 1303 {
1304 char *t = header_get_field(header, field); 1304 char *t;
1305 if (t) { 1305 while ((t = header_get_field(header, field))) {
1306 char *e = header_end_field(t); 1306 char *e = header_end_field(t);
1307 if (e) { 1307 if (e) {
1308 if (t == header) e++; // if *t is not \n, we don't want to keep the \n at *e either. 1308 if (t == header) e++; // if *t is not \n, we don't want to keep the \n at *e either.
1309 while (*e != '\0') { 1309 while (*e != '\0') {
1310 *t = *e; 1310 *t = *e;