swap connections fail with strange errors with keep-alive enabled
This commit is contained in:
		
							parent
							
								
									57a00938a0
								
							
						
					
					
						commit
						f56fbf4dcb
					
				@ -167,6 +167,7 @@ public class HttpDownloader extends Downloader {
 | 
				
			|||||||
        if (isSwapUrl(sourceUrl)) {
 | 
					        if (isSwapUrl(sourceUrl)) {
 | 
				
			||||||
            // swap never works with a proxy, its unrouted IP on the same subnet
 | 
					            // swap never works with a proxy, its unrouted IP on the same subnet
 | 
				
			||||||
            connection = (HttpURLConnection) sourceUrl.openConnection();
 | 
					            connection = (HttpURLConnection) sourceUrl.openConnection();
 | 
				
			||||||
 | 
					            connection.setRequestProperty("Connection", "Close"); // avoid keep-alive
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            if (queryString != null) {
 | 
					            if (queryString != null) {
 | 
				
			||||||
                connection = NetCipher.getHttpURLConnection(new URL(urlString + "?" + queryString));
 | 
					                connection = NetCipher.getHttpURLConnection(new URL(urlString + "?" + queryString));
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user