From svnnotify @ sourceforge.jp Wed Jul 1 13:17:25 2009 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 01 Jul 2009 13:17:25 +0900 Subject: [Frameworkspider-svn] =?utf-8?q?spider-commit_=5B81=5D_PHP5=2E1?= =?utf-8?b?LiA244GnRG9Db01v44GueGh0bWzjg5jjg4Pjg4DjgYzmraPjgZfjgY/pgIE=?= =?utf-8?b?5L+h44GV44KM44Gq44GE5ZWP6aGM44Gu5L+u5q2j?= Message-ID: <1246421845.886842.10053.nullmailer@users.sourceforge.jp> Revision: 81 http://sourceforge.jp/projects/frameworkspider/svn/view?view=rev&revision=81 Author: m_nakashima Date: 2009-07-01 13:17:25 +0900 (Wed, 01 Jul 2009) Log Message: ----------- PHP5.1.6でDoCoMoのxhtmlヘッダが正しく送信されない問題の修正 PHP5.1.6だと、ob_get_clean()呼び出し時に勝手にContent-Type: text/html;がセットされ、以降の行にheader関数でContent-Typeを指定する記述をしても上書きできていなかった為DoCoMoのxhtml指定ヘッダを送信する行をビルドファイル冒頭に移動するよう修正 【変更ファイル】 lib/spider/Builder.class.php lib/spider/tags/Charset.class.php Modified Paths: -------------- current/README.txt current/spider/lib/spider/Builder.class.php current/spider/lib/spider/tags/Charset.class.php -------------- next part -------------- Modified: current/README.txt =================================================================== --- current/README.txt 2009-06-29 03:07:17 UTC (rev 80) +++ current/README.txt 2009-07-01 04:17:25 UTC (rev 81) @@ -3,6 +3,14 @@ ** ** このファイルにはコミットごとに変更点とファイル名を記述します。 ** +-- 2009-07-01 +1) PHP5.1.6でDoCoMoのxhtmlヘッダが正しく送信されない問題の修正 + PHP5.1.6だと、ob_get_clean()呼び出し時に勝手にContent-Type: text/html;がセットされ、 + 以降の行にheader関数でContent-Typeを指定する記述をしても上書きできていなかった為 + DoCoMoのxhtml指定ヘッダを送信する行をビルドファイル冒頭に移動するよう修正 + 【変更ファイル】 + lib/spider/Builder.class.php + lib/spider/tags/Charset.class.php -- 2009-06-29 1) util_Mailクラスの添付ファイル名のエンコーディングが正しく行われていなかった問題の修正 Modified: current/spider/lib/spider/Builder.class.php =================================================================== --- current/spider/lib/spider/Builder.class.php 2009-06-29 03:07:17 UTC (rev 80) +++ current/spider/lib/spider/Builder.class.php 2009-07-01 04:17:25 UTC (rev 81) @@ -255,6 +255,7 @@ $string .= 'mb_internal_encoding(\'UTF-8\');'."\n"; $string .= 'mb_http_output(\'UTF-8\');'."\n"; $string .= '$outstr = ob_get_clean();'."\n"; + $string .= '$outstr = trim($outstr);'."\n"; // 表示文字列に対する処理実行コードを記述 foreach( $build_information_object->convert_view_process_hash as $code_array ) { Modified: current/spider/lib/spider/tags/Charset.class.php =================================================================== --- current/spider/lib/spider/tags/Charset.class.php 2009-06-29 03:07:17 UTC (rev 80) +++ current/spider/lib/spider/tags/Charset.class.php 2009-07-01 04:17:25 UTC (rev 81) @@ -118,6 +118,11 @@ $process_code .= "mb_language('".$language."');\n"; $process_code .= "mb_detect_order('".$detect_order."');\n"; $process_code .= "mb_internal_encoding('".$internal_charset."');\n"; + // 2009-07-01 DoCoMo XHTML対応 暫定 PHPheaderでセットしたContent-Typeの文字セットでob_get_cleanの取得文字コードを勝手に操作する為UTF-8で指定... + if( preg_match('/\\<\\!DOCTYPE\\shtml\\sPUBLIC\\s\\"\\-\\/\\/i\\-mode group/',$result_strings) > 0 ) { + $process_code .= '$request->setResponseHeader(\'Content-Type\',\'application/xhtml+xml;charset=UTF-8\');'."\n"; + } + if( !isset($build_information->preview_process_hash) || !is_array($build_information->preview_process_hash) ){ $build_information->preview_process_hash = array();