stop forcing GET bodies through ?payload

it's unclear why we had this behavior in the first place, but alas, no more.

closes #264
This commit is contained in:
Reed Allman
2017-09-05 13:59:42 -07:00
parent 8180dca842
commit 4569b7fd69
2 changed files with 0 additions and 8 deletions

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 = "/"