mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Use UTF-8 when encoding authorization headers
This commit is contained in:
		
							parent
							
								
									a7ad9d4152
								
							
						
					
					
						commit
						b5efb1d664
					
				| @ -27,6 +27,7 @@ import com.owncloud.android.lib.common.OwnCloudClient; | |||||||
| import com.owncloud.android.lib.common.http.HttpClient; | import com.owncloud.android.lib.common.http.HttpClient; | ||||||
| import com.owncloud.android.lib.common.http.HttpConstants; | import com.owncloud.android.lib.common.http.HttpConstants; | ||||||
| import okhttp3.Credentials; | import okhttp3.Credentials; | ||||||
|  | import okhttp3.internal.Util; | ||||||
| 
 | 
 | ||||||
| public class OwnCloudBasicCredentials implements OwnCloudCredentials { | public class OwnCloudBasicCredentials implements OwnCloudCredentials { | ||||||
| 
 | 
 | ||||||
| @ -52,7 +53,7 @@ public class OwnCloudBasicCredentials implements OwnCloudCredentials { | |||||||
|         HttpClient.deleteHeaderForAllRequests(HttpConstants.COOKIE_HEADER); |         HttpClient.deleteHeaderForAllRequests(HttpConstants.COOKIE_HEADER); | ||||||
| 
 | 
 | ||||||
|         HttpClient.addHeaderForAllRequests(HttpConstants.AUTHORIZATION_HEADER, |         HttpClient.addHeaderForAllRequests(HttpConstants.AUTHORIZATION_HEADER, | ||||||
|                 Credentials.basic(mUsername, mPassword)); |                 Credentials.basic(mUsername, mPassword, Util.UTF_8)); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user