[PHP-DEV] cvs: /php3/functions head.c From: Hartmut Holzgraefe (hholzgra <email protected>)
Date: 04/28/00

hholzgra Fri Apr 28 10:20:32 2000 EDT

  Modified files:
    /php3/functions head.c
  Log:
  no more broken scripts by erroneously terminating header()'s
  argument with CR-LF
  
  
Index: php3/functions/head.c
diff -u php3/functions/head.c:1.125 php3/functions/head.c:1.126
--- php3/functions/head.c:1.125 Sun Feb 20 14:21:04 2000
+++ php3/functions/head.c Fri Apr 28 10:20:01 2000
@@ -26,7 +26,7 @@
    | Authors: Rasmus Lerdorf <rasmus <email protected>> |
    +----------------------------------------------------------------------+
  */
-/* $Id: head.c,v 1.125 2000/02/20 22:21:04 eschmid Exp $ */
+/* $Id: head.c,v 1.126 2000/04/28 17:20:01 hholzgra Exp $ */
 #include <stdio.h>
 #include "php.h"
 #include "internal_functions.h"
@@ -111,6 +111,13 @@
         char temp2[32];
 #endif
 TLS_VARS;
+
+ for(r=strHeader;*r;r++) {}
+ for(--r;r>=strHeader;--r)
+ if(isspace(*r))
+ *r='\0';
+ else
+ break;
 
         if (GLOBAL(php3_HeaderPrinted) == 1) {
                 php3_error(E_WARNING, "Cannot add more header information - the header was already sent "

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>