mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-12-06 17:18:54 +08:00
修复HttpRequest.sendRedirectIfPossible未对308做判断问题。(issue#4053@Github)
This commit is contained in:
parent
f2686560fb
commit
399614715b
@ -2,7 +2,7 @@
|
|||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.41(2025-08-30)
|
# 5.8.41(2025-09-03)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【core 】 增加`WeakKeyValueConcurrentMap`及其关联类,同时废弃`WeakConcurrentMap`并替换(issue#4039@Github)
|
* 【core 】 增加`WeakKeyValueConcurrentMap`及其关联类,同时废弃`WeakConcurrentMap`并替换(issue#4039@Github)
|
||||||
@ -16,6 +16,7 @@
|
|||||||
* 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题(issue#4039@Github)
|
* 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题(issue#4039@Github)
|
||||||
* 【db 】 修复`Condition`的`Condition("discount_end_time", "!=", (String) null)`方法生成SQL时,生成SQL不符合预期要求的错误(pr#4042@Github)
|
* 【db 】 修复`Condition`的`Condition("discount_end_time", "!=", (String) null)`方法生成SQL时,生成SQL不符合预期要求的错误(pr#4042@Github)
|
||||||
* 【core 】 修复`IoUtil`的`closeIfPosible`拼写错误,新建一个`closeIfPossible`方法,原方法标记deprecated(issue#4047@Github)
|
* 【core 】 修复`IoUtil`的`closeIfPosible`拼写错误,新建一个`closeIfPossible`方法,原方法标记deprecated(issue#4047@Github)
|
||||||
|
* 【http 】 修复`HttpRequest.sendRedirectIfPossible`未对308做判断问题。(issue#4053@Github)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.40(2025-08-26)
|
# 5.8.40(2025-08-26)
|
||||||
|
|||||||
@ -1335,8 +1335,8 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
|||||||
setUrl(redirectUrl);
|
setUrl(redirectUrl);
|
||||||
// https://www.rfc-editor.org/rfc/rfc7231#section-6.4.7
|
// https://www.rfc-editor.org/rfc/rfc7231#section-6.4.7
|
||||||
// https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Redirections
|
// https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Redirections
|
||||||
// 307方法和消息主体都不发生变化。
|
// 307、308方法和消息主体都不发生变化。
|
||||||
if (HttpStatus.HTTP_TEMP_REDIRECT != responseCode) {
|
if (HttpStatus.HTTP_TEMP_REDIRECT != responseCode && HttpStatus.HTTP_PERMANENT_REDIRECT != responseCode) {
|
||||||
// 重定向默认使用GET
|
// 重定向默认使用GET
|
||||||
method(Method.GET);
|
method(Method.GET);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user