[script]版本1.0-beta.4修改为1.0-beta.5

This commit is contained in:
tomsun28
2022-03-09 15:21:00 +08:00
parent eca634bd55
commit a6038d1feb
3 changed files with 4 additions and 6 deletions

View File

@@ -406,10 +406,10 @@ public class HttpCollectImpl extends AbstractCollect {
}
}
}
//The default request header can be overridden if customized
// The default request header can be overridden if customized
// keep-alive
requestBuilder.addHeader(HttpHeaders.CONNECTION, "keep-alive");
requestBuilder.addHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36");
requestBuilder.addHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT 6.1; WOW64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36");
// headers The custom request header is overwritten here
Map<String, String> headers = httpProtocol.getHeaders();
if (headers != null && !headers.isEmpty()) {
@@ -419,8 +419,6 @@ public class HttpCollectImpl extends AbstractCollect {
}
}
}
// keep-alive
requestBuilder.addHeader(HttpHeaders.CONNECTION, "keep-alive");
// add accept
if (DispatchConstants.PARSE_DEFAULT.equals(httpProtocol.getParseType())
|| DispatchConstants.PARSE_JSON_PATH.equals(httpProtocol.getParseType())) {