chiark / gitweb /
timestamp processing
[ypp-sc-tools.web-live.git] / yarrg / commod-update-receiver
index 42bd45dc29539cca3b9edc4b48af7f86d13ce636..16a9ac65dc852e8af2b8b32672edece894fd2818 100755 (executable)
 # are used without permission.  This program is not endorsed or
 # sponsored by Three Rings.
 
-
-# Uploads contain:
-#  ocean                       canonical mixed case
-#  island                      canonical mixed case
+# All calls contain:
 #  clientname                  "ypp-sc-tools"
 #  clientversion               2.1-g2e06a26  [from git-describe --tags HEAD]
 #  clientfixes                 "lastpage"  [space separated list]
+#
+# Timestamp requests contain:
+#  requesttimestamp
+#
+# Uploads contain:
+#  ocean                       canonical mixed case
+#  island                      canonical mixed case
 #  data filename=deduped.tsv.gz        output of yarrg --tsv
 
 
@@ -49,7 +53,7 @@ setlocale(LC_CTYPE, "en_GB.UTF-8");
 
 my $re_any= "^(.*)\$";
 
-parse_masters();
+parse_info_serverside();
 
 sub fail ($) {
     my ($msg) = @_;
@@ -84,6 +88,12 @@ foreach my $bug (@$clientinfo) {
 
 $o{'clientversion'}= must_param('clientversion', "^(\\d[-+._0-9a-zA-Z]+)\$");
 
+if (param('requesttimestamp')) {
+    my $now= time; defined $now or die;
+    print header(-type=>'text/plain', -charset=>'us-ascii'), "OK $now.\n";
+    exit(0);
+}
+
 $o{'ocean'}= must_param('ocean', $re_any);
 $o{'island'}= must_param('island', $re_any);