shanyu opened a new pull request #317:
URL: https://github.com/apache/incubator-livy/pull/317


   ## What changes were proposed in this pull request?
   Fix LivyConnection to properly fill in credentials for HTTP request.
   
   If using special characters, e.g. '+' in livy password to run livy 
integration tests, creating HttpClient will result in 401 Unauthorized error. 
   
   The problem is in LivyConnection.java, it is using URLDecoder.decode() to 
decode the userInfo we get from uri.getUserInfo(). Note that uri.getUserInfo() 
is already decoded string, a further decode() call will result in wrong 
password (e.g. change '+' to ' ').
   
   The fix is to remove the decode() call to the string from uri.getUserInfo().
   
   ## How was this patch tested?
   Tested using livy integration test to test against external cluster with 
HTTP basic auth.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to