mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 10:27:45 +00:00 
			
		
		
		
	Fix some problems in authentication
This commit is contained in:
		
							parent
							
								
									50fda001ce
								
							
						
					
					
						commit
						e3db308825
					
				| @ -26,6 +26,7 @@ package com.owncloud.android.lib.common.http.interceptors; | ||||
| 
 | ||||
| import java.io.IOException; | ||||
| import java.util.ArrayList; | ||||
| import java.util.Iterator; | ||||
| 
 | ||||
| import okhttp3.Interceptor; | ||||
| import okhttp3.Request; | ||||
| @ -92,10 +93,12 @@ public class HttpInterceptor implements Interceptor { | ||||
|     } | ||||
| 
 | ||||
|     public void deleteRequestHeaderInterceptor(String headerName) { | ||||
|         for (RequestInterceptor requestInterceptor : mRequestInterceptors) { | ||||
|             if (requestInterceptor instanceof RequestHeaderInterceptor && | ||||
|                     ((RequestHeaderInterceptor) requestInterceptor).getHeaderName().equals(headerName)) { | ||||
|                 mRequestInterceptors.remove(requestInterceptor); | ||||
|         Iterator<RequestInterceptor> requestInterceptorIterator = mRequestInterceptors.iterator(); | ||||
|         while (requestInterceptorIterator.hasNext()) { | ||||
|             RequestInterceptor currentRequestInterceptor = requestInterceptorIterator.next(); | ||||
|             if (currentRequestInterceptor instanceof RequestHeaderInterceptor && | ||||
|                     ((RequestHeaderInterceptor) currentRequestInterceptor).getHeaderName().equals(headerName)) { | ||||
|                 requestInterceptorIterator.remove(); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user