From d004e380bcbcfcc49da2a23d2da48f4c327aa0ff Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 1 Nov 2016 15:58:58 -0400 Subject: read PUT body --- src/edit/dir.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/edit/dir.go b/src/edit/dir.go index bc6ef6c..c1e7cca 100644 --- a/src/edit/dir.go +++ b/src/edit/dir.go @@ -3,6 +3,7 @@ package main import ( "fmt" "time" + "io/ioutil" "net/http" "path" "strings" @@ -52,7 +53,8 @@ func ServeGit(out http.ResponseWriter, in *http.Request) { if msg == "" { msg = fmt.Sprintf("web edit: create/modify %q", upath) } - var content []byte // TODO + content, err := ioutil.ReadAll(in.Body) + errcheck(err) edit := Edit{ UserName: userinfo.Name, UserEmail: username+"@edit.team4272.com", -- cgit v1.2.3