[PHP-DEV] Bug #2181 Updated: imap_fetchstructure() don't set body-type when message is TYPETEXT
ID: 2181 Updated by: vlad Reported By: [EMAIL PROTECTED] Old-Status: Assigned Status: Closed Bug Type: IMAP related Operating system: PHP Version: 4.0 Assigned To: vlad Comments: Actually, this was still a problem, I just missed it. 7-bit encodings and plain-text body types both should be represented by setting body-type and body-encoding to zero, respectively. They were not set at all. Now they are. The impact should be minimal because zero is the same as an unset variable, as far as most people are concerned in this case. Previous Comments: --- [2001-05-07 14:51:36] [EMAIL PROTECTED] I'll assign this one to you then. --- [2001-05-07 14:48:07] [EMAIL PROTECTED] This shouldn't be a problem for imap_fetchstructure() now, because that code is not there. However, this code is present in imap_bodystruct(), which does not seem to be documented (?). I'll try to see if I can create a message that will trigger that problem, and, if I can trigger it, I'll fix it. If anyone else gets to it before me, I have a suggestion about the patch submited by [EMAIL PROTECTED] - the less-than sign in body-type TYPEMAX and body-encoding ENCMAX whould really be less or equal (that's what I understod from reading imap/c-client/imap4r1.c) --- [2001-02-10 13:41:48] [EMAIL PROTECTED] refiled against 4.0 imap. no idea if it is still an issue. --- [1999-11-15 10:11:06] [EMAIL PROTECTED] Marc- Hope you don't mind if I assign this? --- [1999-08-28 11:42:39] [EMAIL PROTECTED] please check below patch --- imap.c.orig Sat Aug 28 23:43:06 1999 +++ imap.c Sun Aug 29 00:08:24 1999 @@ -2087,8 +2087,8 @@ PARAMETER *par, *dpar; PART *part; - if(body-type) add_property_long( arg, type, body-type ); - if(body-encoding) add_property_long( arg, encoding, body-encoding ); + if(body-type TYPEMAX) add_property_long( arg, type, body-type ); + if(body-encoding ENCMAX) add_property_long( arg, encoding, body-encoding +); if ( body-subtype ){ add_property_long( arg, ifsubtype, 1 ); @@ -2711,8 +2711,8 @@ } body=mail_body(imap_le_struct-imap_stream, msg-value.lval, section-value.str.val); - if(body-type) add_property_long( return_value, type, body-type ); - if(body-encoding) add_property_long( return_value, encoding, body-encoding ); + if(body-type TYPEMAX) add_property_long( return_value, type, body-type +); + if(body-encoding ENCMAX) add_property_long( return_value, encoding, +body-encoding ); if ( body-subtype ){ add_property_long( return_value, ifsubtype, 1 ); --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=2181edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #2181 Updated: imap_fetchstructure() don't set body-type when message is TYPETEXT
ID: 2181 Updated by: vlad Reported By: [EMAIL PROTECTED] Status: Open Bug Type: IMAP related Operating system: PHP Version: 4.0 Assigned To: Comments: This shouldn't be a problem for imap_fetchstructure() now, because that code is not there. However, this code is present in imap_bodystruct(), which does not seem to be documented (?). I'll try to see if I can create a message that will trigger that problem, and, if I can trigger it, I'll fix it. If anyone else gets to it before me, I have a suggestion about the patch submited by [EMAIL PROTECTED] - the less-than sign in body-type TYPEMAX and body-encoding ENCMAX whould really be less or equal (that's what I understod from reading imap/c-client/imap4r1.c) Previous Comments: --- [2001-02-10 13:41:48] [EMAIL PROTECTED] refiled against 4.0 imap. no idea if it is still an issue. --- [1999-11-15 10:11:06] [EMAIL PROTECTED] Marc- Hope you don't mind if I assign this? --- [1999-08-28 11:42:39] [EMAIL PROTECTED] please check below patch --- imap.c.orig Sat Aug 28 23:43:06 1999 +++ imap.c Sun Aug 29 00:08:24 1999 @@ -2087,8 +2087,8 @@ PARAMETER *par, *dpar; PART *part; - if(body-type) add_property_long( arg, type, body-type ); - if(body-encoding) add_property_long( arg, encoding, body-encoding ); + if(body-type TYPEMAX) add_property_long( arg, type, body-type ); + if(body-encoding ENCMAX) add_property_long( arg, encoding, body-encoding +); if ( body-subtype ){ add_property_long( arg, ifsubtype, 1 ); @@ -2711,8 +2711,8 @@ } body=mail_body(imap_le_struct-imap_stream, msg-value.lval, section-value.str.val); - if(body-type) add_property_long( return_value, type, body-type ); - if(body-encoding) add_property_long( return_value, encoding, body-encoding ); + if(body-type TYPEMAX) add_property_long( return_value, type, body-type +); + if(body-encoding ENCMAX) add_property_long( return_value, encoding, +body-encoding ); if ( body-subtype ){ add_property_long( return_value, ifsubtype, 1 ); --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=2181edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #2181 Updated: imap_fetchstructure() don't set body-type when message is TYPETEXT
ID: 2181 Updated by: derick Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Assigned Bug Type: IMAP related Operating system: PHP Version: 4.0 Assigned To: vlad Comments: I'll assign this one to you then. Previous Comments: --- [2001-05-07 14:48:07] [EMAIL PROTECTED] This shouldn't be a problem for imap_fetchstructure() now, because that code is not there. However, this code is present in imap_bodystruct(), which does not seem to be documented (?). I'll try to see if I can create a message that will trigger that problem, and, if I can trigger it, I'll fix it. If anyone else gets to it before me, I have a suggestion about the patch submited by [EMAIL PROTECTED] - the less-than sign in body-type TYPEMAX and body-encoding ENCMAX whould really be less or equal (that's what I understod from reading imap/c-client/imap4r1.c) --- [2001-02-10 13:41:48] [EMAIL PROTECTED] refiled against 4.0 imap. no idea if it is still an issue. --- [1999-11-15 10:11:06] [EMAIL PROTECTED] Marc- Hope you don't mind if I assign this? --- [1999-08-28 11:42:39] [EMAIL PROTECTED] please check below patch --- imap.c.orig Sat Aug 28 23:43:06 1999 +++ imap.c Sun Aug 29 00:08:24 1999 @@ -2087,8 +2087,8 @@ PARAMETER *par, *dpar; PART *part; - if(body-type) add_property_long( arg, type, body-type ); - if(body-encoding) add_property_long( arg, encoding, body-encoding ); + if(body-type TYPEMAX) add_property_long( arg, type, body-type ); + if(body-encoding ENCMAX) add_property_long( arg, encoding, body-encoding +); if ( body-subtype ){ add_property_long( arg, ifsubtype, 1 ); @@ -2711,8 +2711,8 @@ } body=mail_body(imap_le_struct-imap_stream, msg-value.lval, section-value.str.val); - if(body-type) add_property_long( return_value, type, body-type ); - if(body-encoding) add_property_long( return_value, encoding, body-encoding ); + if(body-type TYPEMAX) add_property_long( return_value, type, body-type +); + if(body-encoding ENCMAX) add_property_long( return_value, encoding, +body-encoding ); if ( body-subtype ){ add_property_long( return_value, ifsubtype, 1 ); --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=2181edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]