Closed camlafit closed 7 years ago
Gitea have some issue about PUT/DELETE endpoint use teams/repos
https://github.com/go-gitea/gitea/blob/v1.1.1/routers/api/v1/api.go#L448 miss a /
And with this solved we get some error on PUT/DELETE query :
[Macaron] 2017-06-07 13:07:12: Started PUT /api/v1/teams/3/repos/_plugins_/pages for 88.190.92.83 [Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference /usr/local/go/src/runtime/panic.go:489 (0x42c42f) gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz)) /usr/local/go/src/runtime/panic.go:63 (0x42b2de) panicmem: panic(memoryError) /usr/local/go/src/runtime/signal_unix.go:290 (0x441aaf) sigpanic: panicmem() /root/GO/src/code.gitea.io/gitea/routers/api/v1/api.go:130 (0xf5d7aa) /usr/local/go/src/runtime/asm_amd64.s:514 (0x4592f8) call32: CALLFN(·call32, 32) /usr/local/go/src/reflect/value.go:434 (0x4bba9f) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/local/go/src/reflect/value.go:302 (0x4bb064) Value.Call: return v.call("Call", in) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x8632af) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x862c7a) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x88ff72) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x88fe96) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:186 (0x8e75d0) /usr/local/go/src/runtime/asm_amd64.s:514 (0x4592f8) call32: CALLFN(·call32, 32) /usr/local/go/src/reflect/value.go:434 (0x4bba9f) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/local/go/src/reflect/value.go:302 (0x4bb064) Value.Call: return v.call("Call", in) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x8632af) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x862c7a) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x88ff72) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x88fe96) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x8a2ffb) /usr/local/go/src/runtime/asm_amd64.s:514 (0x4592f8) call32: CALLFN(·call32, 32) /usr/local/go/src/reflect/value.go:434 (0x4bba9f) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/local/go/src/reflect/value.go:302 (0x4bb064) Value.Call: return v.call("Call", in) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x8632af) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x862c7a) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x88ff72) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x88fe96) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:43 (0x8a22b4) /usr/local/go/src/runtime/asm_amd64.s:514 (0x4592f8) call32: CALLFN(·call32, 32) /usr/local/go/src/reflect/value.go:434 (0x4bba9f) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/local/go/src/reflect/value.go:302 (0x4bb064) Value.Call: return v.call("Call", in) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x8632af) /root/GO/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x862c7a) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x88ff72) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:184 (0x8a42c9) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:288 (0x89c3ad) /root/GO/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/macaron.go:177 (0x8943dc) /root/GO/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0xa83cbb) /usr/local/go/src/net/http/server.go:1942 (0x716a44) HandlerFunc.ServeHTTP: f(w, r) /usr/local/go/src/net/http/server.go:2568 (0x719302) serverHandler.ServeHTTP: handler.ServeHTTP(rw, req) /usr/local/go/src/net/http/server.go:1825 (0x7155b2) (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req) /usr/local/go/src/runtime/asm_amd64.s:2197 (0x45bab1) goexit: BYTE $0x90 // NOP [Macaron] 2017-06-07 13:07:13: Completed /api/v1/teams/3/repos/_plugins_/pages 500 Internal Server Error in 25.843724ms
Ok
On master it's only / missing. Error log are related 1.1.1 version
Description
Gitea have some issue about PUT/DELETE endpoint use teams/repos
https://github.com/go-gitea/gitea/blob/v1.1.1/routers/api/v1/api.go#L448 miss a /
And with this solved we get some error on PUT/DELETE query :