I am uses NSURLConnection to download files.(Basically I use JGDownload Accelerator)
My issue is when I try to download files at one particular server, response provided by server is vary and gives me different header responses like below
Printing description of headers:
{
"Accept-Ranges" = bytes;
"Cache-Control" = "max-age=687749";
Connection = "keep-alive";
"Content-Length" = 35617808;
"Content-Type" = "video/mp4";
Date = "Fri, 11 Sep 2015 07:21:59 GMT";
Etag = "\"ee90ce32a16fc115d0799d686e5fe1b4\"";
Expires = "Sat, 19 Sep 2015 06:24:28 GMT";
"Keep-Alive" = "timeout=20";
"Last-Modified" = "Wed, 09 Sep 2015 13:41:37 GMT";
Server = ucdn;
"X-Timestamp" = "1441806096.99264";
"X-Ureq-ID" = "PYMqMNZBGw7LI3xeAHCTQwJs2FvO0y0xuG3+g5B0KcBzTv1v4kTfwCzHQYgrBEGSJQ0tBMG5L+srffrjBfio1R1ChR+wABEHY92PCg==";
"X-VHostId" = "10000, 200000";
}
{
"Cache-Control" = "max-age=687430";
Connection = "keep-alive";
"Content-Length" = 1;
"Content-Range" = "bytes 0-0/35617808";
"Content-Type" = "video/mp4";
Date = "Fri, 11 Sep 2015 07:27:18 GMT";
Etag = "\"ee90ce32a16fc115d0799d686e5fe1b4\"";
Expires = "Sat, 19 Sep 2015 06:24:28 GMT";
"Keep-Alive" = "timeout=20";
"Last-Modified" = "Wed, 09 Sep 2015 13:41:37 GMT";
Server = ucdn;
"X-Timestamp" = "1441806096.99264";
"X-Ureq-ID" = "PYMqMNZBGw7LI3xeAHCTQwJs2FvO0y0xuG3+g5B0KcBzTv1v4kTfwCzHQYgrBEGSJQ0tBMG5L+srffrjBfio1R1ChR+wABEHY92PCg==";
"X-VHostId" = "10000, 710000";
}
Basic deference is the content-length
key as in first one it provide proper value and in second one it is wrong and where I got delay around 30 - 40 seconds.
Is there any way I can avoid that delay? Or any workaround to make response fast I means server provides data with in 1 to 2 seconds but the callback method provides data late
for the request / response time I use Charles application. Results I found by it is HERE