mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +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.io.IOException; | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
|  | import java.util.Iterator; | ||||||
| 
 | 
 | ||||||
| import okhttp3.Interceptor; | import okhttp3.Interceptor; | ||||||
| import okhttp3.Request; | import okhttp3.Request; | ||||||
| @ -92,10 +93,12 @@ public class HttpInterceptor implements Interceptor { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void deleteRequestHeaderInterceptor(String headerName) { |     public void deleteRequestHeaderInterceptor(String headerName) { | ||||||
|         for (RequestInterceptor requestInterceptor : mRequestInterceptors) { |         Iterator<RequestInterceptor> requestInterceptorIterator = mRequestInterceptors.iterator(); | ||||||
|             if (requestInterceptor instanceof RequestHeaderInterceptor && |         while (requestInterceptorIterator.hasNext()) { | ||||||
|                     ((RequestHeaderInterceptor) requestInterceptor).getHeaderName().equals(headerName)) { |             RequestInterceptor currentRequestInterceptor = requestInterceptorIterator.next(); | ||||||
|                 mRequestInterceptors.remove(requestInterceptor); |             if (currentRequestInterceptor instanceof RequestHeaderInterceptor && | ||||||
|  |                     ((RequestHeaderInterceptor) currentRequestInterceptor).getHeaderName().equals(headerName)) { | ||||||
|  |                 requestInterceptorIterator.remove(); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user