chiark / gitweb /
timestamp processing
[ypp-sc-tools.web-live.git] / yarrg / commod-update-receiver
index 70cf36a..16a9ac6 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
 
 
@@ -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);