mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-11-04 07:13:28 +01:00 
			
		
		
		
	Fix bug from previous commit
This commit is contained in:
		@@ -555,11 +555,8 @@ Future<MapEntry<HttpClient, HttpClientResponse>> sourceRequestStreamResponse(
 | 
				
			|||||||
  throw ObtainiumError('Too many redirects ($maxRedirects)');
 | 
					  throw ObtainiumError('Too many redirects ($maxRedirects)');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Future<Response> httpClientResponseStreamToFinalResponse(
 | 
					Future<Response> httpClientResponseStreamToFinalResponse(HttpClient httpClient,
 | 
				
			||||||
      HttpClient httpClient,
 | 
					    String method, String url, HttpClientResponse response) async {
 | 
				
			||||||
      String method,
 | 
					 | 
				
			||||||
      String url,
 | 
					 | 
				
			||||||
      HttpClientResponse response) async {
 | 
					 | 
				
			||||||
  final bytes =
 | 
					  final bytes =
 | 
				
			||||||
      (await response.fold<BytesBuilder>(BytesBuilder(), (b, d) => b..add(d)))
 | 
					      (await response.fold<BytesBuilder>(BytesBuilder(), (b, d) => b..add(d)))
 | 
				
			||||||
          .toBytes();
 | 
					          .toBytes();
 | 
				
			||||||
@@ -639,7 +636,8 @@ abstract class AppSource {
 | 
				
			|||||||
    var method = postBody == null ? 'GET' : 'POST';
 | 
					    var method = postBody == null ? 'GET' : 'POST';
 | 
				
			||||||
    var requestHeaders = await getRequestHeaders(additionalSettings);
 | 
					    var requestHeaders = await getRequestHeaders(additionalSettings);
 | 
				
			||||||
    var streamedResponseAndClient = await sourceRequestStreamResponse(
 | 
					    var streamedResponseAndClient = await sourceRequestStreamResponse(
 | 
				
			||||||
        method, url, requestHeaders, additionalSettings, followRedirects: followRedirects);
 | 
					        method, url, requestHeaders, additionalSettings,
 | 
				
			||||||
 | 
					        followRedirects: followRedirects, postBody: postBody);
 | 
				
			||||||
    return await httpClientResponseStreamToFinalResponse(
 | 
					    return await httpClientResponseStreamToFinalResponse(
 | 
				
			||||||
        streamedResponseAndClient.key,
 | 
					        streamedResponseAndClient.key,
 | 
				
			||||||
        method,
 | 
					        method,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user