Lesson 6.4
Method semantics - auto-HEAD, OPTIONS, and 405
The four cases App.handle must tell apart, the Allow header derivation, and the bodyless OPTIONS 204 hand-coded to the exact form a later chapter will formalize.
What you will build
- Enumerate the four method cases and route each to the right response.
- Derive the Allow header - registered methods, plus HEAD if GET, plus OPTIONS, sorted.
- Synthesize a bodyless 204 for OPTIONS with no content-length line.
- Suppress every HEAD body, wire auto-HEAD through GET, and answer 405 versus 404 correctly.