Merge pull request #292 from fnproject/get-body

stop forcing GET bodies through ?payload
This commit is contained in:
Reed Allman
2017-09-06 11:26:23 -07:00
committed by GitHub
2 changed files with 0 additions and 8 deletions

View File

@@ -38,7 +38,6 @@ import (
// TODO all Datastore methods need to take unit of tenancy (app or route) at least (e.g. not just call id)
// TODO limit the request body length when making calls
// TODO discuss concrete policy for hot launch or timeout / timeout vs time left
// TODO can we get rid of 'GET url?payload' weirdness?
// TODO call env need to be map[string][]string to match headers behavior...
// TODO it may be nice to have an interchange type for Dispatch that can have
// all the info we need to build e.g. http req, grpc req, json, etc. so that

View File

@@ -3,7 +3,6 @@ package server
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"path"
"strings"
@@ -27,12 +26,6 @@ func (s *Server) handleRequest(c *gin.Context) {
ctx := c.Request.Context()
if c.Request.Method == "GET" {
// TODO we _could_ check the normal body, this is still weird
// TODO do we need to flush the original body if we do this? (hint: yes)
c.Request.Body = ioutil.NopCloser(strings.NewReader(c.Request.URL.Query().Get("payload")))
}
r, routeExists := c.Get(api.Path)
if !routeExists {
r = "/"