[PHP-CVS] cvs: php-src(PHP_5_1) /main SAPI.c

2005-12-29 Thread Jani Taskinen
sniper  Fri Dec 30 05:40:43 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/main   SAPI.c 
  Log:
  MFH: typofix
  
http://cvs.php.net/viewcvs.cgi/php-src/main/SAPI.c?r1=1.202.2.5r2=1.202.2.6diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.5 php-src/main/SAPI.c:1.202.2.6
--- php-src/main/SAPI.c:1.202.2.5   Tue Dec  6 03:39:45 2005
+++ php-src/main/SAPI.c Fri Dec 30 05:40:43 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.202.2.5 2005/12/06 03:39:45 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.202.2.6 2005/12/30 05:40:43 sniper Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -575,7 +575,7 @@
continue;
}
efree(header_line);
-   sapi_module.sapi_error(E_WARNING, Header may not 
contain more then a single header, new line detected.);
+   sapi_module.sapi_error(E_WARNING, Header may not 
contain more than a single header, new line detected.);
return FAILURE;
}
}

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



[PHP-CVS] cvs: php-src(PHP_5_1) /main SAPI.c

2005-11-06 Thread Jani Taskinen
sniper  Sun Nov  6 17:08:30 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/main   SAPI.c 
  Log:
  MFH
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.202.2.3r2=1.202.2.4ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.3 php-src/main/SAPI.c:1.202.2.4
--- php-src/main/SAPI.c:1.202.2.3   Wed Nov  2 09:38:10 2005
+++ php-src/main/SAPI.c Sun Nov  6 17:08:30 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.202.2.3 2005/11/02 14:38:10 mike Exp $ */
+/* $Id: SAPI.c,v 1.202.2.4 2005/11/06 22:08:30 sniper Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -747,7 +747,7 @@
/* Add output compression headers at this late stage in order to make
   it possible to switch it off inside the script. */
 
-   if (EG(in_execution)  zend_ini_long(zlib.output_compression, 
sizeof(zlib.output_compression), 0)) {
+   if (zend_ini_long(zlib.output_compression, 
sizeof(zlib.output_compression), 0)) {
zval nm_zlib_get_coding_type;
zval *uf_result = NULL;
 

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



[PHP-CVS] cvs: php-src(PHP_5_1) /main SAPI.c /sapi/cgi cgi_main.c

2005-11-02 Thread Michael Wallner
mikeWed Nov  2 09:38:13 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/main   SAPI.c 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  - sapi_header_op(SAPI_HEADER_(REPLACE|ADD), {NULL, 0, 0}) caused HTTP 
response splitting
  - sapi_send_headers() already takes care of default_content_type (left over 
of fix for bug #29983)
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.202.2.2r2=1.202.2.3ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.2 php-src/main/SAPI.c:1.202.2.3
--- php-src/main/SAPI.c:1.202.2.2   Tue Nov  1 17:59:18 2005
+++ php-src/main/SAPI.c Wed Nov  2 09:38:10 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.202.2.2 2005/11/01 22:59:18 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.202.2.3 2005/11/02 14:38:10 mike Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -545,6 +545,10 @@
case SAPI_HEADER_REPLACE:
case SAPI_HEADER_ADD: {
sapi_header_line *p = arg;
+   
+   if (!p-line || !p-line_len) {
+   return FAILURE;
+   }
header_line = p-line;
header_line_len = p-line_len;
http_response_code = p-response_code;
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.1r2=1.267.2.2ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.1 
php-src/sapi/cgi/cgi_main.c:1.267.2.2
--- php-src/sapi/cgi/cgi_main.c:1.267.2.1   Thu Oct  6 16:29:40 2005
+++ php-src/sapi/cgi/cgi_main.c Wed Nov  2 09:38:13 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.1 2005/10/06 20:29:40 johannes Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.2 2005/11/02 14:38:13 mike Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -331,21 +331,13 @@
PHPWRITE_H(buf, len);
}
 
-   if (SG(sapi_headers).send_default_content_type)
-   {
-   char *hd;
-
-   hd = sapi_get_default_content_type(TSRMLS_C);
-   PHPWRITE_H(Content-type: , sizeof(Content-type: ) - 1);
-   PHPWRITE_H(hd, strlen(hd));
-   PHPWRITE_H(\r\n, 2);
-   efree(hd);
-   }
-
h = zend_llist_get_first_ex(sapi_headers-headers, pos);
while (h) {
-   PHPWRITE_H(h-header, h-header_len);
-   PHPWRITE_H(\r\n, 2);
+   /* prevent CRLFCRLF */
+   if (h-header_len) {
+   PHPWRITE_H(h-header, h-header_len);
+   PHPWRITE_H(\r\n, 2);
+   }
h = zend_llist_get_next_ex(sapi_headers-headers, pos);
}
PHPWRITE_H(\r\n, 2);

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



[PHP-CVS] cvs: php-src(PHP_5_1) /main SAPI.c

2005-11-01 Thread Ilia Alshanetsky
iliaa   Tue Nov  1 17:59:25 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/main   SAPI.c 
  Log:
  Fixed minor memory leak triggered by: -dzlib.output_compression=1 -m
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.202.2.1r2=1.202.2.2ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.1 php-src/main/SAPI.c:1.202.2.2
--- php-src/main/SAPI.c:1.202.2.1   Wed Oct 19 16:33:33 2005
+++ php-src/main/SAPI.c Tue Nov  1 17:59:18 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.202.2.1 2005/10/19 20:33:33 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.202.2.2 2005/11/01 22:59:18 iliaa Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -743,7 +743,7 @@
/* Add output compression headers at this late stage in order to make
   it possible to switch it off inside the script. */
 
-   if (zend_ini_long(zlib.output_compression, 
sizeof(zlib.output_compression), 0)) {
+   if (EG(in_execution)  zend_ini_long(zlib.output_compression, 
sizeof(zlib.output_compression), 0)) {
zval nm_zlib_get_coding_type;
zval *uf_result = NULL;
 

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