Skip to content

Commit 53a8623

Browse files
authored
Merge pull request #56 from MDA2AV/fix/caddy-implementation
Fix Caddy, improve AGENTS.md for external AI contributions
2 parents f7f7d5e + 82033eb commit 53a8623

4 files changed

Lines changed: 62 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ After making all changes:
247247

248248
## TASK B: Add a new framework
249249

250-
Adding a framework requires creating **3 files** in a new directory. No existing files need modification.
250+
Adding a framework requires creating **3 files** in a new directory, plus a **documentation page** on the website.
251251

252252
### Step 1 — Create the server directory
253253

@@ -302,6 +302,39 @@ Create `src/Servers/YourServer/probe.json` with exactly one field:
302302

303303
This name appears in the leaderboard and PR comments.
304304

305+
### Step 5 — Create the server documentation page
306+
307+
**File:** `docs/content/servers/{server-name-lowercase}.md`
308+
309+
Use this template:
310+
311+
```markdown
312+
---
313+
title: "Server Name"
314+
toc: false
315+
breadcrumbs: false
316+
---
317+
318+
**Language:** Language · [View source on GitHub](https://github.com/MDA2AV/Http11Probe/tree/main/src/Servers/YourServer)
319+
320+
## Dockerfile
321+
322+
\```dockerfile
323+
[Complete Dockerfile contents]
324+
\```
325+
326+
## Source — `filename.ext`
327+
328+
\```language
329+
[Complete source file contents]
330+
\```
331+
```
332+
333+
Rules:
334+
- Include one `## Source — \`filename\`` section per source file (exclude `probe.json`).
335+
- Use the correct syntax-highlight language for each code block (e.g., `python`, `javascript`, `text`, `html`).
336+
- The Dockerfile section always comes first, followed by source files.
337+
305338
### Verification checklist
306339

307340
1. Build the Docker image: `docker build -f src/Servers/YourServer/Dockerfile -t yourserver .`

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ All notable changes to Http11Probe are documented in this file.
1717
- `COMP-CONTENT-TYPE` — response with content should include Content-Type (RFC 9110 §8.3, SHOULD)
1818

1919
### Changed
20-
- **AGENTS.md** — added Step 5 (RFC Requirement Dashboard) to the "Add a new test" task
20+
- **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
2121
- **RFC Requirement Dashboard** — updated with all 9 new tests, counts, and cross-references
2222
- **Landing page cards** — removed hardcoded test count from RFC Requirement Dashboard subtitle
23+
- **Caddy server** — fixed POST body echo using Caddy Parrot pattern; updated Caddyfile, Dockerfile, and docs page
2324

2425
## [2026-02-14]
2526

docs/content/servers/caddy.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ COPY src/Servers/CaddyServer/echo.html /srv/echo.html
1818

1919
```text
2020
:8080 {
21+
request_body {
22+
max_size 1MB
23+
}
24+
25+
@post_root {
26+
method POST
27+
path /
28+
}
29+
handle @post_root {
30+
respond "{http.request.body}" 200
31+
}
32+
2133
handle /echo {
2234
root * /srv
2335
templates {
@@ -26,6 +38,7 @@ COPY src/Servers/CaddyServer/echo.html /srv/echo.html
2638
rewrite * /echo.html
2739
file_server
2840
}
41+
2942
respond "OK" 200
3043
}
3144
```

src/Servers/CaddyServer/Caddyfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
:8080 {
2+
request_body {
3+
max_size 1MB
4+
}
5+
6+
@post_root {
7+
method POST
8+
path /
9+
}
10+
handle @post_root {
11+
respond "{http.request.body}" 200
12+
}
13+
214
handle /echo {
315
root * /srv
416
templates {
@@ -7,5 +19,6 @@
719
rewrite * /echo.html
820
file_server
921
}
22+
1023
respond "OK" 200
1124
}

0 commit comments

Comments
 (0)