Skip to content
Permalink
Browse files
use etag instead of last-modified. Last-modified dates for AIR SDKs b…
…ecaome unstable. Sometimes it would give you different dates for the same file
  • Loading branch information
aharui committed Nov 21, 2014
1 parent 4bca66d commit 301f030eaa2f5b789cd4574baf2d294f95a749fd
Showing 1 changed file with 6 additions and 2 deletions.
@@ -206,12 +206,16 @@ limitations under the License.
var headers:Array = event.responseHeaders;
for each (var header:URLRequestHeader in headers)
{
if (header.name == "Last-Modified")
if (header.name == "Etag" || header.name == "ETag")
{
lastModified = header.value;
if (lastModified.indexOf('"') == 0)
lastModified = lastModified.substr(1);
if (lastModified.indexOf('"') == lastModified.length - 1)
lastModified = lastModified.substr(0, lastModified.length - 1);
foundLastModified = true;
}
else if ((header.name == "Etag" || header.name == "ETag") && lastModified == null)
else if ((header.name == "Last-Modified") && lastModified == null)
{
lastModified = header.value;
foundLastModified = true;

0 comments on commit 301f030

Please sign in to comment.