[PHP-CVS] cvs: php-src / NEWS /main SAPI.c php_content_types.c php_content_types.h

2005-03-05 Thread Moriyoshi Koizumi
moriyoshi   Sat Mar  5 11:41:13 2005 EDT

  Modified files:  
/php-srcNEWS 
/php-src/main   php_content_types.c php_content_types.h SAPI.c 
  Log:
  - Fixed bug #32109 ($_POST is not populated in multithreaded environment).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1845r2=1.1846ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1845 php-src/NEWS:1.1846
--- php-src/NEWS:1.1845 Wed Mar  2 13:28:31 2005
+++ php-src/NEWSSat Mar  5 11:41:13 2005
@@ -67,6 +67,8 @@
 - Fixed bug with raw_post_data not getting set. (Brian)
 - Fixed bug in mysql::client_version(). (Georg)
 - Fixed ZTS destruction. (Marcus)
+- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
+  (Moriyoshi)
 - Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi)
 - Fixed bug #31033 (php:function(string, nodeset) with xsl:key crashes PHP).
   (Rob)
http://cvs.php.net/diff.php/php-src/main/php_content_types.c?r1=1.30r2=1.31ty=u
Index: php-src/main/php_content_types.c
diff -u php-src/main/php_content_types.c:1.30 
php-src/main/php_content_types.c:1.31
--- php-src/main/php_content_types.c:1.30   Mon Feb 21 10:14:02 2005
+++ php-src/main/php_content_types.cSat Mar  5 11:41:13 2005
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_content_types.c,v 1.30 2005/02/21 15:14:02 moriyoshi Exp $ */
+/* $Id: php_content_types.c,v 1.31 2005/03/05 16:41:13 moriyoshi Exp $ */
 
 #include php.h
 #include SAPI.h
@@ -74,7 +74,6 @@
  */
 int php_startup_sapi_content_types(TSRMLS_D)
 {
-   sapi_register_post_entries(php_post_entries TSRMLS_CC);
sapi_register_default_post_reader(php_default_post_reader);
sapi_register_treat_data(php_default_treat_data);
sapi_register_input_filter(php_default_input_filter);
@@ -82,6 +81,16 @@
 }
 /* }}} */
 
+/* {{{ php_setup_sapi_content_types
+ */
+int php_setup_sapi_content_types(TSRMLS_D)
+{
+   sapi_register_post_entries(php_post_entries TSRMLS_CC);
+
+   return SUCCESS;
+}
+/* }}} */
+
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/diff.php/php-src/main/php_content_types.h?r1=1.10r2=1.11ty=u
Index: php-src/main/php_content_types.h
diff -u php-src/main/php_content_types.h:1.10 
php-src/main/php_content_types.h:1.11
--- php-src/main/php_content_types.h:1.10   Mon Feb 21 10:14:02 2005
+++ php-src/main/php_content_types.hSat Mar  5 11:41:13 2005
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_content_types.h,v 1.10 2005/02/21 15:14:02 moriyoshi Exp $ */
+/* $Id: php_content_types.h,v 1.11 2005/03/05 16:41:13 moriyoshi Exp $ */
 
 #ifndef PHP_CONTENT_TYPES_H
 #define PHP_CONTENT_TYPES_H
@@ -26,5 +26,6 @@
 SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);
 SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler);
 int php_startup_sapi_content_types(TSRMLS_D);
+int php_setup_sapi_content_types(TSRMLS_D);
 
 #endif /* PHP_CONTENT_TYPES_H */
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.196r2=1.197ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.196 php-src/main/SAPI.c:1.197
--- php-src/main/SAPI.c:1.196   Tue Feb 22 00:07:37 2005
+++ php-src/main/SAPI.c Sat Mar  5 11:41:13 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.196 2005/02/22 05:07:37 moriyoshi Exp $ */
+/* $Id: SAPI.c,v 1.197 2005/03/05 16:41:13 moriyoshi Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -61,6 +61,7 @@
 {
memset(sapi_globals, 0, sizeof(*sapi_globals));
zend_hash_init_ex(sapi_globals-known_post_content_types, 5, NULL, 
NULL, 1, 0);
+   php_setup_sapi_content_types(TSRMLS_C);
 }
 
 static void sapi_globals_dtor(sapi_globals_struct *sapi_globals TSRMLS_DC)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / NEWS /main SAPI.c

2004-08-19 Thread Brian France
bfrance Thu Aug 19 16:26:39 2004 EDT

  Modified files:  
/php-srcNEWS 
/php-src/main   SAPI.c 
  Log:
  
  If you send a post with a content-type header and then the next post without the 
content-type header, raw_post_data will not be set.  This is because 
SG(request_info).post_entry is set to the first requests function pointer which makes 
it follow the wrong code path.
  
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1796r2=1.1797ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1796 php-src/NEWS:1.1797
--- php-src/NEWS:1.1796 Thu Aug 19 14:15:48 2004
+++ php-src/NEWSThu Aug 19 16:26:39 2004
@@ -25,6 +25,7 @@
 - Added bz2 stream filter support. (Sara)
 - Added support of parameter-value arrays to xsl_xsltprocessor_set_parameter() 
   (Tony)
+- Fixed bug with raw_post_data not getting set (Brian)
 - Fixed bug in mysql-client_version (Georg)
 - Fixed ZTS destruction. (Marcus)
 - Fixed bug #29737 (ip2long should return -1 if IP is 255.255.255.255 and FALSE on 
error). (Tony)
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.189r2=1.190ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.189 php-src/main/SAPI.c:1.190
--- php-src/main/SAPI.c:1.189   Wed Aug 11 02:18:25 2004
+++ php-src/main/SAPI.c Thu Aug 19 16:26:39 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.189 2004/08/11 06:18:25 rasmus Exp $ */
+/* $Id: SAPI.c,v 1.190 2004/08/19 20:26:39 bfrance Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -296,6 +296,7 @@
SG(request_info).current_user = NULL;
SG(request_info).current_user_length = 0;
SG(request_info).no_headers = 0;
+   SG(request_info).post_entry = NULL;
 
/*
 * It's possible to override this general case in the activate() callback, 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-08-11 Thread Rasmus Lerdorf
Ok, fixed that.  Are you going to commit your rp_cache stuff soon?
-Rasmus
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-08-11 Thread Andi Gutmans
It's not ready to commit. Needs some improvements (such as hooking into INI 
directives). I will try and find time to work on it next week. No rush 
because it'll still take some time for 5.1.

Andi
At 11:19 PM 8/10/2004 -0700, Rasmus Lerdorf wrote:
Ok, fixed that.  Are you going to commit your rp_cache stuff soon?
-Rasmus
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src / NEWS /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-08-10 Thread Rasmus Lerdorf
rasmus  Tue Aug 10 13:40:00 2004 EDT

  Modified files:  
/php-srcNEWS 
/php-src/main   SAPI.c SAPI.h 
/php-src/sapi/apachemod_php5.c 
/php-src/sapi/apache2filter sapi_apache2.c 
/php-src/sapi/apache2handlersapi_apache2.c 
  Log:
  Add SAPI hook to get the request time if provided by the web server,
  otherwise call time(0) on the first call and store it so subsequent
  calls will get the same time.  Hook support for Apache1/2 included.
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1789r2=1.1790ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1789 php-src/NEWS:1.1790
--- php-src/NEWS:1.1789 Tue Aug 10 12:43:20 2004
+++ php-src/NEWSTue Aug 10 13:39:59 2004
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2004, PHP 5.1.0
+- Add SAPI hook to get the current request time. (Rasmus)
 - Fixed bug #29522 (accessing properties without connection) (Georg)
 - Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default) (Georg)
 - Fixed bug #29311 (calling parent constructor in mysqli). (Georg)
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.187r2=1.188ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.187 php-src/main/SAPI.c:1.188
--- php-src/main/SAPI.c:1.187   Tue Jun  8 09:23:38 2004
+++ php-src/main/SAPI.c Tue Aug 10 13:39:59 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.187 2004/06/08 13:23:38 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.188 2004/08/10 17:39:59 rasmus Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -37,6 +37,9 @@
 #ifdef ZTS
 #include TSRM.h
 #endif
+#ifdef HAVE_SYS_TIME_H
+#include sys/time.h
+#endif
 
 #include rfc1867.h
 
@@ -860,7 +863,6 @@
}
 }
 
-
 SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC)
 {
if (sapi_module.getenv) {
@@ -907,6 +909,15 @@
}
 }
 
+SAPI_API time_t sapi_get_request_time(TSRMLS_D)
+{
+   if (sapi_module.get_request_time) {
+   return sapi_module.get_request_time(TSRMLS_C);
+   } else {
+   if(!SG(global_request_time)) SG(global_request_time) = time(0);
+   return SG(global_request_time);
+   }
+}
 
 /*
  * Local variables:
http://cvs.php.net/diff.php/php-src/main/SAPI.h?r1=1.108r2=1.109ty=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.108 php-src/main/SAPI.h:1.109
--- php-src/main/SAPI.h:1.108   Thu Jan  8 12:33:04 2004
+++ php-src/main/SAPI.h Tue Aug 10 13:40:00 2004
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: SAPI.h,v 1.108 2004/01/08 17:33:04 sniper Exp $ */
+/* $Id: SAPI.h,v 1.109 2004/08/10 17:40:00 rasmus Exp $ */
 
 #ifndef SAPI_H
 #define SAPI_H
@@ -122,6 +122,7 @@
long post_max_size;
int options;
zend_bool sapi_started;
+   time_t global_request_time;
 } sapi_globals_struct;
 
 
@@ -197,6 +198,7 @@
 
 SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC);
 SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC);
+SAPI_API time_t sapi_get_request_time(TSRMLS_D);
 END_EXTERN_C()
 
 struct _sapi_module_struct {
@@ -225,6 +227,7 @@
 
void (*register_server_variables)(zval *track_vars_array TSRMLS_DC);
void (*log_message)(char *message);
+   time_t (*get_request_time)(TSRMLS_D);
 
char *php_ini_path_override;
 
http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php5.c?r1=1.11r2=1.12ty=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.11 php-src/sapi/apache/mod_php5.c:1.12
--- php-src/sapi/apache/mod_php5.c:1.11 Mon Jul 19 03:19:49 2004
+++ php-src/sapi/apache/mod_php5.c  Tue Aug 10 13:40:00 2004
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php5.c,v 1.11 2004/07/19 07:19:49 andi Exp $ */
+/* $Id: mod_php5.c,v 1.12 2004/08/10 17:40:00 rasmus Exp $ */
 
 #include php_apache_http.h
 #include http_conf_globals.h
@@ -401,6 +401,14 @@
 }
 /* }}} */
 
+/* {{{ php_apache_get_request_time
+ */
+static time_t php_apache_get_request_time(TSRMLS_D)
+{
+   return ((request_rec *)SG(server_context))-request_time;
+}
+/* }}} */
+
 /* {{{ sapi_module_struct apache_sapi_module
  */
 static sapi_module_struct apache_sapi_module = {
@@ -429,6 +437,7 @@
 
sapi_apache_register_server_variables,  /* register server variables */
php_apache_log_message, /* Log message */
+   php_apache_get_request_time,/* Get request time */
 
NULL,   /* php.ini path 
override */
 
http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.126r2=1.127ty=u
Index: 

Re: [PHP-CVS] cvs: php-src / NEWS /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-08-10 Thread Andi Gutmans
Haven't run the code but it seems that if sapi_get_request_time() is not 
defined then you will return the same time() for each consecutive request 
(i.e. you don't reset it each request). It's probably better to move the 
time(0) initialization to sapi_globals ctor and/or dtor.

Andi
At 05:40 PM 8/10/2004 +, Rasmus Lerdorf wrote:
rasmus  Tue Aug 10 13:40:00 2004 EDT
  Modified files:
/php-srcNEWS
/php-src/main   SAPI.c SAPI.h
/php-src/sapi/apachemod_php5.c
/php-src/sapi/apache2filter sapi_apache2.c
/php-src/sapi/apache2handlersapi_apache2.c
  Log:
  Add SAPI hook to get the request time if provided by the web server,
  otherwise call time(0) on the first call and store it so subsequent
  calls will get the same time.  Hook support for Apache1/2 included.
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1789r2=1.1790ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1789 php-src/NEWS:1.1790
--- php-src/NEWS:1.1789 Tue Aug 10 12:43:20 2004
+++ php-src/NEWSTue Aug 10 13:39:59 2004
@@ -1,6 +1,7 @@
 PHP 
   NEWS

|||
 ?? ??? 2004, PHP 5.1.0
+- Add SAPI hook to get the current request time. (Rasmus)
 - Fixed bug #29522 (accessing properties without connection) (Georg)
 - Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default) (Georg)
 - Fixed bug #29311 (calling parent constructor in mysqli). (Georg)
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.187r2=1.188ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.187 php-src/main/SAPI.c:1.188
--- php-src/main/SAPI.c:1.187   Tue Jun  8 09:23:38 2004
+++ php-src/main/SAPI.c Tue Aug 10 13:39:59 2004
@@ -18,7 +18,7 @@
+--+
 */
-/* $Id: SAPI.c,v 1.187 2004/06/08 13:23:38 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.188 2004/08/10 17:39:59 rasmus Exp $ */
 #include ctype.h
 #include sys/stat.h
@@ -37,6 +37,9 @@
 #ifdef ZTS
 #include TSRM.h
 #endif
+#ifdef HAVE_SYS_TIME_H
+#include sys/time.h
+#endif
 #include rfc1867.h
@@ -860,7 +863,6 @@
}
 }
-
 SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC)
 {
if (sapi_module.getenv) {
@@ -907,6 +909,15 @@
}
 }
+SAPI_API time_t sapi_get_request_time(TSRMLS_D)
+{
+   if (sapi_module.get_request_time) {
+   return sapi_module.get_request_time(TSRMLS_C);
+   } else {
+   if(!SG(global_request_time)) SG(global_request_time) = 
time(0);
+   return SG(global_request_time);
+   }
+}

 /*
  * Local variables:
http://cvs.php.net/diff.php/php-src/main/SAPI.h?r1=1.108r2=1.109ty=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.108 php-src/main/SAPI.h:1.109
--- php-src/main/SAPI.h:1.108   Thu Jan  8 12:33:04 2004
+++ php-src/main/SAPI.h Tue Aug 10 13:40:00 2004
@@ -16,7 +16,7 @@
+--+
 */
-/* $Id: SAPI.h,v 1.108 2004/01/08 17:33:04 sniper Exp $ */
+/* $Id: SAPI.h,v 1.109 2004/08/10 17:40:00 rasmus Exp $ */
 #ifndef SAPI_H
 #define SAPI_H
@@ -122,6 +122,7 @@
long post_max_size;
int options;
zend_bool sapi_started;
+   time_t global_request_time;
 } sapi_globals_struct;
@@ -197,6 +198,7 @@
 SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC);
 SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC);
+SAPI_API time_t sapi_get_request_time(TSRMLS_D);
 END_EXTERN_C()
 struct _sapi_module_struct {
@@ -225,6 +227,7 @@
void (*register_server_variables)(zval *track_vars_array TSRMLS_DC);
void (*log_message)(char *message);
+   time_t (*get_request_time)(TSRMLS_D);
char *php_ini_path_override;
http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php5.c?r1=1.11r2=1.12ty=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.11 
php-src/sapi/apache/mod_php5.c:1.12
--- php-src/sapi/apache/mod_php5.c:1.11 Mon Jul 19 03:19:49 2004
+++ php-src/sapi/apache/mod_php5.c  Tue Aug 10 13:40:00 2004
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php5.c,v 1.11 2004/07/19 07:19:49 andi Exp $ */
+/* $Id: mod_php5.c,v 1.12 2004/08/10 17:40:00 rasmus Exp $ */

 #include php_apache_http.h
 #include http_conf_globals.h
@@ -401,6 +401,14 @@
 }
 /* }}} */
+/* {{{ php_apache_get_request_time
+ */
+static time_t php_apache_get_request_time(TSRMLS_D)
+{
+   return ((request_rec *)SG(server_context))-request_time;
+}
+/* }}} */
+
 /* {{{ sapi_module_struct apache_sapi_module
  */
 static sapi_module_struct apache_sapi_module = {
@@ -429,6 +437,7 @@
sapi_apache_register_server_variables,  /* register 
server variables */
php_apache_log_message, /* Log message */
+   php_apache_get_request_time,/* Get request time */


Re: [PHP-CVS] cvs: php-src / NEWS /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-08-10 Thread Rasmus Lerdorf
On Tue, 10 Aug 2004, Andi Gutmans wrote:
Haven't run the code but it seems that if sapi_get_request_time() is not 
defined then you will return the same time() for each consecutive request 
(i.e. you don't reset it each request). It's probably better to move the 
time(0) initialization to sapi_globals ctor and/or dtor.
Hrm..  Isn't that what I did?
The code is:
SAPI_API time_t sapi_get_request_time(TSRMLS_D) {
if (sapi_module.get_request_time) {
return sapi_module.get_request_time(TSRMLS_C);
} else {
if(!SG(global_request_time)) SG(global_request_time) = time(0);
return SG(global_request_time);
}
}
So I store the time in the sapi_globals_struct which is zeroed on each 
request, so only subsequent calls to sapi_get_request_time() during the 
same request will get the same time which is what I think people would 
expect.

-Rasmus
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-08-10 Thread Andi Gutmans
At 09:52 PM 8/10/2004 -0700, Rasmus Lerdorf wrote:
On Tue, 10 Aug 2004, Andi Gutmans wrote:
Haven't run the code but it seems that if sapi_get_request_time() is not 
defined then you will return the same time() for each consecutive request 
(i.e. you don't reset it each request). It's probably better to move the 
time(0) initialization to sapi_globals ctor and/or dtor.
Hrm..  Isn't that what I did?
The code is:
SAPI_API time_t sapi_get_request_time(TSRMLS_D) {
if (sapi_module.get_request_time) {
return sapi_module.get_request_time(TSRMLS_C);
} else {
if(!SG(global_request_time)) SG(global_request_time) = time(0);
return SG(global_request_time);
}
}
So I store the time in the sapi_globals_struct which is zeroed on each 
request, so only subsequent calls to sapi_get_request_time() during the 
same request will get the same time which is what I think people would expect.
It isn't 0'ed on each request, it's zeroed only at MINIT (or thread-init).
Andi
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src / NEWS /main SAPI.c

2004-03-25 Thread Marcus Boerger
helly   Thu Mar 25 03:42:01 2004 EDT

  Modified files:  
/php-src/main   SAPI.c 
/php-srcNEWS 
  Log:
  Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.183r2=1.184ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.183 php-src/main/SAPI.c:1.184
--- php-src/main/SAPI.c:1.183   Mon Mar  8 21:24:02 2004
+++ php-src/main/SAPI.c Thu Mar 25 03:41:59 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.183 2004/03/09 02:24:02 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.184 2004/03/25 08:41:59 helly Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -560,8 +560,9 @@
if (!STRCASECMP(header_line, Content-Type)) {
char *ptr = colon_offset+1, *mimetype = NULL, 
*newheader;
size_t len = header_line_len - (ptr - header_line), 
newlen;
-   while (*ptr == ' '  *ptr != '\0') {
+   while (*ptr == ' ') {
ptr++;
+   len--;
}
 #if HAVE_ZLIB
if(!strncmp(ptr, image/, sizeof(image/)-1)) {
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1655r2=1.1656ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1655 php-src/NEWS:1.1656
--- php-src/NEWS:1.1655 Wed Mar 24 08:31:17 2004
+++ php-src/NEWSThu Mar 25 03:42:00 2004
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ? 2004, PHP 5 Release Candidate 2
+- Fixed bug #27687 (Bug Adding Default Charset to text/* Content-Type 
+  Header). (Marcus)
 - Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values).
   (Marcus)
 - Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php