Comments (9)
お酒が入ってる時の勢いで出したレポートなので不手際があると思います
お酒が抜け切った頃にまたレポートします…
from amon.
そろそろ抜けきったでしょうか?
from amon.
今日の仕事が終わって家に着いたらもう一度詳しく調べてみます
from amon.
追加で試した事
検証ブランチ: ichigotake/Amon@master...encode_test
結論から言うと、原因はわからず事象を確認するだけしか出来ませんでした
タイトルで示したように tmpl/index.tt に検証コードを書き加えたものをSetupスクリプトに含ませ、手元にインストールする
Setupに含めた デバッグプリント( warn $c->req->uri_with({page => 1}) )を見ると、正しいエンコードになっていた
=> 原因はテンプレートでの何か?
http://localhost:5000/?page=1&q=%E3%81%82 at /path/to/MyApp/lib/MyApp/Web/Dispatcher.pm line 12.
以下のいずれかを実行してから carton exec plackup するとエンコードが正しくなり、そのアプリケーションでは 二度と バグが再現しなくなる
$ touch .
$ touch app.psgi
$ touch local
$ touch lib
$ cp /other/path/app.psgi app.psgi # 中身が全く同じもので上書き
### *touch* に限らず、*vim* でファイルを開いて何も編集せずに上書き保存をするだけでも同等の効果が得られる
$ carton exec plackup #再起動してもエンコードが正しくなる
### tmpl/ は何かしらの操作を加えても影響なし
まとめ
- cpanm と carton install のみでデプロイしたものをplackupするとuri_with()で化けるが、何かしらの操作を行った後に plackup すると二度とバグが再現しなくなる
ものは試しと、Amon2::Web::Requestに use utf8 を書き加えてみましたが、変わらず。
(flagged utf8についてよくわかっていないのでこれは当てずっぽうな検証ですが…)
from amon.
ちょっとためすのむずかしくてお返事がおそくなりましてすみません。
こちら調査の結果、Xslate のバグであると断定し、@gfx に報告いたしました。
xslate/p5-Text-Xslate#82
ですので、そのうちなおるかとおもいます。
from amon.
はい、ありがとうございます
from amon.
Xslate 2.0008で修正しました‥が、この問題が自然消滅する方向での修正ではないかもしれません。
具体的には、テンプレート文字列内の文字列リテラルはすべて Text::Xslate->new(input_layer => '":encoding(utf8)")
の影響下ではUTF8フラグが付くようになりました。これがもともと初回起動時や cache => 0
時の挙動でしたので。
from amon.
だいぶおそくなってしまいましたが、修正しました。
from amon.
すっかり忘れてしまっていました
修正ありがとうございます
from amon.
Related Issues (20)
- Don't use Test::Synopsis::extract_synopsis
- dot was removed from @INC
- 013_websocket.t: random test failures
- lib/Amon2/Setup/Flavor.pm still always use MRO::Compat HOT 1
- Cache uri object by default. HOT 1
- Make Kolon as default.
- Use jquery 2.0.x by default. HOT 1
- Change the message on the premise of using cartons
- Create script/foo-server script by default. HOT 1
- Rewrite amon.64p.org based on Amon2 5.00
- Make scripts as really CPAN installable. HOT 1
- Minilla friendly dist.
- Support Router::Boom HOT 1
- New generated app from 5.06 still needs Router::Simple HOT 2
- 5.08+ fails on perl-5.19.4: needs HTTP::Session
- Use AngularJS by default. HOT 1
- Write Amon2::Runner for more simple script/${myapp}-server. HOT 3
- Remove BOM from JSON response
- Add new ViewController class for better HTML generation
- Send X-JSON-Status header in response time by Amon2::Plugin::Web::JSON
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amon.