HADOOP-11859. PseudoAuthenticationHandler fails with httpcomponents v4.4. Contributed by Eugene Koifman.

This commit is contained in:
Jitendra Pandey 2015-04-22 09:59:12 -07:00
parent fad9d7e85b
commit 1f4767c7f2
2 changed files with 8 additions and 1 deletions

View File

@ -142,7 +142,11 @@ public boolean managementOperation(AuthenticationToken token,
} }
private String getUserName(HttpServletRequest request) { private String getUserName(HttpServletRequest request) {
List<NameValuePair> list = URLEncodedUtils.parse(request.getQueryString(), UTF8_CHARSET); String queryString = request.getQueryString();
if(queryString == null || queryString.length() == 0) {
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 (PseudoAuthenticator.USER_NAME.equals(nv.getName())) { if (PseudoAuthenticator.USER_NAME.equals(nv.getName())) {

View File

@ -533,6 +533,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11846 TestCertificateUtil.testCorruptPEM failing on Jenkins JDK8. HADOOP-11846 TestCertificateUtil.testCorruptPEM failing on Jenkins JDK8.
(Larry McCay via stevel) (Larry McCay via stevel)
HADOOP-11859. PseudoAuthenticationHandler fails with httpcomponents v4.4.
(Eugene Koifman via jitendra)
Release 2.7.1 - UNRELEASED Release 2.7.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES