Namazu-users-ja(旧)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mknmz-squid 実行時にメディアタイプの取得に失敗し停止



これで決着がつくと思ったのですが…、
 
> >> Squidのヘッダを再び解析しました。
> >> まだ確証はありませんが、ファイルの先頭のバイナリは以下のようになっている
> >> と思われます。
> >> 03 ?? 00 00 00 03 10 00 00 00 ?? …………
> >> これをAddSpecials内に導入すればいいのだが、
> 
>   ということであれば、むしろ addMagicEntry の方がよさそうです。多分最
> 初の 0x03 はみなくてもそれ程影響しないと思うので、
> 
> $mm->addMagicEntry("2\tstring\t".'\x00\x00\x00\x03\x10\x00\x00\x00'."\tapplication/x-squid-cache");
> 
>   という感じでいかがでしょうか。これを用いて手元で試してみた限りは問題
> なさそうです。加えてこの方が SPECIALS による判定より高速です。
>
単体でのテストも成功しました。インデクス作成も成功しました、が、
9個のファイルしかインデクスを吐きませんでした。

今回の状況の特徴
・以前成功した独自にメディアタイプを取得してマッチしなければサイズを0にするというタイプ(*2)でも同じ結果。(これが一番謎 )
・util::vprint を挿入しても全くログに出力されない。
・Squid-cacheのヘッダが取り除かれてない。それ以前にそのルーチン(desquidcache())を通っていない。

● ログの抜粋 ●
気になるのは、判定後も application/x-squid-cache となっている上、
html も未対応の形式になっています。それでも、

@@ 未対応の形式 application/x-squid-cache
// load_document 実行後: http://www.susono.com/~str/profile/kabe.gif: 1565, 1565, 0, application/x-squid-cache; x-system=unsupported
1/9132 - http://www.susono.com/~str/profile/kabe.gif 未対応の形式 (application/x-squid-cache)無視します
// 対象ファイル: /var/spool/squid/00/0B/00000B6B
// decide_type: name: application/octet-stream, cont: application/x-squid-cache
// 検出されたタイプ: application/x-squid-cache
@@ 未対応の形式 application/x-squid-cache
// load_document 実行後: http://www.motchie.com/article/latex.html: 9419, 9419, 0, application/x-squid-cache; x-system=unsupported
1/9131 - http://www.motchie.com/article/latex.html 未対応の形式 (application/x-squid-cache)無視します

--
Kazuki AKita
http://tat6.ice.ous.ac.jp/memo/memo.cgi (*1 更新なし)
http://tat6.ice.ous.ac.jp/akita/filez/squidcache.pl (*2 変更なし)