[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 10:15:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291912

Log:
FIFO

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-09 10:00:35 UTC (rev 291911)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-09 10:15:34 UTC (rev 291912)
@@ -9,6 +9,7 @@
 - Changed post_max_size php.ini directive to allow unlimited post size by
   setting it to 0. (Rasmus)

+- Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)
 - Added realpath_cache_size() and realpath_cache_get() functions. (Stas)
 - Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. (Ilia)
 - Added protection for $_SESSION from interrupt corruption and improved
@@ -22,7 +23,6 @@
 - Added support for CURLOPT_CERTINFO. FR #49253.
   (Linus Nielsen Feltzing li...@haxx.se)
 - Added client-side server name indication support in openssl. (Arnaud)
-- Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)

 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)


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

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-12-09 Thread Pierre Joye
On Wed, Dec 9, 2009 at 11:15 AM, Jani Taskinen j...@php.net wrote:
 jani                                     Wed, 09 Dec 2009 10:15:34 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=291912

 Log:
 FIFO

LIFO in this case :)

Thx for the fix!

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/php_stdbool.h trunk/win32/php_stdbool.h

2009-12-09 Thread Pierre Joye
pajoye   Wed, 09 Dec 2009 10:39:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291913

Log:
- #50334, add missing file

Bug: http://bugs.php.net/50334 (Closed) crypt ignores sha512 prefix
  
Changed paths:
A   php/php-src/branches/PHP_5_3/win32/php_stdbool.h
A   php/php-src/trunk/win32/php_stdbool.h

Added: php/php-src/branches/PHP_5_3/win32/php_stdbool.h
===
--- php/php-src/branches/PHP_5_3/win32/php_stdbool.h
(rev 0)
+++ php/php-src/branches/PHP_5_3/win32/php_stdbool.h2009-12-09 10:39:03 UTC 
(rev 291913)
@@ -0,0 +1,11 @@
+#ifndef _STDBOOL_H
+#define _STDBOOL_H
+#if !defined(__BOOL_DEFINED)
+#  define bool short
+
+/* The other macros must be usable in preprocessor directives.  */
+#  define false 0
+#  define true 1
+#  define __bool_true_false_are_defined 1
+# endif
+#endif /* _STDBOOL_H */

Added: php/php-src/trunk/win32/php_stdbool.h
===
--- php/php-src/trunk/win32/php_stdbool.h   (rev 0)
+++ php/php-src/trunk/win32/php_stdbool.h   2009-12-09 10:39:03 UTC (rev 
291913)
@@ -0,0 +1,11 @@
+#ifndef _STDBOOL_H
+#define _STDBOOL_H
+#if !defined(__BOOL_DEFINED)
+#  define bool short
+
+/* The other macros must be usable in preprocessor directives.  */
+#  define false 0
+#  define true 1
+#  define __bool_true_false_are_defined 1
+# endif
+#endif /* _STDBOOL_H */

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

[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ config.w32

2009-12-09 Thread Pierre Joye
pajoye   Wed, 09 Dec 2009 10:39:42 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291914

Log:
- #50334, fix trunk build

Bug: http://bugs.php.net/50334 (Closed) crypt ignores sha512 prefix
  
Changed paths:
U   php/php-src/trunk/ext/standard/config.w32

Modified: php/php-src/trunk/ext/standard/config.w32
===
--- php/php-src/trunk/ext/standard/config.w32   2009-12-09 10:39:03 UTC (rev 
291913)
+++ php/php-src/trunk/ext/standard/config.w32   2009-12-09 10:39:42 UTC (rev 
291914)
@@ -9,7 +9,7 @@
 CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_STANDARD, 
ext/date/lib);

 EXTENSION(standard, array.c base64.c basic_functions.c browscap.c \
-   crc32.c crypt.c \
+   crc32.c crypt.c crypt_sha256.c crypt_sha512.c \
crypt_freesec.c crypt_blowfish.c php_crypt_r.c \
cyr_convert.c datetime.c dir.c dl.c dns.c dns_win32.c exec.c \
file.c filestat.c formatted_print.c fsock.c head.c html.c image.c \

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

[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_vm_def.h zend_vm_execute.h

2009-12-09 Thread Dmitry Stogov
dmitry   Wed, 09 Dec 2009 10:50:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291915

Log:
Fixed wrong result of empty($_GET) in case of uninitialized $_GET

Changed paths:
U   php/php-src/trunk/Zend/zend_vm_def.h
U   php/php-src/trunk/Zend/zend_vm_execute.h

Modified: php/php-src/trunk/Zend/zend_vm_def.h
===
--- php/php-src/trunk/Zend/zend_vm_def.h2009-12-09 10:39:42 UTC (rev 
291914)
+++ php/php-src/trunk/Zend/zend_vm_def.h2009-12-09 10:50:10 UTC (rev 
291915)
@@ -4047,9 +4047,24 @@
isset = 0;
}
} else {
-   target_symbol_table = 
zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
-   if (zend_u_hash_find(target_symbol_table, 
Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1, (void **) 
value) == FAILURE) {
-   isset = 0;
+   if (opline-op2.u.EA.type == ZEND_FETCH_AUTO_GLOBAL) {
+   if (CG(auto_globals_cache)[opline-op2.u.var]) {
+   value = 
CG(auto_globals_cache)[opline-op2.u.var];
+   } else {
+   zend_auto_global *auto_global = NULL;
+
+   
zend_u_is_auto_global_ex(Z_TYPE_P(varname), Z_UNIVAL_P(varname), 
Z_UNILEN_P(varname), 1, auto_global TSRMLS_CC);
+   if (zend_u_hash_find(EG(symbol_table), 
Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1, (void **) 
value) == FAILURE) {
+   isset = 0;
+   } else if (auto_global  
(!auto_global-armed || !auto_global-runtime)) {
+   
CG(auto_globals_cache)[opline-op2.u.var] = value;
+   }
+   }
+   } else {
+   target_symbol_table = 
zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
+   if (zend_u_hash_find(target_symbol_table, 
Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1, (void **) 
value) == FAILURE) {
+   isset = 0;
+   }
}
}


Modified: php/php-src/trunk/Zend/zend_vm_execute.h
===
--- php/php-src/trunk/Zend/zend_vm_execute.h2009-12-09 10:39:42 UTC (rev 
291914)
+++ php/php-src/trunk/Zend/zend_vm_execute.h2009-12-09 10:50:10 UTC (rev 
291915)
@@ -2304,9 +2304,24 @@
isset = 0;
}
} else {
-   target_symbol_table = 
zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
-   if (zend_u_hash_find(target_symbol_table, 
Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1, (void **) 
value) == FAILURE) {
-   isset = 0;
+   if (opline-op2.u.EA.type == ZEND_FETCH_AUTO_GLOBAL) {
+   if (CG(auto_globals_cache)[opline-op2.u.var]) {
+   value = 
CG(auto_globals_cache)[opline-op2.u.var];
+   } else {
+   zend_auto_global *auto_global = NULL;
+
+   
zend_u_is_auto_global_ex(Z_TYPE_P(varname), Z_UNIVAL_P(varname), 
Z_UNILEN_P(varname), 1, auto_global TSRMLS_CC);
+   if (zend_u_hash_find(EG(symbol_table), 
Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1, (void **) 
value) == FAILURE) {
+   isset = 0;
+   } else if (auto_global  
(!auto_global-armed || !auto_global-runtime)) {
+   
CG(auto_globals_cache)[opline-op2.u.var] = value;
+   }
+   }
+   } else {
+   target_symbol_table = 
zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
+   if (zend_u_hash_find(target_symbol_table, 
Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1, (void **) 
value) == FAILURE) {
+   isset = 0;
+   }
}
}

@@ -5729,9 +5744,24 @@
isset = 0;
}
} else {
-   target_symbol_table = 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/bug34810.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_error

2009-12-09 Thread Ulf Wendel
uw   Wed, 09 Dec 2009 12:06:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291916

Log:
Adapting tests to accept actual behaviour found in 5.2, 5.3 and 6.0. The 
behaviour is wrong according to the documentation: mysqli_connect_error() 
should return an empty string (not NULL), if there is no error. However, 
changing this would break BC and most users will not notice the difference 
between NULL and empty string anyway.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug34810.phpt
U   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_error.phpt
U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt
U   php/php-src/trunk/ext/mysqli/tests/bug34810.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_connect_error.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_kill.phpt

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug34810.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug34810.phpt 2009-12-09 
10:50:10 UTC (rev 291915)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug34810.phpt 2009-12-09 
12:06:10 UTC (rev 291916)
@@ -55,7 +55,7 @@
   [%u|b%connect_errno]=
   int(0)
   [%u|b%connect_error]=
-  %unicode|string%(0) 
+  NULL
   [%u|b%errno]=
   int(0)
   [%u|b%error]=
@@ -91,7 +91,7 @@
   [%u|b%connect_errno]=
   int(0)
   [%u|b%connect_error]=
-  %unicode|string%(0) 
+  NULL
   [%u|b%errno]=
   int(0)
   [%u|b%error]=

Modified: 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
2009-12-09 10:50:10 UTC (rev 291915)
+++ 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
2009-12-09 12:06:10 UTC (rev 291916)
@@ -276,6 +276,6 @@
 setting mysqli-unknown, mysqli_unknown = 'friday'

 Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
-mysqli-connect_error = ''/%unicode|string% (''/%unicode|string%)
+mysqli-connect_error = ''/NULL (''/NULL)
 mysqli-connect_errno = '0'/integer ('0'/integer)
 done!
\ No newline at end of file

Modified: 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_error.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_error.phpt 
2009-12-09 10:50:10 UTC (rev 291915)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_error.phpt 
2009-12-09 12:06:10 UTC (rev 291916)
@@ -21,8 +21,8 @@
printf([002] Cannot connect to the server using host=%s, 
user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n,
$host, $user, $db, $port, $socket);

-   if ('' !== ($tmp = mysqli_connect_error()))
-   printf([003] Expecting string/'', got %s/%s\n, gettype($tmp), 
$tmp);
+   if (NULL !== ($tmp = mysqli_connect_error()))
+   printf([003] Expecting NULL, got %s/%s\n, gettype($tmp), 
$tmp);

mysqli_close($link);


Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt  
2009-12-09 10:50:10 UTC (rev 291915)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt  
2009-12-09 12:06:10 UTC (rev 291916)
@@ -91,7 +91,7 @@
   [%u|b%connect_errno]=
   int(0)
   [%u|b%connect_error]=
-  %unicode|string%(0) 
+  NULL
   [%u|b%errno]=
   int(2006)
   [%u|b%error]=

Modified: php/php-src/trunk/ext/mysqli/tests/bug34810.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/bug34810.phpt2009-12-09 10:50:10 UTC 
(rev 291915)
+++ php/php-src/trunk/ext/mysqli/tests/bug34810.phpt2009-12-09 12:06:10 UTC 
(rev 291916)
@@ -55,7 +55,7 @@
   [%u|b%connect_errno]=
   int(0)
   [%u|b%connect_error]=
-  %unicode|string%(0) 
+  NULL
   [%u|b%errno]=
   int(0)
   [%u|b%error]=
@@ -91,7 +91,7 @@
   [%u|b%connect_errno]=
   int(0)
   [%u|b%connect_error]=
-  %unicode|string%(0) 
+  NULL
   [%u|b%errno]=
   int(0)
   [%u|b%error]=

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt   
2009-12-09 10:50:10 UTC (rev 291915)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt   
2009-12-09 12:06:10 UTC (rev 291916)
@@ -276,6 +276,6 @@
 setting mysqli-unknown, mysqli_unknown = 'friday'

 Access hidden 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/ conf/init.d.php-fpm.in conf/nginx-site-conf.sample.in config.m4

2009-12-09 Thread Antony Dovgal
tony2001 Wed, 09 Dec 2009 12:14:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291917

Log:
add missing variables
use php-fpm as binary name
delete nginx config example

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/init.d.php-fpm.in
D   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/nginx-site-conf.sample.in
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/init.d.php-fpm.in
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/init.d.php-fpm.in
2009-12-09 12:06:10 UTC (rev 291916)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/init.d.php-fpm.in
2009-12-09 12:14:06 UTC (rev 291917)
@@ -1,12 +1,12 @@
 #! /bin/sh

 ### BEGIN INIT INFO
-# Provides:  @php_fpm_bin@
+# Provides:  php-fpm
 # Required-Start:$all
 # Required-Stop: $all
 # Default-Start: 2 3 4 5
 # Default-Stop:  0 1 6
-# Short-Description: starts @php_fpm_bin@
+# Short-Description: starts php-fpm
 # Description:   starts the PHP FastCGI Process Manager daemon
 ### END INIT INFO

@@ -49,7 +49,7 @@

 case $1 in
start)
-   echo -n Starting @php_fpm_bin@ 
+   echo -n Starting php-fpm 

$php_fpm_BIN $php_opts

@@ -69,7 +69,7 @@
;;

stop)
-   echo -n Gracefully shutting down @php_fpm_bin@ 
+   echo -n Gracefully shutting down php-fpm 

if [ ! -r $php_fpm_PID ] ; then
echo warning, no pid file found - php-fpm is not 
running ?
@@ -89,7 +89,7 @@
;;

force-quit)
-   echo -n Terminating @php_fpm_bin@ 
+   echo -n Terminating php-fpm 

if [ ! -r $php_fpm_PID ] ; then
echo warning, no pid file found - php-fpm is not 
running ?
@@ -115,10 +115,10 @@

reload)

-   echo -n Reload service @php_fpm_bin@ 
+   echo -n Reload service php-fpm 

if [ ! -r $php_fpm_PID ] ; then
-   echo warning, no pid file found - @php_fpm_bin@ is not 
running ?
+   echo warning, no pid file found - php-fpm is not 
running ?
exit 1
fi


Deleted: 
php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/nginx-site-conf.sample.in
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/nginx-site-conf.sample.in
2009-12-09 12:06:10 UTC (rev 291916)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/nginx-site-conf.sample.in
2009-12-09 12:14:06 UTC (rev 291917)
@@ -1,46 +0,0 @@
-# @php_fpm_bin@ - PHP FastCGI Process Manager 'PHP-FPM'
-#
-# nginx-site-conf.sample:
-# Php Site configuration for nginx webserver
-#
-# 1. set $site_root /path/to/your/website;
-# 2. Rename this file. Copy it to /etc/nginx/sites-available, 
/etc/nginx/sites-enabled
-# 3. Restart nginx webserver, and @php_fpm_bin@ service.
-#
-
-server {
-
-   set $site_root  /var/www/nginx-site;
-   server_name localhost;
-   listen  80;
-
-   access_log  /var/log/nginx/localhost.access.log;
-
-   location / {
-   root   $site_root;
-   index  index.html index.htm;
-   }
-
-   #error_page  404  /404.html;
-
-   # redirect server error pages to the static page /50x.html
-   #
-   error_page   500 502 503 504  /50x.html;
-   location = /50x.html {
-   root   /var/www/nginx-default;
-   }
-
-   # pass the *.php scripts to @php_fpm_bin@ listening on port 9000
-   #
-   location ~ \.php$ {
-
-   root $site_root;
-   fastcgi_pass   127.0.0.1:9000;
-   fastcgi_index  index.php;
-
-   include fastcgi_params;
-fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-fastcgi_param SERVER_NAME $http_host;
-fastcgi_ignore_client_abort on;
-   }
-}

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-09 12:06:10 UTC 
(rev 291916)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-09 12:14:06 UTC 
(rev 291917)
@@ -537,7 +537,14 @@
   if test -z $prefix -o $prefix = NONE; then
 prefix=/usr/local
   fi
+
+  if test -z $exec_prefix -o $exec_prefix = NONE; then
+exec_prefix=/usr/local
+  fi

+  php_fpm_bin_path=`eval echo $bindir`
+  php_fpm_bin_path=$php_fpm_bin_path/php-fpm
+
   if test -z $php_fpm_conf_path; then
 php_fpm_conf_path=`eval echo $sysconfdir`
 php_fpm_conf_path=$php_fpm_conf_path/php-fpm.conf
@@ -580,6 +587,8 @@

   PHP_SUBST_OLD(fpm_version)
   PHP_SUBST_OLD(php_fpm_conf_dir)
+  PHP_SUBST_OLD(php_fpm_conf_path)
+  

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/zlib/tests/ gzencode_variation1-win32.phpt

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 13:25:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291918

Log:
- Add one test from HEAD

Changed paths:
A   
php/php-src/branches/PHP_5_3/ext/zlib/tests/gzencode_variation1-win32.phpt

Added: 
php/php-src/branches/PHP_5_3/ext/zlib/tests/gzencode_variation1-win32.phpt
===
--- php/php-src/branches/PHP_5_3/ext/zlib/tests/gzencode_variation1-win32.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/zlib/tests/gzencode_variation1-win32.phpt  
2009-12-09 13:25:10 UTC (rev 291918)
@@ -0,0 +1,37 @@
+--TEST--
+Test gzencode() function : variation
+--SKIPIF--
+?php
+
+if( substr(PHP_OS, 0, 3) != WIN ) {
+  die(skip only for Windows);
+}
+
+if (!extension_loaded(zlib)) {
+   print skip - ZLIB extension not loaded;
+}
+?
+--FILE--
+?php
+/* Prototype  : string gzencode  ( string $data  [, int $level  [, int 
$encoding_mode  ]] )
+ * Description: Gzip-compress a string
+ * Source code: ext/zlib/zlib.c
+ * Alias to functions:
+ */
+
+include(dirname(__FILE__) . '/data.inc');
+
+echo *** Testing gzencode() : variation ***\n;
+
+echo \n-- Testing multiple compression --\n;
+$output = gzencode($data);
+var_dump(bin2hex(gzencode($output)));
+
+?
+===Done===
+--EXPECT--
+*** Testing gzencode() : variation ***
+
+-- Testing multiple compression --
+string(3658) 
1f8b080b010e07f1f81f8b080b6d574d6fe4c80dbdeb57d4ad2f3dfe01eb83e1ec22980e309b4562c067b64449159754dafab0b6e7d7e73d96da1e4c72184c4b2ab2c8f7c847fa25baabba98dc1a8b2b7c38bb324b713ee37f757f56cdc5c7f5b17b9d152f923b157c5ae335e0b75fedd0e2d781c6b98ea3a6ee05affe1dfc3a6527f8f09c52dcb38ba38bb5249934d6ecfe1e53a9ab76ff4c342cf2a64ed2028349fc9a8b139755685352acb82b9fbb67f8bade5cdcb698e1fcec94b7ceba3cb897e806cfc8114350dd1ebbdfa35b62d2478b0056d23ed809b9b95d696d91ce2aa97c911e3fa539c43f84c887554a4d125c9e63ff96711cc08c0866263cb37a0bbe2122ae8f6baecb2284abfb4ddf916db8354cddeef37c1afe5fa02fc7afb3db34f5b3acbdf2eb905490d8f38d7468d253a323d5ebb903760d7944d3b2024e834a99ddce77669bdd823cfbb8e899d4ad4c799677452e6029e80023a03b2374005590641f7d3877df2ad09f3c0e82a54d6a5644fd63049a37ed4bc362016fd9f51264f1e5c630727421ae930b7ed416e93e47b7c71a400390361ffbecb7561bb98f69b5da289e91becc27f08b3b724cb8704f9144d366431d0cb870c56b205deaa2e17636063761a911039fb7e4bf9f06c4f0aecd2ec80e8b4183!
 
1ca7515e31286166458ea3ef71f2ce7cde2ae269c96d60525724a9c9170b713ed5750758f3cd2a361fc8b288fc92358ce884692e8ea0fe59bd969a0da2eed5831b715749eaae7178f3ebd30fb88c92105f367cce2c882955dc6bf8eca0d5d57540b3092894743ba0fd5b2dad021836191f1afc0bba14dde1642cb0b1aa6879c38907dcefa0720082b801bec61417469219175267dfa047df35b0bd1332001c28cdfafd3bcabe91e74368cdd8d8478e494c190e7ee90c67f2bde288e68ab6b15e883c995be4f8feb6c6dda4278e4f38578ddbdc7be36788daf0c3cb1d1819c73822f7000a0d1813fa94153b572315e51343b536bc64977dff163cebfd8418773261f524017e251fccc60ae29a5770ae097594d52e9c1229d87ce967a36401c46b69945afb249d101c9d420ffa9a123e232c20e76467d5d169202a2dd4c582949e013e745df7958d4b0cc4fd4377a737cd4feea797407f314d423e0634cb9a618fdf5dc64fd422181fd59c9230c9f6f9d18dc8fc23e9cccbc7188733b04aa57de83ebea0be3633cff5fa1ff83269be7f44f5a8d84550cc703255fd345dd402034d0b3e11a73ec6e3d4a77f4f685b614329f1b3132ae7af33d02e1e55e291fa6574b758d1f0200e7423dbc852211818043a7c9ce80aa9d59fce0401959f5ea2cf71fde90824f8c9192dbe9d329d!
 b143794675ddcf257dd7755273b67340414e3ccad12e3f661f8aad9cf9957dc1275d10
a51d3934fa81e68dc6768fb8ee23e373936c8e13feab8b0f50d227f7af76f561fb0950f3d099bbc316c3892a42fb36806d8660e800fa4f43fd4b962d2097d71933a54b77ff948677848eb17bb3a88b621682cfb3bbb49cf42fed6b3944124ad8358ca688aa44dd5f2144c7c9ab16f25b9aca9654ef357ec9ad55c40d324d6cc3d9e3920b863c231d31a95d937fb5520f9c816c79b7dcecc593fb9593cc05a51ebb1eeddd5b49eb437769738d0f64adc579d372b8b7f7c0208487ee3915ebf5766e148ebd77cf4e01f3ec285047011e55838968b6494d517fe29224777b24dd3ddf933101695b102e87db805eef291b74dcfd91628fb2a53f93dbd2968ef2e598746c9204f89fba1f0246fc671610a0591806e46a1346f77c40d910a47c5e20ffb23f003c04b648327a4ed98032c1965bd35bb0044f5344248f56fdb99aa61d6451d68e33489a83bffbe6573541b2da5f64681ea12090f778b2075374778810f73965fa3626a9d41f4df2f83f7c34658cec921b5a9bde49dd5007ec882b02adc514f81aa85898b5cc98e1b137733c0a8789b7f5648d2d231b80bf74978f25d61ce08a8abd11801fd8f995e066676307192ff7641f1cc6e0dee68565b8b22ac3889cd067bf732754a6b270af1044c6a8776811a4f6d8bd0477a9f516064201b920b92d7cd4dc7eee13e6b3eb3528a82!
 

[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/ zlib.c

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 14:06:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291920

Log:
- Rename badly named function

Changed paths:
U   php/php-src/trunk/ext/zlib/zlib.c

Modified: php/php-src/trunk/ext/zlib/zlib.c
===
--- php/php-src/trunk/ext/zlib/zlib.c   2009-12-09 13:54:37 UTC (rev 291919)
+++ php/php-src/trunk/ext/zlib/zlib.c   2009-12-09 14:06:18 UTC (rev 291920)
@@ -312,8 +312,8 @@
 }
 /* }}} */

-/* {{{ inflate_rounds() */
-static inline int inflate_rounds(z_stream *Z, size_t max, char **buf, size_t 
*len)
+/* {{{ php_zlib_inflate_rounds() */
+static inline int php_zlib_inflate_rounds(z_stream *Z, size_t max, char **buf, 
size_t *len)
 {
int status, round = 0;
php_zlib_buffer buffer = {NULL, NULL, 0, 0, 0};
@@ -374,7 +374,7 @@
Z.next_in = (Bytef *) in_buf;
Z.avail_in = in_len;

-   switch (status = inflate_rounds(Z, max_len, out_buf, 
out_len)) {
+   switch (status = php_zlib_inflate_rounds(Z, max_len, 
out_buf, out_len)) {
case Z_OK:
case Z_STREAM_END:
inflateEnd(Z);

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/crypt_sha256.c branches/PHP_5_3/ext/standard/crypt_sha512.c trunk/ext/standard/crypt_sha256.c trunk/ext/standard/crypt_sha512.c

2009-12-09 Thread Pierre Joye
pajoye   Wed, 09 Dec 2009 17:40:19 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291924

Log:
- #50334, fix build for platform without endian.h (like solaris)

Bug: http://bugs.php.net/50334 (Closed) crypt ignores sha512 prefix
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
U   php/php-src/trunk/ext/standard/crypt_sha256.c
U   php/php-src/trunk/ext/standard/crypt_sha512.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c2009-12-09 
16:57:03 UTC (rev 291923)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c2009-12-09 
17:40:19 UTC (rev 291924)
@@ -3,7 +3,6 @@
 /* Windows VC++ port by Pierre Joye pie...@php.net */

 #ifndef PHP_WIN32
-# include endian.h
 # include php.h
 # include php_main.h
 #endif
@@ -75,7 +74,7 @@
char buffer[128]; /* NB: always correctly aligned for uint32_t.  */
 };

-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
 # define SWAP(n) \
 (((n)  24) | (((n)  0xff00)  8) | (((n)  8)  0xff00) | ((n)  24))
 #else

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c2009-12-09 
16:57:03 UTC (rev 291923)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c2009-12-09 
17:40:19 UTC (rev 291924)
@@ -3,7 +3,6 @@
 /* Windows VC++ port by Pierre Joye pie...@php.net */

 #ifndef PHP_WIN32
-# include endian.h
 # include php.h
 # include php_main.h
 #endif
@@ -66,7 +65,7 @@
 };


-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
 # define SWAP(n) \
   (((n)  56) \
| (((n)  0xff00)  40)\

Modified: php/php-src/trunk/ext/standard/crypt_sha256.c
===
--- php/php-src/trunk/ext/standard/crypt_sha256.c   2009-12-09 16:57:03 UTC 
(rev 291923)
+++ php/php-src/trunk/ext/standard/crypt_sha256.c   2009-12-09 17:40:19 UTC 
(rev 291924)
@@ -3,7 +3,6 @@
 /* Windows VC++ port by Pierre Joye pie...@php.net */

 #ifndef PHP_WIN32
-# include endian.h
 # include php.h
 # include php_main.h
 #endif
@@ -75,7 +74,7 @@
char buffer[128]; /* NB: always correctly aligned for uint32_t.  */
 };

-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
 # define SWAP(n) \
 (((n)  24) | (((n)  0xff00)  8) | (((n)  8)  0xff00) | ((n)  24))
 #else

Modified: php/php-src/trunk/ext/standard/crypt_sha512.c
===
--- php/php-src/trunk/ext/standard/crypt_sha512.c   2009-12-09 16:57:03 UTC 
(rev 291923)
+++ php/php-src/trunk/ext/standard/crypt_sha512.c   2009-12-09 17:40:19 UTC 
(rev 291924)
@@ -3,7 +3,6 @@
 /* Windows VC++ port by Pierre Joye pie...@php.net */

 #ifndef PHP_WIN32
-# include endian.h
 # include php.h
 # include php_main.h
 #endif
@@ -66,7 +65,7 @@
 };


-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
 # define SWAP(n) \
   (((n)  56) \
| (((n)  0xff00)  40)\

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

[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/ tests/006.phpt tests/gzinflate-bug42663.phpt zlib.c

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 17:47:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291925

Log:
- Fixed BC problem in new zlib implementation: truncated (invalid) short data 
was not caught

Changed paths:
U   php/php-src/trunk/ext/zlib/tests/006.phpt
U   php/php-src/trunk/ext/zlib/tests/gzinflate-bug42663.phpt
U   php/php-src/trunk/ext/zlib/zlib.c

Modified: php/php-src/trunk/ext/zlib/tests/006.phpt
===
--- php/php-src/trunk/ext/zlib/tests/006.phpt   2009-12-09 17:40:19 UTC (rev 
291924)
+++ php/php-src/trunk/ext/zlib/tests/006.phpt   2009-12-09 17:47:38 UTC (rev 
291925)
@@ -31,7 +31,6 @@
 var_dump(gzinflate($data2));
 $data2[4] = 0;
 var_dump(gzinflate((binary)$data2));
-
 echo Done\n;
 ?
 --EXPECTF--
@@ -57,8 +56,12 @@

 Warning: gzinflate(): length (-1) must be greater or equal zero in %s on line 
%d
 bool(false)
-string(0) 
-string(0) 
+
+Warning: gzinflate(): data error in %s on line %d
+bool(false)
+
+Warning: gzinflate(): data error in %s on line %d
+bool(false)
 string(94) Answer me, it can't be so hard
 Cry to relieve what's in your heart
 Desolation, grief and agony

Modified: php/php-src/trunk/ext/zlib/tests/gzinflate-bug42663.phpt
===
--- php/php-src/trunk/ext/zlib/tests/gzinflate-bug42663.phpt2009-12-09 
17:40:19 UTC (rev 291924)
+++ php/php-src/trunk/ext/zlib/tests/gzinflate-bug42663.phpt2009-12-09 
17:47:38 UTC (rev 291925)
@@ -15,9 +15,12 @@
 $truncated = substr($deflated, 0, 65535);
 var_dump(strlen($truncated));
 // inflate $truncated string (check if it will not eat all memory)
-gzinflate($truncated);
+var_dump(gzinflate($truncated));
 ?
---EXPECT--
+--EXPECTF--
 int(168890)
 int(66743)
 int(65535)
+
+Warning: gzinflate(): data error in %s on line %d
+bool(false)

Modified: php/php-src/trunk/ext/zlib/zlib.c
===
--- php/php-src/trunk/ext/zlib/zlib.c   2009-12-09 17:40:19 UTC (rev 291924)
+++ php/php-src/trunk/ext/zlib/zlib.c   2009-12-09 17:47:38 UTC (rev 291925)
@@ -344,15 +344,19 @@
}
} while ((Z_BUF_ERROR == status || (Z_OK == status  Z-avail_in))  
++round  100);

-   if (status == Z_OK || status == Z_STREAM_END) {
+   if (status == Z_STREAM_END) {
buffer.data = erealloc(buffer.data, buffer.used + 1);
buffer.data[buffer.used] = '\0';
*buf = buffer.data;
*len = buffer.used;
-   } else if (buffer.data) {
-   efree(buffer.data);
+   } else {
+   if (buffer.data) {
+   efree(buffer.data);
+   }
+   /* HACK: See zlib/examples/zpipe.c inf() function for 
explanation. */
+   /* This works as long as this function is not used for 
streaming. Required to catch very short invalid data. */
+   status = (status == Z_OK) ? Z_DATA_ERROR : status;
}
-
return status;
 }
 /* }}} */
@@ -375,7 +379,6 @@
Z.avail_in = in_len;

switch (status = php_zlib_inflate_rounds(Z, max_len, 
out_buf, out_len)) {
-   case Z_OK:
case Z_STREAM_END:
inflateEnd(Z);
return SUCCESS;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_portability.h trunk/ext/mysqlnd/mysqlnd_portability.h

2009-12-09 Thread Andrey Hristov
andrey   Wed, 09 Dec 2009 18:11:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291926

Log:
Fix compilation warnings

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_portability.h
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_portability.h

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_portability.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_portability.h	2009-12-09 17:47:38 UTC (rev 291925)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_portability.h	2009-12-09 18:11:03 UTC (rev 291926)
@@ -235,49 +235,46 @@
 #define uint1korr(A)	(*(((uint8_t*)(A

 /* Bit values are sent in reverted order of bytes, compared to normal !!! */
-#define bit_uint2korr(A) ((uint16_t) (((uint16_t) (((zend_uchar*) (A))[1])) +\
-	((uint16_t) (((zend_uchar*) (A))[0])  8)))
-#define bit_uint3korr(A) ((uint32_t) (((uint32_t) (((zend_uchar*) (A))[2])) +\
-	(((uint32_t) (((zend_uchar*) (A))[1]))  8) +\
-	(((uint32_t) (((zend_uchar*) (A))[0]))  16)))
+#define bit_uint2korr(A) ((uint16_t) (((uint16_t) (((unsigned char*) (A))[1])) +\
+   ((uint16_t) (((unsigned char*) (A))[0])  8)))
+#define bit_uint3korr(A) ((uint32_t) (((uint32_t) (((unsigned char*) (A))[2])) +\
+   (((uint32_t) (((unsigned char*) (A))[1]))  8) +\
+   (((uint32_t) (((unsigned char*) (A))[0]))  16)))
+#define bit_uint4korr(A) ((uint32_t) (((uint32_t) (((unsigned char*) (A))[3])) +\
+   (((uint32_t) (((unsigned char*) (A))[2]))  8) +\
+   (((uint32_t) (((unsigned char*) (A))[1]))  16) +\
+   (((uint32_t) (((unsigned char*) (A))[0]))  24)))
+#define bit_uint5korr(A) ((uint64_t)(((uint32_t) (((unsigned char*) (A))[4])) +\
+(((uint32_t) (((unsigned char*) (A))[3]))  8) +\
+(((uint32_t) (((unsigned char*) (A))[2]))  16) +\
+   (((uint32_t) (((unsigned char*) (A))[1]))  24)) +\
+(((uint64_t) (((unsigned char*) (A))[0]))  32))
+#define bit_uint6korr(A) ((uint64_t)(((uint32_t) (((unsigned char*) (A))[5])) +\
+(((uint32_t) (((unsigned char*) (A))[4]))  8) +\
+(((uint32_t) (((unsigned char*) (A))[3]))  16) +\
+(((uint32_t) (((unsigned char*) (A))[2]))  24)) +\
+(((uint64_t) (((uint32_t) (((unsigned char*) (A))[1])) +\
+(((uint32_t) (((unsigned char*) (A))[0])  8 \
+ 32))
+#define bit_uint7korr(A) ((uint64_t)(((uint32_t) (((unsigned char*) (A))[6])) +\
+(((uint32_t) (((unsigned char*) (A))[5]))  8) +\
+(((uint32_t) (((unsigned char*) (A))[4]))  16) +\
+   (((uint32_t) (((unsigned char*) (A))[3]))  24)) +\
+(((uint64_t) (((uint32_t) (((unsigned char*) (A))[2])) +\
+(((uint32_t) (((unsigned char*) (A))[1]))  8) +\
+(((uint32_t) (((unsigned char*) (A))[0]))  16))) \
+ 32))
+#define bit_uint8korr(A) ((uint64_t)(((uint32_t) (((unsigned char*) (A))[7])) +\
+(((uint32_t) (((unsigned char*) (A))[6]))  8) +\
+(((uint32_t) (((unsigned char*) (A))[5]))  16) +\
+(((uint32_t) (((unsigned char*) (A))[4]))  24)) +\
+(((uint64_t) (((uint32_t) (((unsigned char*) (A))[3])) +\
+(((uint32_t) (((unsigned char*) (A))[2]))  8) +\
+(((uint32_t) (((unsigned char*) (A))[1]))  16) +\
+(((uint32_t) (((unsigned char*) (A))[0]))  24))) \
+32))

-#define bit_uint4korr(A) ((uint32_t) (((uint32_t) (((zend_uchar*) (A))[3])) +\
-	(((uint32_t) (((zend_uchar*) (A))[2]))  8) +\
-	(((uint32_t) (((zend_uchar*) (A))[1]))  16) +\
-	(((uint32_t) (((zend_uchar*) (A))[0]))  24)))

-#define bit_uint5korr(A)  ((uint64_t)(((uint32_t) ((zend_uchar) (A)[4])) +\
-  (((uint32_t) ((zend_uchar*) (A)[3]))  8) +\
-  (((uint32_t) ((zend_uchar*) (A)[2]))  16) +\
-  (((uint32_t) ((zend_uchar*) (A)[1]))  24)) +\
-   (((uint64_t) ((zend_uchar*) (A)[0]))  32))
-
-#define bit_uint6korr(A)	((uint64_t)(((uint32_t) (((zend_uchar*) (A))[5])) +\
-	(((uint32_t) 

[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ file.c

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 19:33:14 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291927

Log:
- Fix file()

Changed paths:
U   php/php-src/trunk/ext/standard/file.c

Modified: php/php-src/trunk/ext/standard/file.c
===
--- php/php-src/trunk/ext/standard/file.c   2009-12-09 18:11:03 UTC (rev 
291926)
+++ php/php-src/trunk/ext/standard/file.c   2009-12-09 19:33:14 UTC (rev 
291927)
@@ -796,7 +796,6 @@
zend_bool use_include_path;
zend_bool include_new_line;
zend_bool skip_blank_lines;
-   zend_bool text_mode;
php_stream *stream;
zval *zcontext = NULL;
php_stream_context *context = NULL;
@@ -813,14 +812,13 @@
use_include_path = flags  PHP_FILE_USE_INCLUDE_PATH;
include_new_line = !(flags  PHP_FILE_IGNORE_NEW_LINES);
skip_blank_lines = flags  PHP_FILE_SKIP_EMPTY_LINES;
-   text_mode = !(flags  PHP_FILE_BINARY);

context = php_stream_context_from_zval(zcontext, flags  
PHP_FILE_NO_DEFAULT_CONTEXT);
if (php_stream_path_param_encode(ppfilename, filename, filename_len, 
REPORT_ERRORS, context) == FAILURE) {
RETURN_FALSE;
}

-   stream = php_stream_open_wrapper_ex(filename, text_mode ? rt : rb, 
(use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
+   stream = php_stream_open_wrapper_ex(filename, (flags  PHP_FILE_TEXT) ? 
rt : rb, (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
if (!stream) {
RETURN_FALSE;
}

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/php_mysql.c branches/PHP_5_3/ext/mysql/php_mysql_structs.h branches/PHP_5_3/ext/mysqli/mysqli.c branches/PHP_5_3/ext/mysqli/mysqli_nonapi.

2009-12-09 Thread Pierre Joye
On Wed, Dec 9, 2009 at 9:21 PM, Andrey Hristov and...@php.net wrote:
 andrey                                   Wed, 09 Dec 2009 20:21:05 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=291928

 Log:
 Remove the zval caching from mysqlnd. It was disabled versions ago
 due to problems on windows, which were not debugged. Better have
 code that is disabled not in the core.

For the record, it was only easier to catch on Windows but the problem
was also on other platforms (Johannes reproduced it as well).

Thanks for your work :)

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/tests/ zlib_filter_deflate2.phpt zlib_filter_inflate2.phpt

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 20:32:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291930

Log:
- fix tests (this is ridiculous..)

Changed paths:
U   php/php-src/trunk/ext/zlib/tests/zlib_filter_deflate2.phpt
U   php/php-src/trunk/ext/zlib/tests/zlib_filter_inflate2.phpt

Modified: php/php-src/trunk/ext/zlib/tests/zlib_filter_deflate2.phpt
===
--- php/php-src/trunk/ext/zlib/tests/zlib_filter_deflate2.phpt  2009-12-09 
20:21:42 UTC (rev 291929)
+++ php/php-src/trunk/ext/zlib/tests/zlib_filter_deflate2.phpt  2009-12-09 
20:32:13 UTC (rev 291930)
@@ -7,7 +7,7 @@
 $text = 'I am the very model of a modern major general, I\'ve information 
vegetable, animal, and mineral.';

 $fp = fopen('php://stdout', 'w');
-stream_filter_append($fp, 'zlib.deflate', STREAM_FILTER_WRITE, array('level' 
= 9));
+stream_filter_append($fp, 'zlib.deflate', STREAM_FILTER_WRITE, array(b'level' 
= 9));
 fwrite($fp, $text);
 fclose($fp);


Modified: php/php-src/trunk/ext/zlib/tests/zlib_filter_inflate2.phpt
===
--- php/php-src/trunk/ext/zlib/tests/zlib_filter_inflate2.phpt  2009-12-09 
20:21:42 UTC (rev 291929)
+++ php/php-src/trunk/ext/zlib/tests/zlib_filter_inflate2.phpt  2009-12-09 
20:32:13 UTC (rev 291930)
@@ -17,13 +17,13 @@
 $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
 // zlib format
 $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
-stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' 
= 15+16));
+stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array(b'window' 
= 15+16));
 echo 2\n;
 echo fread($fp, 2000);
 fclose($fp);
 // auto-detect
 $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
-stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' 
= 15+32));
+stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array(b'window' 
= 15+32));
 echo 3\n;
 echo fread($fp, 2000);
 fclose($fp);

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

[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/ tests/gzuncompress_error1.phpt zlib.c

2009-12-09 Thread Jani Taskinen
jani Wed, 09 Dec 2009 20:33:31 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291931

Log:
- Fixed bug #47179 (gzuncompress does not report expcted error)

Bug: http://bugs.php.net/47179 (Open) gzuncompress does not report expcted error
  
Changed paths:
U   php/php-src/trunk/ext/zlib/tests/gzuncompress_error1.phpt
U   php/php-src/trunk/ext/zlib/zlib.c

Modified: php/php-src/trunk/ext/zlib/tests/gzuncompress_error1.phpt
===
--- php/php-src/trunk/ext/zlib/tests/gzuncompress_error1.phpt   2009-12-09 
20:32:13 UTC (rev 291930)
+++ php/php-src/trunk/ext/zlib/tests/gzuncompress_error1.phpt   2009-12-09 
20:33:31 UTC (rev 291931)
@@ -1,7 +1,5 @@
 --TEST--
 Test gzuncompress() function : error conditions
---XFAIL--
-Test will fail until bug #47179 resolved; no error when $length too small
 --SKIPIF--
 ?php
 if (!extension_loaded(zlib)) {
@@ -16,8 +14,6 @@
  * Alias to functions:
  */

-
-
 echo *** Testing gzuncompress() : error conditions ***\n;

 // Zero arguments
@@ -34,14 +30,12 @@
 echo \n-- Testing with Unicode string --\n;
 var_dump(gzuncompress($data, $length));

-
 echo \n-- Testing with a buffer that is too small --\n;
 $short_len = strlen($data) - 1;
 $compressed = gzcompress(b$data);

 var_dump(gzuncompress($compressed, $short_len));

-
 echo \n-- Testing with incorrect arguments --\n;
 var_dump(gzuncompress(123));

@@ -77,7 +71,8 @@
 NULL

 -- Testing with a buffer that is too small --
-Warning: gzuncompress(): buffer error in %s on line %d
+
+Warning: gzuncompress(): insufficient memory in %s on line %d
 bool(false)

 -- Testing with incorrect arguments --
@@ -90,4 +85,4 @@

 Warning: gzuncompress() expects parameter 2 to be long, Unicode string given 
in %s on line %d
 NULL
-===DONE===
\ No newline at end of file
+===DONE===

Modified: php/php-src/trunk/ext/zlib/zlib.c
===
--- php/php-src/trunk/ext/zlib/zlib.c   2009-12-09 20:32:13 UTC (rev 291930)
+++ php/php-src/trunk/ext/zlib/zlib.c   2009-12-09 20:33:31 UTC (rev 291931)
@@ -321,10 +321,10 @@
*buf = NULL;
*len = 0;

-   buffer.size = Z-avail_in;
+   buffer.size = (max  (max  Z-avail_in)) ? max : Z-avail_in;

do {
-   if ((max  (max  buffer.used)) || !(buffer.aptr = 
erealloc_recoverable(buffer.data, buffer.size))) {
+   if ((max  (max = buffer.used)) || !(buffer.aptr = 
erealloc_recoverable(buffer.data, buffer.size))) {
status = Z_MEM_ERROR;
} else {
buffer.data = buffer.aptr;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/php_mysql.c branches/PHP_5_3/ext/mysql/php_mysql_structs.h branches/PHP_5_3/ext/mysqli/mysqli.c branches/PHP_5_3/ext/mysqli/php_mysqli_structs.h

2009-12-09 Thread Andrey Hristov
andrey   Wed, 09 Dec 2009 20:38:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291932

Log:
Remove stub code which never actually was used for anything.
Things like this can be built on top of the core.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
U   php/php-src/branches/PHP_5_3/ext/mysql/php_mysql_structs.h
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/php_mysqli_structs.h
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
D   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_qcache.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h
U   php/php-src/trunk/ext/mysql/php_mysql.c
U   php/php-src/trunk/ext/mysql/php_mysql_structs.h
U   php/php-src/trunk/ext/mysqli/mysqli.c
U   php/php-src/trunk/ext/mysqli/php_mysqli_structs.h
U   php/php-src/trunk/ext/mysqlnd/config.w32
U   php/php-src/trunk/ext/mysqlnd/config9.m4
U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd.h
D   php/php-src/trunk/ext/mysqlnd/mysqlnd_qcache.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h

Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
===
--- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c	2009-12-09 20:33:31 UTC (rev 291931)
+++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c	2009-12-09 20:38:11 UTC (rev 291932)
@@ -125,9 +125,6 @@
 	int multi_query;
 } php_mysql_conn;

-#ifdef MYSQL_USE_MYSQLND
-static MYSQLND_QCACHE		*mysql_mysqlnd_qcache;
-#endif

 #if MYSQL_VERSION_ID = 40101
 #define MYSQL_DISABLE_MQ if (mysql-multi_query) { \
@@ -457,8 +454,6 @@
 		return FAILURE;
 	}
 #endif
-#else
-	mysql_mysqlnd_qcache = mysqlnd_qcache_init_cache();
 #endif

 	return SUCCESS;
@@ -484,8 +479,6 @@
 	mysql_server_end();
 #endif
 #endif
-#else
-	mysqlnd_qcache_free_cache_reference(mysql_mysqlnd_qcache);
 #endif

 	UNREGISTER_INI_ENTRIES();

Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql_structs.h
===
--- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql_structs.h	2009-12-09 20:33:31 UTC (rev 291931)
+++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql_structs.h	2009-12-09 20:38:11 UTC (rev 291932)
@@ -124,9 +124,6 @@
 	long result_allocated;
 	long trace_mode;
 	long allow_local_infile;
-#ifdef MYSQL_USE_MYSQLND
-	MYSQLND_QCACHE			*mysqlnd_qcache;
-#endif
 ZEND_END_MODULE_GLOBALS(mysql)

 #ifdef ZTS

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c	2009-12-09 20:33:31 UTC (rev 291931)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c	2009-12-09 20:38:11 UTC (rev 291932)
@@ -73,11 +73,7 @@
 zend_class_entry *mysqli_warning_class_entry;
 zend_class_entry *mysqli_exception_class_entry;

-#ifdef MYSQLI_USE_MYSQLND
-MYSQLND_QCACHE		*mysqli_mysqlnd_qcache;
-#endif

-
 typedef int (*mysqli_read_t)(mysqli_object *obj, zval **retval TSRMLS_DC);
 typedef int (*mysqli_write_t)(mysqli_object *obj, zval *newval TSRMLS_DC);

@@ -633,8 +629,6 @@
 		return FAILURE;
 	}
 #endif
-#else
-	mysqli_mysqlnd_qcache = mysqlnd_qcache_init_cache();
 #endif

 	memcpy(mysqli_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
@@ -872,8 +866,6 @@
 	mysql_server_end();
 #endif
 #endif
-#else
-	mysqlnd_qcache_free_cache_reference(mysqli_mysqlnd_qcache);
 #endif

 	zend_hash_destroy(mysqli_driver_properties);

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/php_mysqli_structs.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/php_mysqli_structs.h	2009-12-09 20:33:31 UTC (rev 291931)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/php_mysqli_structs.h	2009-12-09 20:38:11 UTC (rev 291932)
@@ -196,10 +196,6 @@
 extern zend_property_info mysqli_driver_property_info_entries[];
 extern zend_property_info mysqli_warning_property_info_entries[];

-#ifdef MYSQLI_USE_MYSQLND
-extern MYSQLND_QCACHE		*mysqli_mysqlnd_qcache;
-#endif
-
 extern void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flag, int into_object);
 extern void php_clear_stmt_bind(MY_STMT *stmt TSRMLS_DC);
 extern void php_clear_mysql(MY_MYSQL *);

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32	2009-12-09 20:33:31 UTC (rev 291931)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/gmp/config.w32 branches/PHP_5_3/ext/gmp/gmp.c trunk/ext/gmp/config.w32 trunk/ext/gmp/gmp.c

2009-12-09 Thread Pierre Joye
pajoye   Thu, 10 Dec 2009 02:25:47 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291937

Log:
- [DOC] expose MPIR version when mpir is used instead of gmp

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/gmp/config.w32
U   php/php-src/branches/PHP_5_3/ext/gmp/gmp.c
U   php/php-src/trunk/ext/gmp/config.w32
U   php/php-src/trunk/ext/gmp/gmp.c

Modified: php/php-src/branches/PHP_5_3/ext/gmp/config.w32
===
--- php/php-src/branches/PHP_5_3/ext/gmp/config.w32 2009-12-09 22:46:12 UTC 
(rev 291936)
+++ php/php-src/branches/PHP_5_3/ext/gmp/config.w32 2009-12-10 02:25:47 UTC 
(rev 291937)
@@ -8,6 +8,7 @@
CHECK_HEADER_ADD_INCLUDE(gmp.h, CFLAGS_GMP, PHP_GMP +  ; 
+ PHP_PHP_BUILD + \\include\\mpir)) {
EXTENSION(gmp, gmp.c);
AC_DEFINE('HAVE_GMP', 1, 'GMP support');
+   AC_DEFINE('HAVE_MPIR', 1, 'MPIR support');
} else {
WARNING(GMP not enabled; libraries and headers not found);
}

Modified: php/php-src/branches/PHP_5_3/ext/gmp/gmp.c
===
--- php/php-src/branches/PHP_5_3/ext/gmp/gmp.c  2009-12-09 22:46:12 UTC (rev 
291936)
+++ php/php-src/branches/PHP_5_3/ext/gmp/gmp.c  2009-12-10 02:25:47 UTC (rev 
291937)
@@ -356,6 +356,9 @@
REGISTER_LONG_CONSTANT(GMP_ROUND_ZERO, GMP_ROUND_ZERO, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(GMP_ROUND_PLUSINF, GMP_ROUND_PLUSINF, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(GMP_ROUND_MINUSINF, GMP_ROUND_MINUSINF, 
CONST_CS | CONST_PERSISTENT);
+#ifdef mpir_version
+   REGISTER_STRING_CONSTANT(GMP_MPIR_VERSION, (char *)mpir_version, 
CONST_CS | CONST_PERSISTENT);
+#endif
REGISTER_STRING_CONSTANT(GMP_VERSION, (char *)gmp_version, CONST_CS | 
CONST_PERSISTENT);

mp_set_memory_functions(gmp_emalloc, gmp_erealloc, gmp_efree);
@@ -383,7 +386,11 @@
 {
php_info_print_table_start();
php_info_print_table_row(2, gmp support, enabled);
+#ifdef mpir_version
+   php_info_print_table_row(2, MPIR version, mpir_version);
+#else
php_info_print_table_row(2, GMP version, gmp_version);
+#endif
php_info_print_table_end();
 }
 /* }}} */
@@ -746,7 +753,7 @@
return;
}

-#if __GNU_MP_VERSION = 4  __GNU_MP_VERSION_MINOR = 2
+#if (__GNU_MP_VERSION = 4  __GNU_MP_VERSION_MINOR = 2)
if (base  (base  2 || base  62)) {
 #else
if (base  (base  2 || base  36)) {

Modified: php/php-src/trunk/ext/gmp/config.w32
===
--- php/php-src/trunk/ext/gmp/config.w322009-12-09 22:46:12 UTC (rev 
291936)
+++ php/php-src/trunk/ext/gmp/config.w322009-12-10 02:25:47 UTC (rev 
291937)
@@ -8,6 +8,7 @@
CHECK_HEADER_ADD_INCLUDE(gmp.h, CFLAGS_GMP, PHP_GMP +  ; 
+ PHP_PHP_BUILD + \\include\\mpir)) {
EXTENSION(gmp, gmp.c);
AC_DEFINE('HAVE_GMP', 1, 'GMP support');
+   AC_DEFINE('HAVE_MPIR', 1, 'MPIR support');
} else {
WARNING(GMP not enabled; libraries and headers not found);
}

Modified: php/php-src/trunk/ext/gmp/gmp.c
===
--- php/php-src/trunk/ext/gmp/gmp.c 2009-12-09 22:46:12 UTC (rev 291936)
+++ php/php-src/trunk/ext/gmp/gmp.c 2009-12-10 02:25:47 UTC (rev 291937)
@@ -356,6 +356,9 @@
REGISTER_LONG_CONSTANT(GMP_ROUND_ZERO, GMP_ROUND_ZERO, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(GMP_ROUND_PLUSINF, GMP_ROUND_PLUSINF, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(GMP_ROUND_MINUSINF, GMP_ROUND_MINUSINF, 
CONST_CS | CONST_PERSISTENT);
+#ifdef mpir_version
+   REGISTER_STRING_CONSTANT(GMP_MPIR_VERSION, (char *)mpir_version, 
CONST_CS | CONST_PERSISTENT);
+#endif
REGISTER_STRING_CONSTANT(GMP_VERSION, (char *)gmp_version, CONST_CS | 
CONST_PERSISTENT);

mp_set_memory_functions(gmp_emalloc, gmp_erealloc, gmp_efree);
@@ -383,7 +386,11 @@
 {
php_info_print_table_start();
php_info_print_table_row(2, gmp support, enabled);
+#ifdef mpir_version
+   php_info_print_table_row(2, MPIR version, mpir_version);
+#else
php_info_print_table_row(2, GMP version, gmp_version);
+#endif
php_info_print_table_end();
 }
 /* }}} */

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/http_fopen_wrapper.c trunk/ext/standard/http_fopen_wrapper.c

2009-12-09 Thread Ilia Alshanetsky
iliaaThu, 10 Dec 2009 03:23:05 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291938

Log:
Fixed bug #49851 (http wrapper breaks on 1024 char long headers).

Bug: http://bugs.php.net/49851 (Open) http wrapper breaks on 1024 char long 
headers
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-10 02:25:47 UTC (rev 291937)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-10 03:23:05 UTC (rev 291938)
@@ -95,6 +95,7 @@
 - Fixed bug #49866 (Making reference on string offsets crashes PHP). (Dmitry)
 - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
   sjoerd at php dot net)
+- Fixed bug #49851 (http wrapper breaks on 1024 char long headers). (Ilia)
 - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
   (Ilia, wmeler at wp-sa dot pl)
 - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private

Modified: php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2009-12-10 02:25:47 UTC (rev 291937)
+++ php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2009-12-10 03:23:05 UTC (rev 291938)
@@ -610,6 +610,10 @@
size_t http_header_line_length;
if (php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE, http_header_line_length)  *http_header_line != '\n' 
 *http_header_line != '\r') {
char *e = http_header_line + http_header_line_length - 
1;
+   if (*e != '\n') { /* partial header */
+   php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE, http_header_line_length);
+   continue;
+   }
while (*e == '\n' || *e == '\r') {
e--;
}

Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2009-12-10 02:25:47 UTC 
(rev 291937)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2009-12-10 03:23:05 UTC 
(rev 291938)
@@ -653,6 +653,10 @@
size_t http_header_line_length;
if (php_stream_get_line(stream, ZSTR(http_header_line), 
HTTP_HEADER_BLOCK_SIZE, http_header_line_length)  *http_header_line != '\n' 
 *http_header_line != '\r') {
char *e = http_header_line + http_header_line_length - 
1;
+   if (*e != '\n') { /* partial header */
+   php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE, http_header_line_length);
+   continue;
+   }
while (*e == '\n' || *e == '\r') {
e--;
}

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/http_fopen_wrapper.c trunk/ext/standard/http_fopen_wrapper.c

2009-12-09 Thread Jani Taskinen

It happens in PHP_5_2 as well, why not fix that too? :)

--Jani


On 12/10/2009 05:23 AM, Ilia Alshanetsky wrote:

iliaaThu, 10 Dec 2009 03:23:05 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291938

Log:
Fixed bug #49851 (http wrapper breaks on 1024 char long headers).

Bug: http://bugs.php.net/49851 (Open) http wrapper breaks on 1024 char long 
headers

Changed paths:
 U   php/php-src/branches/PHP_5_3/NEWS
 U   php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
 U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-10 02:25:47 UTC (rev 291937)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-10 03:23:05 UTC (rev 291938)
@@ -95,6 +95,7 @@
  - Fixed bug #49866 (Making reference on string offsets crashes PHP). (Dmitry)
  - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
sjoerd at php dot net)
+- Fixed bug #49851 (http wrapper breaks on 1024 char long headers). (Ilia)
  - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
(Ilia, wmeler at wp-sa dot pl)
  - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private

Modified: php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2009-12-10 02:25:47 UTC (rev 291937)
+++ php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2009-12-10 03:23:05 UTC (rev 291938)
@@ -610,6 +610,10 @@
size_t http_header_line_length;
if (php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE,http_header_line_length)  *http_header_line != '\n' 
 *http_header_line != '\r') {
char *e = http_header_line + http_header_line_length - 
1;
+   if (*e != '\n') { /* partial header */
+   php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE,http_header_line_length);
+   continue;
+   }
while (*e == '\n' || *e == '\r') {
e--;
}

Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2009-12-10 02:25:47 UTC 
(rev 291937)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2009-12-10 03:23:05 UTC 
(rev 291938)
@@ -653,6 +653,10 @@
size_t http_header_line_length;
if (php_stream_get_line(stream, ZSTR(http_header_line), 
HTTP_HEADER_BLOCK_SIZE,http_header_line_length)  *http_header_line != '\n' 
 *http_header_line != '\r') {
char *e = http_header_line + http_header_line_length - 
1;
+   if (*e != '\n') { /* partial header */
+   php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE,http_header_line_length);
+   continue;
+   }
while (*e == '\n' || *e == '\r') {
e--;
}





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