curl -sSI https://txt.zurag.be sends a HEAD request. The server only handled GET and POST, so HEAD fell through to the catch-all 404 handler — blocking the acceptance criterion even though the site was fully functional for browsers and game play.
HEAD gets the same 200 + Content-Type headers as GET; body is empty (correct per RFC 7231).
Test plan
After merge + pipeline redeploy:
curl -sSI https://txt.zurag.be → HTTP/2 200
curl -sS https://txt.zurag.be → game HTML (unchanged)
POST /guess still works as before
Task: dd07738f-6e58-4702-86c3-c43b85f236d2
## Problem
`curl -sSI https://txt.zurag.be` sends a HEAD request. The server only handled `GET` and `POST`, so HEAD fell through to the catch-all `404` handler — blocking the acceptance criterion even though the site was fully functional for browsers and game play.
## Change
Single-line fix in the `GET /` handler:
```diff
- if (req.method === "GET" && url === "/") {
+ if ((req.method === "GET" || req.method === "HEAD") && url === "/") {
setCookie(res, id);
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
- res.end(renderPage(session, "", null));
+ res.end(req.method === "HEAD" ? "" : renderPage(session, "", null));
```
HEAD gets the same 200 + `Content-Type` headers as GET; body is empty (correct per RFC 7231).
## Test plan
After merge + pipeline redeploy:
- `curl -sSI https://txt.zurag.be` → `HTTP/2 200`
- `curl -sS https://txt.zurag.be` → game HTML (unchanged)
- POST /guess still works as before
Task: dd07738f-6e58-4702-86c3-c43b85f236d2
Problem
curl -sSI https://txt.zurag.besends a HEAD request. The server only handledGETandPOST, so HEAD fell through to the catch-all404handler — blocking the acceptance criterion even though the site was fully functional for browsers and game play.Change
Single-line fix in the
GET /handler:HEAD gets the same 200 +
Content-Typeheaders as GET; body is empty (correct per RFC 7231).Test plan
After merge + pipeline redeploy:
curl -sSI https://txt.zurag.be→HTTP/2 200curl -sS https://txt.zurag.be→ game HTML (unchanged)Task: dd07738f-6e58-4702-86c3-c43b85f236d2
0139527147olarak birleştirildi.