HADOOP-12767. Update apache httpclient version to 4.5.2; httpcore to 4.4.4. Artem Aliev via stevel.
This commit is contained in:
parent
726c1f14b8
commit
7a001ae19b
|
@ -216,8 +216,11 @@ public class DelegationTokenAuthenticationFilter
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static String getDoAs(HttpServletRequest request) {
|
static String getDoAs(HttpServletRequest request) {
|
||||||
List<NameValuePair> list = URLEncodedUtils.parse(request.getQueryString(),
|
String queryString = request.getQueryString();
|
||||||
UTF8_CHARSET);
|
if (queryString == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<NameValuePair> list = URLEncodedUtils.parse(queryString, UTF8_CHARSET);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
for (NameValuePair nv : list) {
|
for (NameValuePair nv : list) {
|
||||||
if (DelegationTokenAuthenticatedURL.DO_AS.
|
if (DelegationTokenAuthenticatedURL.DO_AS.
|
||||||
|
|
|
@ -45,8 +45,11 @@ class ServletUtils {
|
||||||
*/
|
*/
|
||||||
public static String getParameter(HttpServletRequest request, String name)
|
public static String getParameter(HttpServletRequest request, String name)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
List<NameValuePair> list = URLEncodedUtils.parse(request.getQueryString(),
|
String queryString = request.getQueryString();
|
||||||
UTF8_CHARSET);
|
if (queryString == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<NameValuePair> list = URLEncodedUtils.parse(queryString, UTF8_CHARSET);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
for (NameValuePair nv : list) {
|
for (NameValuePair nv : list) {
|
||||||
if (name.equals(nv.getName())) {
|
if (name.equals(nv.getName())) {
|
||||||
|
|
|
@ -457,12 +457,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>4.2.5</version>
|
<version>4.5.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpcore</artifactId>
|
<artifactId>httpcore</artifactId>
|
||||||
<version>4.2.5</version>
|
<version>4.4.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
|
|
|
@ -423,12 +423,15 @@ public class WebAppProxyServlet extends HttpServlet {
|
||||||
|
|
||||||
// Append the user-provided path and query parameter to the original
|
// Append the user-provided path and query parameter to the original
|
||||||
// tracking url.
|
// tracking url.
|
||||||
List<NameValuePair> queryPairs =
|
|
||||||
URLEncodedUtils.parse(req.getQueryString(), null);
|
|
||||||
UriBuilder builder = UriBuilder.fromUri(trackingUri);
|
UriBuilder builder = UriBuilder.fromUri(trackingUri);
|
||||||
|
String queryString = req.getQueryString();
|
||||||
|
if (queryString != null) {
|
||||||
|
List<NameValuePair> queryPairs =
|
||||||
|
URLEncodedUtils.parse(queryString, null);
|
||||||
for (NameValuePair pair : queryPairs) {
|
for (NameValuePair pair : queryPairs) {
|
||||||
builder.queryParam(pair.getName(), pair.getValue());
|
builder.queryParam(pair.getName(), pair.getValue());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
URI toFetch = builder.path(rest).build();
|
URI toFetch = builder.path(rest).build();
|
||||||
|
|
||||||
LOG.info("{} is accessing unchecked {}"
|
LOG.info("{} is accessing unchecked {}"
|
||||||
|
|
Loading…
Reference in New Issue