Skip to content

Commit 6cd7fd2

Browse files
authored
Merge pull request #232 from devfeel/develop
fixed can not get correct Path which in Post requests
2 parents 293319f + b888ad7 commit 6cd7fd2

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

example/router/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func Index(ctx dotweb.Context) error {
4343

4444
func Any(ctx dotweb.Context) error {
4545
ctx.Response().Header().Set("Content-Type", "text/html; charset=utf-8")
46-
return ctx.WriteString("any - " + ctx.Request().Method)
46+
return ctx.WriteString("any - " + ctx.Request().Method + " - " + ctx.RouterNode().Path())
4747
}
4848

4949
func HandlerFunc(w http.ResponseWriter, r *http.Request) {

tree.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ func (n *Node) addRoute(path string, handle RouterHandle, m ...Middleware) (outn
151151
if i < len(n.path) {
152152
child := Node{
153153
path: n.path[i:],
154+
fullPath: n.fullPath,
154155
wildChild: n.wildChild,
155156
nType: static,
156157
indices: n.indices,

version.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## dotweb版本记录:
22

33

4+
#### Version 1.7.13
5+
* fix: fixed can not get correct Path which in Post requests
6+
* 2020-08-11 18:00 at ShangHai
7+
48
#### Version 1.7.12
59
* fix: fix error when set HttpServer.SetEnabledGzip(true)
610
* add Happy 6.1 print

0 commit comments

Comments
 (0)