Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重定向后URL的Query参数会重复增加 #197

Open
superBiuBiuMan opened this issue Apr 3, 2024 · 0 comments
Open

重定向后URL的Query参数会重复增加 #197

superBiuBiuMan opened this issue Apr 3, 2024 · 0 comments

Comments

@superBiuBiuMan
Copy link

在gitee上看到了这个问题,现在依旧有这个问题好像
使用

        <dependency>
            <groupId>com.dtflys.forest</groupId>
            <artifactId>forest-spring-boot-starter</artifactId>
            <version>1.5.36</version>
        </dependency>

测试代码

  try{
            ForestRequest<?> forestRequest = Forest.get("http://hsw00.com/x2/?fromuid=2613");
            String execute = forestRequest.executeAsString();
        }catch (Exception e){
            e.printStackTrace();
        }

可以执行上面这段代码,
在浏览器里面,
首次访问http://hsw00.com/x2/?fromuid=2613会301
重定向到访问http://hsw00.com/x2/portal.php?fromuid=2613

2024-04-03 15:52:43.450 [Forest] Http Backend: okhttp3
2024-04-03 15:52:43.541 [Forest] Request (okhttp3): 
	GET http://hsw00.com/x2/?fromuid=2613 HTTP
	Headers: 
		User-Agent: forest/1.5.36
2024-04-03 15:52:44.121 [Forest] Response: Status = 301, Time = 569ms
2024-04-03 15:52:44.124 [Forest] Request (okhttp3): 
	[Redirect]: From GET http://hsw00.com/x2/ -> 301
	GET http://hsw00.com/portal.php?fromuid=2613?fromuid=2613 HTTP
	Headers: 
		User-Agent: forest/1.5.36
2024-04-03 15:52:44.394 [Forest] Response: Status = 404, Time = 270ms

日志显示访问到了http://hsw00.com/portal.php?fromuid=2613?fromuid=2613
参数被重复了....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant