close request body
This commit is contained in:
parent
5fac31b9b4
commit
92e9797fe9
1 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,10 @@ type submitResponse struct {
|
|||
}
|
||||
|
||||
func (s *submitServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
// if we attempt to return a response without reading the request body,
|
||||
// haproxy gets upset and returns a 500. Let's try this.
|
||||
defer req.Body.Close()
|
||||
|
||||
if req.Method != "POST" && req.Method != "OPTIONS" {
|
||||
respond(405, w)
|
||||
return
|
||||
|
|
Reference in a new issue