-/**
- ** FIXME optimize here
- **
- else if ((phase == 1) && (!strncasecmp(bptr, "Content-type:", 13))) {
- lprintf(9, "%s\n", bptr);
+ else if ((phase == 1) && (!strncasecmp(bptr, "Content-type: ", 14))) {
+ safestrncpy(msg4_content_type, &bptr[14], sizeof msg4_content_type);
+ striplt(msg4_content_type);
+ }
+ else if ((phase == 1) && (!strncasecmp(bptr, "Content-transfer-encoding: ", 27))) {
+ safestrncpy(msg4_content_encoding, &bptr[27], sizeof msg4_content_encoding);
+ striplt(msg4_content_type);
+ }
+ else if ((phase == 1) && (!strncasecmp(bptr, "Content-length: ", 16))) {
+ msg4_content_length = atoi(&bptr[16]);
+ }
+ else if (relevant_source != NULL) {
+ safestrncpy(&relevant_source[body_bytes], bptr, msg4_content_length-body_bytes);
+ safestrncpy(&relevant_source[body_bytes], "\r\n", msg4_content_length-body_bytes);
+ body_bytes += (StrLength(Buf) + 2);