You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2016/02/11 14:49:03 UTC

svn commit: r1729827 - /httpd/test/mod_h2/trunk/htdocs/test.example.org/abort_test.cgi

Author: icing
Date: Thu Feb 11 13:49:03 2016
New Revision: 1729827

URL: http://svn.apache.org/viewvc?rev=1729827&view=rev
Log:
improved version

Modified:
    httpd/test/mod_h2/trunk/htdocs/test.example.org/abort_test.cgi

Modified: httpd/test/mod_h2/trunk/htdocs/test.example.org/abort_test.cgi
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/abort_test.cgi?rev=1729827&r1=1729826&r2=1729827&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/abort_test.cgi (original)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/abort_test.cgi Thu Feb 11 13:49:03 2016
@@ -1,14 +1,24 @@
 #!/usr/bin/env php
 <?php
+ini_set('date.timezone', 'MET');
+ini_set('error_log', '/tmp/php.log');
 error_log('script started');
 $done=false;
-register_shutdown_function('abort');
+
+function mewasaborted()
+{
+    global $done;
+    if(!$done) error_log("aborted");
+    error_log("shutdown");
+}
+
+register_shutdown_function('mewasaborted');
 
 echo "Content-type: text/html\n\n";
 echo "\n\n";
 flush();
 
-for($i = 1; $i <= 60; $i++)
+for($i = 1; $i <= 10; $i++)
 {
     sleep(1);
     echo "$i<br>\n";
@@ -16,10 +26,5 @@ for($i = 1; $i <= 60; $i++)
 }
 $done = true;
 
-function abort()
-{
-    global $done;
-    if(!$done) error_log("aborted");
-}
 error_log('script ended');
 ?>