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
c7159f0240
commit
22ff9e68d1
@ -216,8 +216,11 @@ protected void setHandlerAuthMethod(SaslRpcServer.AuthMethod authMethod) {
|
|||||||
|
|
||||||
@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())) {
|
||||||
|
@ -462,12 +462,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,11 +423,14 @@ private void methodAction(final HttpServletRequest req,
|
|||||||
|
|
||||||
// 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);
|
||||||
for (NameValuePair pair : queryPairs) {
|
String queryString = req.getQueryString();
|
||||||
builder.queryParam(pair.getName(), pair.getValue());
|
if (queryString != null) {
|
||||||
|
List<NameValuePair> queryPairs =
|
||||||
|
URLEncodedUtils.parse(queryString, null);
|
||||||
|
for (NameValuePair pair : queryPairs) {
|
||||||
|
builder.queryParam(pair.getName(), pair.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
URI toFetch = builder.path(rest).build();
|
URI toFetch = builder.path(rest).build();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user