diff --git a/client/client.go b/client/client.go index 1cb475d..14597fa 100644 --- a/client/client.go +++ b/client/client.go @@ -120,6 +120,7 @@ type houstonClient struct { func unmarshal[T any](val *T, src map[string]string) { argval := reflect.ValueOf(val) + logger.Println("operation receive :", argval.Type().Name(), src) for i := 0; i < argval.Elem().Type().NumField(); i++ { if !argval.Elem().Type().Field(i).IsExported() { continue diff --git a/client/deploy.go b/client/deploy.go index 69fa393..3befc93 100644 --- a/client/deploy.go +++ b/client/deploy.go @@ -21,7 +21,16 @@ import ( "golang.org/x/text/transform" ) -func download(dir string, urlpath string, accessToken string) (string, error) { +func download(dir string, urlpath string, accessToken string) (target string, err error) { + logger.Println("start downloading", dir, urlpath) + defer func() { + if err != nil { + logger.Println("downloading failed :", err) + } else { + logger.Println("downloading succeeded") + } + }() + parsed, err := url.Parse(urlpath) if err != nil { return "", err @@ -277,7 +286,6 @@ func (hc *houstonClient) deploy(req *shared.DeployRequest) error { return err } - logger.Println("start downloading", req.Url) // verpath에 배포 시작 fname, err := download(root, hc.makeDownloadUrl(req.Url), req.AccessToken) if err != nil { diff --git a/server/http_handler.go b/server/http_handler.go index 2eb16bb..1767992 100644 --- a/server/http_handler.go +++ b/server/http_handler.go @@ -121,8 +121,10 @@ func (h *houstonHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { var operation string if r.Method == "POST" { operation = r.FormValue("operation") + logger.Println("api called :", r.Form) } else { operation = r.URL.Query().Get("operation") + logger.Println("api called :", r.URL.Query()) } if len(operation) == 0 { @@ -138,10 +140,6 @@ func (h *houstonHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - if r.PostForm == nil { - r.ParseMultipartForm(defaultMaxMemory) - } - args := []reflect.Value{ reflect.ValueOf(h), reflect.ValueOf(w),