Use scheme from WSGI environ

If somebody is using a scheme different from "http" (for example https)
the hardcoded "http" won't work. This change gets the scheme value from
the WSGI environment rather than hardcoding it.