Pre-hash query parameters are ignored, and the https: scheme is stripped
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- angularjs, javascript
調査の方向性
Start at the controller that reads $location.search(), constructs the fetched URL, and accesses sequences[0]; the issue does not name its file or tests. Check how AngularJS 1.4.7 parses hashbang URLs and inspect the handling of responses without sequences. Done means pre-hash query parameters work, HTTPS URLs retain their scheme, and a Canvas or Range produces a visible error instead of a blank page.
索引モデルが issue の本文から書いたものです。
説明
Found while designing the resource bag for Oh My RERUM (CenterForDigitalHumanities/oh-my-rerum#10). OMR hands a resource to a tool as a percent-encoded URI in the pre-hash query string, which is the form the IIIF Content State 1.0 spec recommends. This tool cannot see it.
1. Parameters before the hash are ignored
The app reads its input through $location.search() but never enables html5Mode. In Angular 1.4.7, LocationHashbangUrl.$$parse (angular.js around line 11518) treats a URL with no fragment as empty — the comment in the source reads "Otherwise we ignore what is left".
So this works:
/read/index.html#!/read?url=https://example.org/manifest.json&p=3
and this does not:
/read/index.html?url=https://example.org/manifest.json&p=3
The second form is what any spec-conformant caller, including the IIIF Content State recommendation, produces. Enabling html5Mode, or falling back to window.location.search when $location.search() is empty, would both fix it.
2. The https: scheme is stripped from the URL being fetched
The fetched URL is built with a replace(/^https?:/, '') on the url parameter. That turns https://example.org/m.json into a protocol-relative //example.org/m.json, which inherits this page's scheme. Served over plain HTTP, every HTTPS manifest breaks. The comment or commit behind it would help — if it was a workaround for a mixed-content problem, there is a better fix.
3. A Canvas URI in url throws instead of reporting
The response is accepted if it has an @id, and then sequences[0] is read from it. A Canvas has an @id but no sequences, so the controller dies with a TypeError and the page goes blank. A Canvas or Range is a legal Content State target, so callers will send one. A visible "this is not a Manifest" message would be much more useful than a blank page.
Context
IIIF Content State 1.0, section 2.2.4, permits a bare dereferenceable URI as the value of iiif-content, and says a plain URI must not be content-state-encoded. Section 2.2.5 notes that a Canvas URI which is not itself dereferenceable needs one of the JSON forms. OMR will keep sending the plain form and surfacing the failure, rather than special-casing around this tool, so a fix here is what makes the tool reachable.
- 主要言語
- JavaScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
evi0s/WMPFDebugger#303 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
HakanSeven12/OpenCADStudio#2257 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
bug code-annotation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quarto-dev/quarto-cli#15215 ·
メンテナーはふだん 1 日以内に返信