dcsunny 4 년 전
부모
커밋
064dc4194d
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      http/handle.go

+ 2 - 1
http/handle.go

@@ -214,9 +214,10 @@ func contentSubtype(contentType string) string {
 	}
 }
 
-func SetBody(ctx context.Context, r *http.Request) {
+func SetBody(ctx context.Context, r *http.Request) context.Context {
 	b, _ := ioutil.ReadAll(r.Body)
 	if len(b) > 0 {
 		ctx = context2.AppendToContext(ctx, "body", b)
 	}
+	return ctx
 }