Merge branch 'v6-dev' of gitee.com:dromara/hutool into v6-dev

This commit is contained in:
Looly 2024-12-05 10:39:30 +08:00
commit e27fdb2a6c

View File

@ -363,12 +363,16 @@ public interface HttpStatus {
if(responseCode < 300){ if(responseCode < 300){
return false; return false;
} }
return responseCode == HTTP_MOVED_PERM switch (responseCode){
|| responseCode == HTTP_MOVED_TEMP case HTTP_MOVED_PERM:
|| responseCode == HTTP_SEE_OTHER case HTTP_MOVED_TEMP:
// issue#1504@Github307和308是RFC 7538中http 1.1定义的规范 case HTTP_SEE_OTHER:
|| responseCode == HTTP_TEMP_REDIRECT // issue#1504@Github307和308是RFC 7538中http 1.1定义的规范
|| responseCode == HTTP_PERMANENT_REDIRECT; case HTTP_TEMP_REDIRECT:
case HTTP_PERMANENT_REDIRECT:
return true;
default:
return false;
}
} }
} }