Lesson 6.3

HEAD without the body

Why HEAD is GET with the body bytes withheld, and the one Response field that makes the head byte-honest while the body never leaves.

26 minsrc/response.js
  • State the HTTP contract for HEAD and this framework's stricter same-headers policy.
  • Explain why auto-HEAD selects the GET route instead of synthesizing an empty response.
  • Add res._headOnly and suppress the body write in _send without touching the head.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth