As you've read the RFC, maybe you can tell us what parts of chapter 3, Invoking the Script you've already implemented, and where your server still fails.
Update: Chapter 4.1, Request Meta-Variables tells me:
Meta-variables contain data about the request passed from the server
to the script, and are accessed by the script in a system-defined
manner.
The traditional system-defined manner is using the environment (%ENV) to pass these values. See also chapter 7, which discusses the different operating systems and their system-defined ways of communicating the variables to the child process.