aboutsummaryrefslogtreecommitdiffstats
path: root/acme-webserver
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-12-11 14:29:23 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-12-11 14:29:23 +0100
commitf14629da48544720f000d1ee7f487411dbd8be09 (patch)
tree32eed454179b4434cda1d4cd00c79d4c9796f801 /acme-webserver
parent40f60d1171b840a6be8b75603c4d144e7f77206c (diff)
Add licensing headers.
Diffstat (limited to 'acme-webserver')
-rwxr-xr-xacme-webserver20
1 files changed, 19 insertions, 1 deletions
diff --git a/acme-webserver b/acme-webserver
index 57ea789..e5e040d 100755
--- a/acme-webserver
+++ b/acme-webserver
@@ -1,5 +1,23 @@
#!/usr/bin/perl -T
+#----------------------------------------------------------------------
+# Let's Encrypt ACME client (minimal webserver for answering challenges)
+# Copyright © 2015 Guilhem Moulin <guilhem@fripost.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#----------------------------------------------------------------------
+
use strict;
use warnings;
@@ -13,7 +31,7 @@ my $method = s/\A(GET|HEAD) // ? $1 : die "Error: Bad request\n";
while (defined (my $h = <STDIN>)) { last if $h eq "\r\n" };
my ($status_line, $content_type, $content);
-if (/\A\Q$ROOT\E\/([A-Za-z0-9_-]+)\z/ and -f $1) {
+if (/\A\Q$ROOT\E\/([A-Za-z0-9_\-]+)\z/ and -f $1) {
if (open my $fh, '<', $1) {
($status_line, $content_type) = ('200 OK', 'application/jose+json');
$content = do { local $/ = undef; <$fh> };