Mercurial
diff hg-web/main.c @ 223:0e7b9464248d hg-web
[hg-web] Add browser route regression coverage
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Sun, 02 Aug 2026 10:07:40 -0700 |
| parents | ce7f4400c2de |
| children | 3007ef5fc0ed |
line wrap: on
line diff
--- a/hg-web/main.c Sun Aug 02 09:07:36 2026 -0700 +++ b/hg-web/main.c Sun Aug 02 10:07:40 2026 -0700 @@ -344,10 +344,14 @@ if (length < 0 || (size_t)length >= sizeof(hg_path)) return text_response(arena, "400", "text/plain", "README path is too long"); - return forward_hg_response( - hg_proxy_request("GET", hg_path, NULL, 0, NULL, "text/markdown"), - "text/markdown", - arena); + Seobeo_Client_Response *hg_response = + hg_proxy_request("GET", hg_path, NULL, 0, NULL, "text/markdown"); + if (hg_response && hg_response->status_code == HTTP_NOT_FOUND) + { + Seobeo_Client_Response_Destroy(hg_response); + return text_response(arena, "204", "text/markdown", ""); + } + return forward_hg_response(hg_response, "text/markdown", arena); } Seobeo_Request_Entry *ApiGetGraph(Seobeo_Request_Entry *request, Dowa_Arena *arena)