diff --git a/happstack-fastcgi.cabal b/happstack-fastcgi.cabal
--- a/happstack-fastcgi.cabal
+++ b/happstack-fastcgi.cabal
@@ -1,5 +1,5 @@
 Name: happstack-fastcgi
-Version: 0.1.1
+Version: 0.1.2
 Copyright: Tupil
 Maintainer: ce [at] tupil.com, eml [at] tupil.com
 License: BSD3
diff --git a/src/Happstack/Server/FastCGI.hs b/src/Happstack/Server/FastCGI.hs
--- a/src/Happstack/Server/FastCGI.hs
+++ b/src/Happstack/Server/FastCGI.hs
@@ -81,39 +81,43 @@
 -- | Look up a String in the cgiVars, returning the empty string if the key is not present
 str k v   = withDef "" (v ? k)
 
+-- | Append if the list is not empty
+x ?: [] = []
+x ?: xs = x : xs
+
 cgiUri :: CGIRequest -> String
-cgiUri = str "REQUEST_URI"
+cgiUri x = str "PATH_INFO" x ++ cgiQuery x
 
 cgiMethod :: CGIRequest -> Method
-cgiMethod x = withDef GET $ (x ? "HTTP_METHOD") >>= maybeRead
+cgiMethod x = withDef GET $ (x ? "REQUEST_METHOD") >>= maybeRead
 
 cgiPaths :: CGIRequest -> [String]
 cgiPaths = split '/' . str "PATH_INFO"
 
 cgiQuery :: CGIRequest -> String
-cgiQuery    x = '?':(str "QUERY_STRING" x)
+cgiQuery x = '?' ?: (str "QUERY_STRING" x)
 
 cgiInputs :: CGI [(String, Input)]
 cgiInputs = getInputNames >>= mapM toHappstackInput
 
 cgiCookies :: CGIRequest -> [(String, H.Cookie)]
-cgiCookies    = map cookieWithName . either (const []) id . parseCookies . str "HTTP_COOKIE"
+cgiCookies = map cookieWithName . either (const []) id . parseCookies . str "HTTP_COOKIE"
 
 cgiVersion :: CGIRequest -> Version
-cgiVersion    = parseProtocol . str "SERVER_PROTOCOL"
+cgiVersion = parseProtocol . str "SERVER_PROTOCOL"
 
 cgiHeaders :: CGIRequest -> Headers
-cgiHeaders  = mkHeaders 
-            . mapKeys   (replace '_' '-' . drop (length httpPrefix))
-            . filterKey (isPrefixOf httpPrefix) 
-            . M.toList
-            . cgiVars
+cgiHeaders = mkHeaders 
+           . mapKeys   (replace '_' '-' . drop (length httpPrefix))
+           . filterKey (isPrefixOf httpPrefix) 
+           . M.toList
+           . cgiVars
 
 cgiBody :: CGIRequest -> RqBody
-cgiBody    = Body . cgiRequestBody
+cgiBody = Body . cgiRequestBody
 
 cgiPeer :: CGIRequest -> (String, Int)
-cgiPeer  r = (str "REMOTE_ADDR" r, withDef 0 (r ? "REMOTE_PORT" >>= maybeRead)) -- TODO
+cgiPeer r = (str "REMOTE_ADDR" r, withDef 0 (r ? "REMOTE_PORT" >>= maybeRead)) -- TODO
 
 
 -- | Replace x by y in a map
