Skip to content

307 Temporary Redirect #818

@wsrer

Description

@wsrer

Describe the bug

The request sent by the front-end was corresponding to 307, but my backend code does not define it that way

To Reproduce
I have defined routers like the following

func register(r *route.RouterGroup) {
    bucketService := impl.NewBucketService()

    storeGroup := r.Group("/store", pastoMw)
    {
        bucketSubGroup := storeGroup.Group("/bucket")
        {
            bucketSubGroup.POST("/", bucketService.AddBucket) 
        }
    }
}

Expected behavior

API should be requested normally

Screenshots
The request sent by the front-end has been responded to 307
image

image

Hertz version:
0.6.4

Environment:

The output of go env.

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=D:\tmp\go-build
set GOENV=C:\Users\27371\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\workspace\Projects\GolandProjects\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\workspace\Projects\GolandProjects
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\workspace\Projects\GolandProjects\go1.19.5
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\workspace\Projects\GolandProjects\go1.19.5\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19.5
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=D:\workspace\Projects\GolandProjects\src\qiankun-oss\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=D:\tmp\sys\go-build3649694551=/tmp/go-build -gno-record-gcc-switches  

Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersquestionFurther information is requested

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions