1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-12-08 22:27:31 +08:00
parent 6540f3f3f1
commit 66033654c5
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package web package web
import ( import (
"io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
@ -169,7 +170,9 @@ func _serve_handle(key string, cmd *ice.Command, m *ice.Message, w http.Response
} }
switch kit.Select("", kit.Split(r.Header.Get(html.ContentType)), 0) { switch kit.Select("", kit.Split(r.Header.Get(html.ContentType)), 0) {
case html.ApplicationJSON: case html.ApplicationJSON:
kit.For(kit.UnMarshal(r.Body), func(k string, v ice.Any) { m.Optionv(k, v) }) buf, _ := ioutil.ReadAll(r.Body)
m.Option("request.data", string(buf))
kit.For(kit.UnMarshal(string(buf)), func(k string, v ice.Any) { m.Optionv(k, v) })
default: default:
r.ParseMultipartForm(kit.Int64(kit.Select("4096", r.Header.Get(html.ContentLength)))) r.ParseMultipartForm(kit.Int64(kit.Select("4096", r.Header.Get(html.ContentLength))))
kit.For(r.PostForm, func(k string, v []string) { _log(FORM, k, kit.Join(v, lex.SP)).Optionv(k, v) }) kit.For(r.PostForm, func(k string, v []string) { _log(FORM, k, kit.Join(v, lex.SP)).Optionv(k, v) })

View File

@ -79,6 +79,7 @@ func _go_show(m *ice.Message, arg ...string) {
"gonganxitong/user.go", "gonganxitong/user.go",
"gonganxitong/domain.go", "gonganxitong/domain.go",
"gonganxitong/command.go", "gonganxitong/command.go",
"gonganxitong/quotalist.go",
) { ) {
if cmd := ctx.GetFileCmd(p); cmd != "" { if cmd := ctx.GetFileCmd(p); cmd != "" {
if m.ActionKey() == mdb.RENDER { if m.ActionKey() == mdb.RENDER {