BugTrack/2317
の編集
Top
/
BugTrack
/
2317
[
トップ
] [
編集
|
差分
|
履歴
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
* (PukiWiki の)http_request 関数で、POST 時のcharset について [#j7f94998] - ページ: [[BugTrack2]] - 投稿者: 名無しさん - 優先順位: 低 - 状態: 却下 - カテゴリー: 本体バグ - 投稿日: 2008-09-13 (土) 16:50:40 - バージョン: ** メッセージ [#yd867130] [[cvs:lib/proxy.php]] (1.9) より抜粋 if (strtoupper($method) == 'POST') { // 'application/x-www-form-urlencoded', especially for TrackBack ping $POST = array(); foreach ($post as $name=>$val) $POST[] = $name . '=' . urlencode($val); $data = join('&', $POST); if (preg_match('/^[a-zA-Z0-9_-]+$/', $content_charset)) { // Legacy but simple $query .= 'Content-Type: application/x-www-form-urlencoded' . "\r\n"; } else { // With charset (NOTE: Some implementation may hate this) $query .= 'Content-Type: application/x-www-form-urlencoded' . '; charset=' . strtolower($content_charset) . "\r\n"; } この部分のpreg_match 関数では、$content_charset 変数が、EUC-JP やUTF-8 などの英数文字のみで構成されている場合にはcharset が出力されず、空文字であったり英数文字以外(マルチバイト文字など)が使われているときにcharset が出力されるようになっています。 条件が逆のような気がするのですが、気のせいでしょうか? [[作り直す>BugTrack2/290]] という話題がある今となっては、遅すぎる提案かもしれませんが。 -------- - lib/proxy.php関連: [[BugTrack2/215]], [[BugTrack2/305]] -- &new{2010-10-05 (火) 21:18:17}; //#comment
タイムスタンプを変更しない
* (PukiWiki の)http_request 関数で、POST 時のcharset について [#j7f94998] - ページ: [[BugTrack2]] - 投稿者: 名無しさん - 優先順位: 低 - 状態: 却下 - カテゴリー: 本体バグ - 投稿日: 2008-09-13 (土) 16:50:40 - バージョン: ** メッセージ [#yd867130] [[cvs:lib/proxy.php]] (1.9) より抜粋 if (strtoupper($method) == 'POST') { // 'application/x-www-form-urlencoded', especially for TrackBack ping $POST = array(); foreach ($post as $name=>$val) $POST[] = $name . '=' . urlencode($val); $data = join('&', $POST); if (preg_match('/^[a-zA-Z0-9_-]+$/', $content_charset)) { // Legacy but simple $query .= 'Content-Type: application/x-www-form-urlencoded' . "\r\n"; } else { // With charset (NOTE: Some implementation may hate this) $query .= 'Content-Type: application/x-www-form-urlencoded' . '; charset=' . strtolower($content_charset) . "\r\n"; } この部分のpreg_match 関数では、$content_charset 変数が、EUC-JP やUTF-8 などの英数文字のみで構成されている場合にはcharset が出力されず、空文字であったり英数文字以外(マルチバイト文字など)が使われているときにcharset が出力されるようになっています。 条件が逆のような気がするのですが、気のせいでしょうか? [[作り直す>BugTrack2/290]] という話題がある今となっては、遅すぎる提案かもしれませんが。 -------- - lib/proxy.php関連: [[BugTrack2/215]], [[BugTrack2/305]] -- &new{2010-10-05 (火) 21:18:17}; //#comment
テキスト整形のルールを表示する