@@ -1119,19 +1119,19 @@ static void init_request_info(void)
11191119 char * ptr ;
11201120
11211121 if (pt ) {
1122- // If DocumentRoot contains cyrillic characters and PHP is invoked with SetHandler (not applicable to ProxyPassMatch),
1123- // then the cyrillic characters are urlencoded by apache, and we need to decode them, for example with
1124- // DocumentRoot /home/hans/web/cyrillicрф.ratma.net/public_html
1125- // env_script_filename contains /home/hans/web/cyrillic%D1%80%D1%84.ratma.net/public_html/index.php.
1126- // and we must decode it to /home/hans/web/cyrillicрф.ratma.net/public_html/index.php.
1122+ // If DocumentRoot contains special characters like '%' or cyrillic 'рф' and PHP is invoked with SetHandler (not applicable to ProxyPassMatch),
1123+ // then the special characters are urlencoded by apache, and we need to decode them, for example with
1124+ // DocumentRoot /home/hans/web/cyrillicрф.ratma.net/public_html/test%lol
1125+ // env_script_filename contains /home/hans/web/cyrillic%D1%80%D1%84.ratma.net/public_html/test%25lol/ index.php.
1126+ // and we must decode it to /home/hans/web/cyrillicрф.ratma.net/public_html/test%lol/ index.php.
11271127 if (apache_was_here && memchr (pt , '%' , len )) {
11281128 len = php_raw_url_decode (pt , len );
11291129 ptr = & pt [len ]; // php_raw_url_decode() writes a trailing null byte, &pt[len] is that null byte.
1130- goto apache_cyrillic_jump ;
1130+ goto apache_special_jump ;
11311131 }
11321132 while ((ptr = strrchr (pt , '/' )) || (ptr = strrchr (pt , '\\' ))) {
11331133 * ptr = 0 ;
1134- apache_cyrillic_jump :
1134+ apache_special_jump :
11351135 if (stat (pt , & st ) == 0 && S_ISREG (st .st_mode )) {
11361136 /*
11371137 * okay, we found the base script!
0 commit comments