This commit is contained in:
Looly
2022-03-29 23:57:03 +08:00
parent 64fdf75fc6
commit 0d9185a98d
3 changed files with 15 additions and 2 deletions

View File

@@ -1166,7 +1166,7 @@ public class HttpRequest extends HttpBase<HttpRequest> {
* 对于非rest的GET请求且处于重定向时参数丢弃
*/
private void urlWithParamIfGet() {
if (Method.GET.equals(method) && false == this.isRest && this.redirectCount > 0) {
if (Method.GET.equals(method) && false == this.isRest && this.redirectCount <= 0) {
// 优先使用body形式的参数不存在使用form
if (ArrayUtil.isNotEmpty(this.bodyBytes)) {
this.url.getQuery().parse(StrUtil.str(this.bodyBytes, this.charset), this.charset);