You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/11/21 21:53:40 UTC

git commit: [flex-utilities] [refs/heads/apache-tour-de-flex-1.2] - Revert "use etag instead of last-modified. Last-modified dates for AIR SDKs becaome unstable. Sometimes it would give you different dates for the same file"

Repository: flex-utilities
Updated Branches:
  refs/heads/apache-tour-de-flex-1.2 301f030ea -> 747927a54


Revert "use etag instead of last-modified.  Last-modified dates for AIR SDKs becaome unstable.  Sometimes it would give you different dates for the same file"

This reverts commit 301f030eaa2f5b789cd4574baf2d294f95a749fd.


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/747927a5
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/747927a5
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/747927a5

Branch: refs/heads/apache-tour-de-flex-1.2
Commit: 747927a54a980f6c8b1fecbc8a6db847af4d5d04
Parents: 301f030
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 12:52:32 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 21 12:52:32 2014 -0800

----------------------------------------------------------------------
 MD5Checker/src/MD5Checker.mxml | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/747927a5/MD5Checker/src/MD5Checker.mxml
----------------------------------------------------------------------
diff --git a/MD5Checker/src/MD5Checker.mxml b/MD5Checker/src/MD5Checker.mxml
index 400e505..3e2b9c8 100644
--- a/MD5Checker/src/MD5Checker.mxml
+++ b/MD5Checker/src/MD5Checker.mxml
@@ -206,16 +206,12 @@ limitations under the License.
                     var headers:Array = event.responseHeaders;
                     for each (var header:URLRequestHeader in headers)
                     {
-                        if (header.name == "Etag" || header.name == "ETag")
+                        if (header.name == "Last-Modified")
                         {
                             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 == "Last-Modified") && lastModified == null)
+                        else if ((header.name == "Etag" || header.name == "ETag") && lastModified == null)
                         {
                             lastModified = header.value;
                             foundLastModified = true;