nodeSolidServer / nodeSolidServer/node-solid-server
Requesting binaries with invalid Accept headers should 406, not 500
未關閉
還沒有人認領這個 Issue。
cannot-reproduce
- 主要語言
- JavaScript
- 星號
- 1.8k
- 分支
- 308
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Reported by @timbl:
If you request a non-rdf resource (say a PDF file) with an accept header like Accept:image/*;q=0.9, application/rdf+xml, application/xhtml+xml, text/xml;q=0.2, application/xml;q=0.2, text/html;q=0.3, text/plain;q=0.1, text/n3;q=1.0, application/x-turtle;q=1, text/turtle;q=1, the server will try to convert it from PDF to RDF, and fail with a 500 error.
Should instead return a 406 Unacceptable.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
使用 issue 中顯示的 Accept 標頭,針對 PDF 等非 RDF 二進位檔案重現該請求,然後追蹤伺服器的內容協商與轉換路徑。未支援的轉換回傳 HTTP 406 Not Acceptable 而不是 HTTP 500,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- api, backend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100