hertz icon indicating copy to clipboard operation
hertz copied to clipboard

[Question]: How do I implement a Java servlet-like forward with the URL address unchanged?

Open springrain opened this issue 3 years ago • 5 comments

Describe the Question

How do I implement a Java servlet-like forward with the URL address unchanged?

Reproducible Code

c.Redirect(consts.StatusFound, []byte("/test"))

Expected behavior

Redirect jump, URL address remains unchanged Although redirected now, the browser URL has also changed

Hertz version:

0.6.2

Environment:

The output of go env.

Additional context

Add any other context about the question here.

springrain avatar Apr 14 '23 03:04 springrain

same to https://github.com/cloudwego/hertz/pull/469

li-jin-gou avatar Apr 14 '23 03:04 li-jin-gou

Hello @springrain If you are using it in production environment, could you pls register https://github.com/cloudwego/hertz/issues/73? If so, we can raise the priority a little.

li-jin-gou avatar Apr 14 '23 03:04 li-jin-gou

Hi @springrain I will be re-developing handleContext in the near future, does it meet your needs?

li-jin-gou avatar May 11 '23 04:05 li-jin-gou

Thank you very much, I need this feature, but there is no rush

springrain avatar May 12 '23 08:05 springrain

Thank you very much, I need this feature, but there is no rush

ok

li-jin-gou avatar May 12 '23 09:05 li-jin-gou