That is what I mention about  (almost) user-friendly component .. or let the coder do everything ... if looking for performance.

Here using 
page: WSF_PAGE_RESPONSE
create page
page.set_body ("Hello Reloaded World")
res.send (page)

(or similar code), this is will take care of content length and so on ...
but it requires an object creation, this is not really an issue here, but similar concerns could be important for critical server.