Lesson 6: Content length

Contents
  • Header alteration
  • Case insensitivity
  • Content length
  • Testing

At the end of lesson 5, we turned this HTTP response

HTTP/1.1 200 OK
Content-Type: text/plain; charset=us-ascii
Content-Length: 7

Hello!\n

into this Haskell expression:

There’s one more thing I want to improve: Let’s leave off that Content-Length header and have a function that adds it automatically.

Sign up for access to the full page, plus the complete archive and all the latest content.