iliaa           Wed Jun  6 00:01:14 2007 UTC

  Modified files:              
    /php-src/ext/standard       url_scanner_ex.c url_scanner_ex.re 
    /php-src/ext/session/tests  bug41600.phpt 
  Log:
  
  MFB: Fixed bug #41600 (url rewriter tags doesn't work with namespaced tags).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url_scanner_ex.c?r1=1.104&r2=1.105&diff_format=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.104 
php-src/ext/standard/url_scanner_ex.c:1.105
--- php-src/ext/standard/url_scanner_ex.c:1.104 Mon Jan  1 09:29:32 2007
+++ php-src/ext/standard/url_scanner_ex.c       Wed Jun  6 00:01:13 2007
@@ -1,10 +1,10 @@
-/* Generated by re2c 0.10.1 on Sat Jun  3 12:59:33 2007 */
-#line 1 "ext/standard/url_scanner_ex.re"
+/* Generated by re2c 0.11.0 on Tue Jun  5 20:00:54 2007 */
+#line 1 "url_scanner_ex.re"
 /*
   +----------------------------------------------------------------------+
   | PHP Version 5                                                        |
   +----------------------------------------------------------------------+
-  | Copyright (c) 1997-2007 The PHP Group                                |
+  | Copyright (c) 1997-2006 The PHP Group                                |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: url_scanner_ex.c,v 1.104 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: url_scanner_ex.c,v 1.105 2007/06/06 00:01:13 iliaa Exp $ */
 
 #include "php.h"
 
@@ -91,7 +91,7 @@
        STD_PHP_INI_ENTRY("url_rewriter.tags", 
"a=href,area=href,frame=src,form=,fieldset=", PHP_INI_ALL, OnUpdateTags, 
url_adapt_state_ex, php_basic_globals, basic_globals)
 PHP_INI_END()
 
-#line 97 "ext/standard/url_scanner_ex.re"
+#line 98 "url_scanner_ex.re"
 
 
 #define YYFILL(n) goto done
@@ -145,7 +145,7 @@
                128, 128, 128, 128, 128, 128, 128, 128, 
        };
 
-#line 149 "ext/standard/url_scanner_ex.c"
+#line 149 "url_scanner_ex.c"
        {
                YYCTYPE yych;
 
@@ -157,19 +157,19 @@
                if(yych <= '9') goto yy6;
                if(yych >= ';') goto yy4;
                ++YYCURSOR;
-#line 115 "ext/standard/url_scanner_ex.re"
+#line 116 "url_scanner_ex.re"
                { smart_str_append(dest, url); return; }
-#line 163 "ext/standard/url_scanner_ex.c"
+#line 163 "url_scanner_ex.c"
 yy4:
                ++YYCURSOR;
-#line 116 "ext/standard/url_scanner_ex.re"
+#line 117 "url_scanner_ex.re"
                { sep = separator; goto scan; }
-#line 168 "ext/standard/url_scanner_ex.c"
+#line 168 "url_scanner_ex.c"
 yy6:
                ++YYCURSOR;
-#line 117 "ext/standard/url_scanner_ex.re"
+#line 118 "url_scanner_ex.re"
                { bash = p - 1; goto done; }
-#line 173 "ext/standard/url_scanner_ex.c"
+#line 173 "url_scanner_ex.c"
 yy8:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -177,12 +177,12 @@
                if(yybm[0+yych] & 128) {
                        goto yy8;
                }
-#line 118 "ext/standard/url_scanner_ex.re"
+#line 119 "url_scanner_ex.re"
                { goto scan; }
-#line 183 "ext/standard/url_scanner_ex.c"
+#line 183 "url_scanner_ex.c"
        }
 }
-#line 119 "ext/standard/url_scanner_ex.re"
+#line 120 "url_scanner_ex.re"
 
 done:
        
@@ -386,7 +386,7 @@
                128, 128, 128, 128, 128, 128, 128, 128, 
        };
 
-#line 390 "ext/standard/url_scanner_ex.c"
+#line 390 "url_scanner_ex.c"
        {
                YYCTYPE yych;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -395,9 +395,9 @@
                        goto yy15;
                }
                ++YYCURSOR;
-#line 287 "ext/standard/url_scanner_ex.re"
+#line 288 "url_scanner_ex.re"
                { passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
-#line 401 "ext/standard/url_scanner_ex.c"
+#line 401 "url_scanner_ex.c"
 yy15:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -405,12 +405,12 @@
                if(yybm[0+yych] & 128) {
                        goto yy15;
                }
-#line 288 "ext/standard/url_scanner_ex.re"
+#line 289 "url_scanner_ex.re"
                { passthru(STD_ARGS); goto state_plain; }
-#line 411 "ext/standard/url_scanner_ex.c"
+#line 411 "url_scanner_ex.c"
        }
 }
-#line 289 "ext/standard/url_scanner_ex.re"
+#line 290 "url_scanner_ex.re"
 
 
 state_tag:     
@@ -424,7 +424,7 @@
                  0,   0,   0,   0,   0,   0,   0,   0, 
                  0,   0,   0,   0,   0,   0,   0,   0, 
                  0,   0,   0,   0,   0,   0,   0,   0, 
-                 0,   0,   0,   0,   0,   0,   0,   0, 
+                 0,   0, 128,   0,   0,   0,   0,   0, 
                  0, 128, 128, 128, 128, 128, 128, 128, 
                128, 128, 128, 128, 128, 128, 128, 128, 
                128, 128, 128, 128, 128, 128, 128, 128, 
@@ -451,28 +451,31 @@
                  0,   0,   0,   0,   0,   0,   0,   0, 
        };
 
-#line 455 "ext/standard/url_scanner_ex.c"
+#line 455 "url_scanner_ex.c"
        {
                YYCTYPE yych;
                if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
                yych = *YYCURSOR;
-               if(yych <= '@') goto yy22;
-               if(yych <= 'Z') goto yy20;
-               if(yych <= '`') goto yy22;
-               if(yych >= '{') goto yy22;
+               if(yych <= '@') {
+                       if(yych != ':') goto yy22;
+               } else {
+                       if(yych <= 'Z') goto yy20;
+                       if(yych <= '`') goto yy22;
+                       if(yych >= '{') goto yy22;
+               }
 yy20:
                ++YYCURSOR;
                yych = *YYCURSOR;
                goto yy25;
 yy21:
-#line 294 "ext/standard/url_scanner_ex.re"
+#line 295 "url_scanner_ex.re"
                { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); 
if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; }
-#line 471 "ext/standard/url_scanner_ex.c"
+#line 474 "url_scanner_ex.c"
 yy22:
                ++YYCURSOR;
-#line 295 "ext/standard/url_scanner_ex.re"
+#line 296 "url_scanner_ex.re"
                { passthru(STD_ARGS); goto state_plain_begin; }
-#line 476 "ext/standard/url_scanner_ex.c"
+#line 479 "url_scanner_ex.c"
 yy24:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -484,7 +487,7 @@
                goto yy21;
        }
 }
-#line 296 "ext/standard/url_scanner_ex.re"
+#line 297 "url_scanner_ex.re"
 
 
 state_next_arg_begin:
@@ -528,7 +531,7 @@
                  0,   0,   0,   0,   0,   0,   0,   0, 
        };
 
-#line 532 "ext/standard/url_scanner_ex.c"
+#line 535 "url_scanner_ex.c"
        {
                YYCTYPE yych;
                if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@@ -554,27 +557,27 @@
                        }
                }
                ++YYCURSOR;
-#line 304 "ext/standard/url_scanner_ex.re"
+#line 305 "url_scanner_ex.re"
                { passthru(STD_ARGS); handle_form(STD_ARGS); goto 
state_plain_begin; }
-#line 560 "ext/standard/url_scanner_ex.c"
+#line 563 "url_scanner_ex.c"
 yy30:
                ++YYCURSOR;
                yych = *YYCURSOR;
                goto yy37;
 yy31:
-#line 305 "ext/standard/url_scanner_ex.re"
+#line 306 "url_scanner_ex.re"
                { passthru(STD_ARGS); goto state_next_arg; }
-#line 568 "ext/standard/url_scanner_ex.c"
+#line 571 "url_scanner_ex.c"
 yy32:
                ++YYCURSOR;
-#line 306 "ext/standard/url_scanner_ex.re"
+#line 307 "url_scanner_ex.re"
                { --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
-#line 573 "ext/standard/url_scanner_ex.c"
+#line 576 "url_scanner_ex.c"
 yy34:
                ++YYCURSOR;
-#line 307 "ext/standard/url_scanner_ex.re"
+#line 308 "url_scanner_ex.re"
                { passthru(STD_ARGS); goto state_plain_begin; }
-#line 578 "ext/standard/url_scanner_ex.c"
+#line 581 "url_scanner_ex.c"
 yy36:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -586,7 +589,7 @@
                goto yy31;
        }
 }
-#line 308 "ext/standard/url_scanner_ex.re"
+#line 309 "url_scanner_ex.re"
 
 
 state_arg:
@@ -627,7 +630,7 @@
                  0,   0,   0,   0,   0,   0,   0,   0, 
        };
 
-#line 631 "ext/standard/url_scanner_ex.c"
+#line 634 "url_scanner_ex.c"
        {
                YYCTYPE yych;
                if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@@ -641,14 +644,14 @@
                yych = *YYCURSOR;
                goto yy45;
 yy41:
-#line 313 "ext/standard/url_scanner_ex.re"
+#line 314 "url_scanner_ex.re"
                { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = 
STATE_BEFORE_VAL; goto state_before_val; }
-#line 647 "ext/standard/url_scanner_ex.c"
+#line 650 "url_scanner_ex.c"
 yy42:
                ++YYCURSOR;
-#line 314 "ext/standard/url_scanner_ex.re"
+#line 315 "url_scanner_ex.re"
                { passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto 
state_next_arg; }
-#line 652 "ext/standard/url_scanner_ex.c"
+#line 655 "url_scanner_ex.c"
 yy44:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -660,7 +663,7 @@
                goto yy41;
        }
 }
-#line 315 "ext/standard/url_scanner_ex.re"
+#line 316 "url_scanner_ex.re"
 
 
 state_before_val:
@@ -701,32 +704,30 @@
                  0,   0,   0,   0,   0,   0,   0,   0, 
        };
 
-#line 705 "ext/standard/url_scanner_ex.c"
+#line 708 "url_scanner_ex.c"
        {
                YYCTYPE yych;
-               unsigned int yyaccept = 0;
                if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
                yych = *YYCURSOR;
                if(yych == ' ') goto yy48;
                if(yych == '=') goto yy50;
                goto yy52;
 yy48:
-               yyaccept = 0;
                yych = *(YYMARKER = ++YYCURSOR);
                if(yych == ' ') goto yy55;
                if(yych == '=') goto yy53;
 yy49:
-#line 321 "ext/standard/url_scanner_ex.re"
+#line 322 "url_scanner_ex.re"
                { --YYCURSOR; goto state_next_arg_begin; }
-#line 722 "ext/standard/url_scanner_ex.c"
+#line 723 "url_scanner_ex.c"
 yy50:
                ++YYCURSOR;
                yych = *YYCURSOR;
                goto yy54;
 yy51:
-#line 320 "ext/standard/url_scanner_ex.re"
+#line 321 "url_scanner_ex.re"
                { passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
-#line 730 "ext/standard/url_scanner_ex.c"
+#line 731 "url_scanner_ex.c"
 yy52:
                yych = *++YYCURSOR;
                goto yy49;
@@ -746,12 +747,10 @@
                if(yych == ' ') goto yy55;
                if(yych == '=') goto yy53;
                YYCURSOR = YYMARKER;
-               switch(yyaccept){
-               case 0: goto yy49;
-               }
+               goto yy49;
        }
 }
-#line 322 "ext/standard/url_scanner_ex.re"
+#line 323 "url_scanner_ex.re"
 
 
 
@@ -793,10 +792,9 @@
                248, 248, 248, 248, 248, 248, 248, 248, 
        };
 
-#line 797 "ext/standard/url_scanner_ex.c"
+#line 796 "url_scanner_ex.c"
        {
                YYCTYPE yych;
-               unsigned int yyaccept = 0;
                if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
                yych = *YYCURSOR;
                if(yych <= ' ') {
@@ -818,15 +816,13 @@
                                goto yy63;
                        }
                }
-               yyaccept = 0;
                yych = *(YYMARKER = ++YYCURSOR);
                goto yy77;
 yy61:
-#line 330 "ext/standard/url_scanner_ex.re"
+#line 331 "url_scanner_ex.re"
                { handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; }
-#line 828 "ext/standard/url_scanner_ex.c"
+#line 825 "url_scanner_ex.c"
 yy62:
-               yyaccept = 0;
                yych = *(YYMARKER = ++YYCURSOR);
                goto yy69;
 yy63:
@@ -834,9 +830,9 @@
                goto yy67;
 yy64:
                ++YYCURSOR;
-#line 331 "ext/standard/url_scanner_ex.re"
+#line 332 "url_scanner_ex.re"
                { passthru(STD_ARGS); goto state_next_arg_begin; }
-#line 840 "ext/standard/url_scanner_ex.c"
+#line 836 "url_scanner_ex.c"
 yy66:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -847,7 +843,6 @@
                }
                goto yy61;
 yy68:
-               yyaccept = 0;
                YYMARKER = ++YYCURSOR;
                if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
                yych = *YYCURSOR;
@@ -862,9 +857,9 @@
                        goto yy66;
                }
 yy71:
-#line 329 "ext/standard/url_scanner_ex.re"
+#line 330 "url_scanner_ex.re"
                { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
-#line 868 "ext/standard/url_scanner_ex.c"
+#line 863 "url_scanner_ex.c"
 yy72:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -875,14 +870,11 @@
                if(yych <= '=') goto yy75;
 yy74:
                YYCURSOR = YYMARKER;
-               switch(yyaccept){
-               case 0: goto yy61;
-               }
+               goto yy61;
 yy75:
                yych = *++YYCURSOR;
                goto yy71;
 yy76:
-               yyaccept = 0;
                YYMARKER = ++YYCURSOR;
                if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
                yych = *YYCURSOR;
@@ -897,9 +889,9 @@
                        goto yy66;
                }
 yy79:
-#line 328 "ext/standard/url_scanner_ex.re"
+#line 329 "url_scanner_ex.re"
                { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
-#line 903 "ext/standard/url_scanner_ex.c"
+#line 895 "url_scanner_ex.c"
 yy80:
                ++YYCURSOR;
                if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -913,7 +905,7 @@
                goto yy79;
        }
 }
-#line 332 "ext/standard/url_scanner_ex.re"
+#line 333 "url_scanner_ex.re"
 
 
 stop:
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url_scanner_ex.re?r1=1.80&r2=1.81&diff_format=u
Index: php-src/ext/standard/url_scanner_ex.re
diff -u php-src/ext/standard/url_scanner_ex.re:1.80 
php-src/ext/standard/url_scanner_ex.re:1.81
--- php-src/ext/standard/url_scanner_ex.re:1.80 Sat Jun  3 11:19:43 2006
+++ php-src/ext/standard/url_scanner_ex.re      Wed Jun  6 00:01:13 2007
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: url_scanner_ex.re,v 1.80 2006/06/03 11:19:43 mike Exp $ */
+/* $Id: url_scanner_ex.re,v 1.81 2007/06/06 00:01:13 iliaa Exp $ */
 
 #include "php.h"
 
@@ -93,6 +93,7 @@
 any = [\000-\377];
 N = (any\[<]);
 alpha = [a-zA-Z];
+alphanamespace = [a-zA-Z:];
 alphadash = ([a-zA-Z] | "-");
 */
 
@@ -291,7 +292,7 @@
 state_tag:     
        start = YYCURSOR;
 /*!re2c
-  alpha+       { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); 
if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; }
+  alphanamespace+      { handle_tag(STD_ARGS); /* Sets STATE */; 
passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto 
state_next_arg; }
   any          { passthru(STD_ARGS); goto state_plain_begin; }
 */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/bug41600.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/session/tests/bug41600.phpt
diff -u /dev/null php-src/ext/session/tests/bug41600.phpt:1.2
--- /dev/null   Wed Jun  6 00:01:14 2007
+++ php-src/ext/session/tests/bug41600.phpt     Wed Jun  6 00:01:13 2007
@@ -0,0 +1,26 @@
+--TEST--
+Bug #41600 (url rewriter tags doesn't work with namespaced tags
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.use_trans_sid=1
+arg_separator.output=&amp;
+session.name=PHPSESSID
+session.serialize_handler=php
+session.save_handler=files
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+session_id("abtest");
+session_start();
+?>
+<a href="link.php?a=b">
+<?php
+session_destroy();
+?>
+--EXPECT--
+<a href="link.php?a=b&amp;PHPSESSID=abtest">

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

Reply via email to