]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/http.go
More reliable and simpler PATH_INFO parse
[sgblog.git] / cmd / sgblog / http.go
index f81e38eb4075302fcf730473c9a0389a46e7f179..9f39171c4c962943afff958ccb486b8d54ba6999 100644 (file)
@@ -171,8 +171,8 @@ func serveHTTP() {
                log.Fatalln(err)
        }
 
-       pathInfo, exists := os.LookupEnv("PATH_INFO")
-       if !exists {
+       pathInfo := os.Getenv("PATH_INFO")
+       if len(pathInfo) == 0 {
                pathInfo = "/"
        }
        queryValues, err := url.ParseQuery(os.Getenv("QUERY_STRING"))