cvs: php4 /ext/imap php_imap.c

From: Date: Thu, 03 May 2001 19:18:48 +0000
Subject: cvs: php4 /ext/imap php_imap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5510@lists.php.net to get a copy of this message
chagenbu Thu May 3 12:18:48 2001 EDT Modified files: /php4/ext/imap php_imap.c Log: Fix for #8359. imap_fetchheader should never return the full message; the FT_PREFETCHTEXT flag is just a hint to c-client that you'll be asking for the message text next. Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.70 php4/ext/imap/php_imap.c:1.71 --- php4/ext/imap/php_imap.c:1.70 Wed May 2 15:57:01 2001 +++ php4/ext/imap/php_imap.c Thu May 3 12:18:48 2001 @@ -25,7 +25,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.70 2001/05/02 22:57:01 andi Exp $ */ +/* $Id: php_imap.c,v 1.71 2001/05/03 19:18:48 chagenbu Exp $ */ #define IMAP41 @@ -2808,17 +2808,7 @@ RETURN_FALSE; } - if ((myargc == 3) && (Z_LVAL_PP(flags) & FT_PREFETCHTEXT)) { - header = mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, &hlen, Z_LVAL_PP(flags)); - body = mail_fetchtext_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &blen, Z_LVAL_PP(flags)); - tempstring = emalloc(hlen+blen+1); - strcpy(tempstring,header); - strcat(tempstring,body); - RETVAL_STRINGL(tempstring,(hlen+blen+1),1); - efree(tempstring); - } else { - RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1); - } + RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1); } /* }}} */

« previous php.cvs (#5510) next »