Globbing should return 200 OK even if empty

未關閉
#900 7 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
javascript
領域
api, backend

研究方向

首先追蹤伺服器對 /notes/note-* 等 glob 請求的 GET 處理,並比較現有資源與空容器這兩種情況。確認空匹配如何轉換為 404,然後新增涵蓋測試,表明現有容器在沒有匹配資源時會返回帶有空列表的 200 OK。

由索引模型根據 Issue 內容生成。

描述

Assuming I have a container named /notes in my POD and this container contains resources matching /notes/note-* I get a nice list of those resources if I do a GET of /notes/note-*.

But if the /notes container is empty and I try GET /notes/note-* I get 404 - not found.

If think that is wrong, The container is there and any attempt to get a filtered list of its content should return 200 OK since the list is there (the container exists) but it is simply empty as there are no matching resources in the container.

Returning 404 tells the client "You made a mistake - there is nothing here". But the client did not make a mistake - it simply asked for an empty list, not a missing-non-existing list.

主要語言
JavaScript
星號
1.8k
分支
308
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

nodeSolidServer/node-solid-server 的其他 Issue

查看 nodeSolidServer/node-solid-server 的全部 Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。