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 22:04:02 UTC
[1/2] git commit: [flex-utilities] [refs/heads/develop] - use etags
over last-modified dates. The last modified dates for AIR SDKs become
unstable. They would change from run to run.
Repository: flex-utilities
Updated Branches:
refs/heads/develop ce0e4bbb2 -> b995ad27d
use etags over last-modified dates. The last modified dates for AIR SDKs become unstable. They would change from run to run.
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/db570199
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/db570199
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/db570199
Branch: refs/heads/develop
Commit: db57019965ae5139b7b0b3b81fcfd75869900699
Parents: ce0e4bb
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 13:02:38 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 21 13:02:38 2014 -0800
----------------------------------------------------------------------
MD5Checker/src/MD5Checker.mxml | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/db570199/MD5Checker/src/MD5Checker.mxml
----------------------------------------------------------------------
diff --git a/MD5Checker/src/MD5Checker.mxml b/MD5Checker/src/MD5Checker.mxml
index 3e2b9c8..24709a1 100644
--- a/MD5Checker/src/MD5Checker.mxml
+++ b/MD5Checker/src/MD5Checker.mxml
@@ -39,12 +39,19 @@ limitations under the License.
nativeApplication.addEventListener(InvokeEvent.INVOKE, parseArgs);
}
private var logFileName:String = "MD5CheckerLog.txt";
+ private var outFileName:String;
private function parseArgs(event:InvokeEvent):void {
for each (var s:String in event.arguments) {
if (s.indexOf("-log=") == 0) {
logFileName = s.substring(5);
}
+ if (s.indexOf("-out=") == 0) {
+ outFileName = s.substring(5);
+ }
+ if (s.indexOf("-config=") == 0) {
+ configURL = s.substring(8);
+ }
}
}
@@ -74,6 +81,9 @@ limitations under the License.
private function xmlcompleteHandler(event:Event):void
{
+ XML.ignoreComments = false;
+ XML.prettyIndent = 4;
+
xml = new XML(xmlLoader.data as String);
var xmlList:XMLList;
@@ -169,6 +179,18 @@ limitations under the License.
if (current >= data.length)
{
fs.close();
+ if (nodeChanged && outFileName)
+ {
+ f = File.applicationDirectory.resolvePath("ApacheHeader.txt");
+ fs.open(f, FileMode.READ);
+ var header:String = fs.readUTFBytes(fs.bytesAvailable);
+ fs.close();
+ f = File.documentsDirectory.resolvePath(outFileName);
+ fs.open(f, FileMode.WRITE);
+ fs.writeUTFBytes(header);
+ fs.writeUTFBytes(xml.toXMLString());
+ fs.close();
+ }
this.nativeApplication.exit(nodeChanged ? -1 : 0);
return;
}
@@ -206,12 +228,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;
[2/2] git commit: [flex-utilities] [refs/heads/develop] - save
modified xml file
Posted by ah...@apache.org.
save modified xml file
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/b995ad27
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/b995ad27
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/b995ad27
Branch: refs/heads/develop
Commit: b995ad27d7ecbc4d58b915897193cffc6180cf17
Parents: db57019
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 13:03:52 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 21 13:03:52 2014 -0800
----------------------------------------------------------------------
MD5Checker/build.xml | 1 +
MD5Checker/src/ApacheHeader.txt | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b995ad27/MD5Checker/build.xml
----------------------------------------------------------------------
diff --git a/MD5Checker/build.xml b/MD5Checker/build.xml
index 630a215..d36a7d1 100644
--- a/MD5Checker/build.xml
+++ b/MD5Checker/build.xml
@@ -97,6 +97,7 @@
<arg value="${basedir}/src/MD5Checker-app.xml"/>
<arg value="--" />
<arg value="-log=${basedir}/MD5CheckerLog.txt"/>
+ <arg value="-out=${basedir}/sdk-installer-config-4.0.xml"/>
</exec>
<loadfile property="md5log" srcfile="${basedir}/MD5CheckerLog.txt" />
<echo>${md5log}</echo>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b995ad27/MD5Checker/src/ApacheHeader.txt
----------------------------------------------------------------------
diff --git a/MD5Checker/src/ApacheHeader.txt b/MD5Checker/src/ApacheHeader.txt
new file mode 100644
index 0000000..c968688
--- /dev/null
+++ b/MD5Checker/src/ApacheHeader.txt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+<!-- NOTE: this file format looks like this so it can be parsed by Ant's xmlproperty task.
+ The basic rule is that there can be no repeat tags as in:
+ <sometag>
+ <oneormoreofthistag />
+ <oneormoreofthistag />
+ </sometag>
+-->