Subversion Repositories Kolibri OS

Rev

Rev 8492 | Rev 8500 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8492 Rev 8499
Line 209... Line 209...
209
					DrawProgress();
209
					DrawProgress();
210
				}
210
				}
211
			}
211
			}
Line 212... Line 212...
212
 
212
 
-
 
213
			if (http.receive_result != 0) break;
-
 
214
			if (debug_mode) {
213
			if (http.receive_result != 0) break;
215
				EAX = http.transfer;
-
 
216
				debugln(#EAX.http_msg.http_header);
214
			if (debug_mode) debugval("HTTP", http.status_code);
217
			}
215
			if (http.status_code >= 300) && (http.status_code < 400)
218
			if (http.status_code >= 300) && (http.status_code < 400)
216
			{
219
			{
217
				// Handle redirects
220
				// Handle redirects
218
				if (redirect_count<=5) {
221
				if (redirect_count<=5) {
Line 890... Line 893...
890
void CheckContentType()
893
void CheckContentType()
891
{
894
{
892
	char content_type[64];
895
	char content_type[64];
893
	if (http.header_field("content-type", #content_type, sizeof(content_type))) // application || image
896
	if (http.header_field("content-type", #content_type, sizeof(content_type))) // application || image
Line 894... Line -...
894
 
-
 
895
	if (strchr(#content_type, '=')) {
-
 
896
		WB1.custom_encoding = get_encoding_type_by_name(EAX+1);	
-
 
897
	}
-
 
898
 
897
 
899
	if (content_type[0] == 'i') {
898
	if (content_type[0] == 'i') {
900
		EventDownloadAndOpenImage(http.cur_url);
899
		EventDownloadAndOpenImage(http.cur_url);
-
 
900
		StopLoading();
901
		StopLoading();
901
	}
902
	}if (content_type[0] == 'a') { 
902
	else if (content_type[0] == 'a') { 
903
		EventOpenDownloader(http.cur_url);
903
		EventOpenDownloader(http.cur_url);
904
		StopLoading();
904
		StopLoading();
-
 
905
	}
-
 
906
	else {
-
 
907
		WB1.custom_encoding = -1;
-
 
908
		if (EAX = strchr(#content_type, '=')) {
-
 
909
			WB1.custom_encoding = get_encoding_type_by_name(EAX+1);	
-
 
910
		}
905
	}
911
	}
Line 906... Line 912...
906
}
912
}
907
 
913
 
908
void EventDownloadAndOpenImage(dword _url)
914
void EventDownloadAndOpenImage(dword _url)