Re: Bug #2181: imap_fetchstructure() don't set body->type when message is TYPETEXT

From: Date: Sat, 28 Aug 1999 22:03:29 +0000
Subject: Re: Bug #2181: imap_fetchstructure() don't set body->type when message is TYPETEXT
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-10307@lists.php.net to get a copy of this message
I dont understand how this sets it when the body is TYPETEXT. the original likes unconditionally set the body type, your patches only sets it based on a condition. Mark > > From: tsukada@fminn.nagano.nagano.jp > Operating system: Linux RH6.0 > PHP version: 3.0 Latest CVS (28/08/1999) > PHP Bug Type: Misbehaving function > Bug description: imap_fetchstructure() don't set body-&gt;type when message is > TYPETEXT > > 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 ); > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#10307) next »