Fixed issue where REQUEST_URI is not defined

e.g. in tests
Merge pull request #134 from jmsche/patch-2

Fixed issue where REQUEST_URI is not defined