diff --git a/AGENTS.md b/AGENTS.md index 8189162..72993a7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -247,7 +247,7 @@ After making all changes: ## TASK B: Add a new framework -Adding a framework requires creating **3 files** in a new directory. No existing files need modification. +Adding a framework requires creating **3 files** in a new directory, plus a **documentation page** on the website. ### Step 1 — Create the server directory @@ -302,6 +302,39 @@ Create `src/Servers/YourServer/probe.json` with exactly one field: This name appears in the leaderboard and PR comments. +### Step 5 — Create the server documentation page + +**File:** `docs/content/servers/{server-name-lowercase}.md` + +Use this template: + +```markdown +--- +title: "Server Name" +toc: false +breadcrumbs: false +--- + +**Language:** Language · [View source on GitHub](https://github.com/MDA2AV/Http11Probe/tree/main/src/Servers/YourServer) + +## Dockerfile + +\```dockerfile +[Complete Dockerfile contents] +\``` + +## Source — `filename.ext` + +\```language +[Complete source file contents] +\``` +``` + +Rules: +- Include one `## Source — \`filename\`` section per source file (exclude `probe.json`). +- Use the correct syntax-highlight language for each code block (e.g., `python`, `javascript`, `text`, `html`). +- The Dockerfile section always comes first, followed by source files. + ### Verification checklist 1. Build the Docker image: `docker build -f src/Servers/YourServer/Dockerfile -t yourserver .` diff --git a/CHANGELOG.md b/CHANGELOG.md index b4f755c..78c6de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,10 @@ All notable changes to Http11Probe are documented in this file. - `COMP-CONTENT-TYPE` — response with content should include Content-Type (RFC 9110 §8.3, SHOULD) ### Changed -- **AGENTS.md** — added Step 5 (RFC Requirement Dashboard) to the "Add a new test" task +- **AGENTS.md** — added Step 5 (RFC Requirement Dashboard) to the "Add a new test" task; added Step 5 (server documentation page) to the "Add a framework" task - **RFC Requirement Dashboard** — updated with all 9 new tests, counts, and cross-references - **Landing page cards** — removed hardcoded test count from RFC Requirement Dashboard subtitle +- **Caddy server** — fixed POST body echo using Caddy Parrot pattern; updated Caddyfile, Dockerfile, and docs page ## [2026-02-14] diff --git a/docs/content/servers/caddy.md b/docs/content/servers/caddy.md index e323e69..cc2e985 100644 --- a/docs/content/servers/caddy.md +++ b/docs/content/servers/caddy.md @@ -18,6 +18,18 @@ COPY src/Servers/CaddyServer/echo.html /srv/echo.html ```text :8080 { + request_body { + max_size 1MB + } + + @post_root { + method POST + path / + } + handle @post_root { + respond "{http.request.body}" 200 + } + handle /echo { root * /srv templates { @@ -26,6 +38,7 @@ COPY src/Servers/CaddyServer/echo.html /srv/echo.html rewrite * /echo.html file_server } + respond "OK" 200 } ``` diff --git a/src/Servers/CaddyServer/Caddyfile b/src/Servers/CaddyServer/Caddyfile index 2134c83..94eaab5 100644 --- a/src/Servers/CaddyServer/Caddyfile +++ b/src/Servers/CaddyServer/Caddyfile @@ -1,4 +1,16 @@ :8080 { + request_body { + max_size 1MB + } + + @post_root { + method POST + path / + } + handle @post_root { + respond "{http.request.body}" 200 + } + handle /echo { root * /srv templates { @@ -7,5 +19,6 @@ rewrite * /echo.html file_server } + respond "OK" 200 }