Merge pull request #88 from GoogleCloudPlatform/emptyreq
restore body of requests before calling handlers
diff --git a/endpoints/auth.go b/endpoints/auth.go
index c143f81..36a9f60 100644
--- a/endpoints/auth.go
+++ b/endpoints/auth.go
@@ -10,6 +10,7 @@
"io/ioutil"
"math/big"
"net/http"
+ "os"
"regexp"
"strconv"
"strings"
@@ -560,7 +561,8 @@
}
func init() {
- if appengine.IsDevAppServer() {
+ // TODO(jbd): Replace it with appengine.IsDevAppServer when it's implemented.
+ if os.Getenv("RUN_WITH_DEVAPPSERVER") != "" {
ContextFactory = tokeninfoContextFactory
} else {
ContextFactory = cachingContextFactory