I think it is lighttpd itself that sets it. Note that older versions of lighttpd do not support CWD [can't remember the exact version break]. It is set to the current working directory when lighttpd was called.
Keep up to date with Rails on Twitter and This Week in Rails
Policies: Conduct, License, Maintenance, Security, Trademarks