Encoding detection unpredictable
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- backend, testing-qa
調査の方向性
まず java -cp vnu.jar nu.validator.servlet.Main 8888 でバリデーションサーバーを起動し、リンクされた testCase.txt と ApacheBench コマンドを使ってレポートを再現します。断続的に発生する “big5” の検出と “Unmappable byte sequence” メッセージについて、同時実行時のレスポンスを比較します。繰り返し同時実行したバリデーションで、散発的な結果が発生せず、予測可能な charset 検出が行われれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When validating multiple files in concurrency, the encoding detection is not always predictable.
The easiest way to explain is probably to reproduce my test case:
- launch the validation server (15.6.29)
java -cp vnu.jar nu.validator.servlet.Main 8888
- get the test case file (this file contains an unbreakable space and doesn't specify a content type in a meta header): https://gist.githubusercontent.com/marob/d8f9cb25a64b3905616e/raw/c521f951a70518815dd380a2d3a038f1ab2f9bbb/testCase.txt
- validate this file with concurrency and grep results on "Unmappable" keyword:
ab -T"text/html; encoding=utf-8" -p testCase.txt -c 100 -n 10000 -v 4 http://localhost:8888/?out=json | grep Unmappable
You should obtain some results of the form (if not, try to restart the server and re-validate):
{"messages":[{"type":"info","message":"The Content-Type was “text/html”. Using the HTML parser."},{"type":"error","message":"The character encoding was not declared. Proceeding using “big5”."},{"type":"error","lastLine":7,"lastColumn":47,"message":"Unmappable byte sequence: “c2”, “a0”."},{"type":"info","message":"Using the schema for HTML5 + SVG 1.1 + MathML 3.0 + RDFa Lite 1.1."}]}
As you can see, the detected encoding is sometimes "big5", but only once or twice among thousands... hence the unpredictability.
When this encoding is detected, the unbreakable space triggers the "Unmappable byte sequence" error.
I think the charset detection should be predictable.
My test demonstrate it is not.
Regards
- 主要言語
- Java
- スター
- 65
- フォーク
- 29
- 平均マージ
- 11日 21時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
validator/htmlparser のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
validator/htmlparser#98 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
validator/htmlparser#96 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
validator/htmlparser#95 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
validator/htmlparser#87 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
validator/htmlparser#79 ·
validator/htmlparser の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
checkstyle/test-configs#263 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
1.0.0-alpha2 Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wso2/dpdp-accelerator#272 ·