From svnnotify @ sourceforge.jp Tue Sep 15 18:53:36 2009 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 15 Sep 2009 18:53:36 +0900 Subject: [Frameworkspider-svn] =?utf-8?q?spider-commit_=5B82=5D__DocumentR?= =?utf-8?b?b29044Gu6Kit5a6a44GnIC4g44GMVVJJ44OR44K544Gr5LuY5Yqg44GV44KM?= =?utf-8?b?44Gm44GX44G+44GG44Kx44O844K544Gr5a++5b+c?= Message-ID: <1253008416.800298.20551.nullmailer@users.sourceforge.jp> Revision: 82 http://sourceforge.jp/projects/frameworkspider/svn/view?view=rev&revision=82 Author: m_nakashima Date: 2009-09-15 18:53:36 +0900 (Tue, 15 Sep 2009) Log Message: ----------- DocumentRootの設定で.がURIパスに付加されてしまうケースに対応 Modified Paths: -------------- current/WWW_PUBLIC/spider.inc.php -------------- next part -------------- Modified: current/WWW_PUBLIC/spider.inc.php =================================================================== --- current/WWW_PUBLIC/spider.inc.php 2009-07-01 04:17:25 UTC (rev 81) +++ current/WWW_PUBLIC/spider.inc.php 2009-09-15 09:53:36 UTC (rev 82) @@ -75,6 +75,7 @@ $document_root = str_replace( '/',DIRECTORY_SEPARATOR, dirname($script_filename) ); $document_root = str_replace( str_replace( '/',DIRECTORY_SEPARATOR, dirname($user_request_uri) ), '', $document_root ); } +$spider_base_uri = null; if( isset($SPIDER_DEFINE_BASE_URI) && strlen($SPIDER_DEFINE_BASE_URI) > 0 ) { $spider_base_uri = $SPIDER_DEFINE_BASE_URI; } else { @@ -85,6 +86,10 @@ $dirname_array = explode('/',$request_uri); $spider_base_uri = '/'.$dirname_array[1].$spider_base_uri; } + if( preg_match('/^\\./',$spider_base_uri) > 0 ) { + // リクエストURIが.から始まる場合は除去する + $spider_base_uri = preg_replace('/^\\./','',$spider_base_uri); + } } if( !preg_match('/\\/$/', $spider_base_uri ) ) { $spider_base_uri .= '/';