|
@@ -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
|
|
// keep-alive
|
|
|
requestBuilder.addHeader(HttpHeaders.CONNECTION, "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
|
|
// headers The custom request header is overwritten here
|
|
|
Map<String, String> headers = httpProtocol.getHeaders();
|
|
Map<String, String> headers = httpProtocol.getHeaders();
|
|
|
if (headers != null && !headers.isEmpty()) {
|
|
if (headers != null && !headers.isEmpty()) {
|
|
@@ -419,8 +419,6 @@ public class HttpCollectImpl extends AbstractCollect {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // keep-alive
|
|
|
|
|
- requestBuilder.addHeader(HttpHeaders.CONNECTION, "keep-alive");
|
|
|
|
|
// add accept
|
|
// add accept
|
|
|
if (DispatchConstants.PARSE_DEFAULT.equals(httpProtocol.getParseType())
|
|
if (DispatchConstants.PARSE_DEFAULT.equals(httpProtocol.getParseType())
|
|
|
|| DispatchConstants.PARSE_JSON_PATH.equals(httpProtocol.getParseType())) {
|
|
|| DispatchConstants.PARSE_JSON_PATH.equals(httpProtocol.getParseType())) {
|