diff --git a/server.pl b/server.pl
index d3250d5..f512254 100644
--- a/server.pl
+++ b/server.pl
@@ -441,6 +441,7 @@ EOF
my ($cgi, $email) = @_;
my $plan = util_get_plan($email);
+ my $format = $cgi->param('accept')->match(qw(text/plain application/json));
if (defined $plan && defined $plan->{'redirect'}) {
# found external plan service, redirect request
@@ -448,7 +449,8 @@ EOF
return;
}
if (!defined $plan) {
- print_response($cgi, 404);
+ my $body = $format eq 'text/plain' ? 'No Plan.' : encode_json({error => 'No Plan.'});
+ print_response($cgi, 404, {'Content-Type' => $format}, $body);
return;
}
my $pubkey = $cgi->http('X-Dotplan-Pubkey');
@@ -469,7 +471,6 @@ EOF
# render response
my $body;
delete $plan->{'mtime'};
- my $format = $cgi->param('accept')->match(qw(text/plain application/json));
if ($format eq 'application/json') {
$body = encode_json($plan);
} else {
diff --git a/static/index.html b/static/index.html
index c9389f7..4c5542d 100644
--- a/static/index.html
+++ b/static/index.html
@@ -8,7 +8,14 @@
Dotplan Online
- This site is coming soon. For now you can check out the source code.
+
What is Dotplan?
+ Dotplan is a modern re-imagining of the Plan file from the days of yesteryear. Well, I mean technically it's still around today, but when was the last time you finger
ed someone?
+ On second thought, never mind. Don't answer that...
+ Essentially it's a loosey-goosey API specification through which the technically elite can express their personalities (or lack thereof) with one another.
+ What is Dotplan Online?
+ This site is a free Dotplan provider and relay running the Dotplan reference implementation. If you're some kind of simpleton who is incapable of hosting your own, you can point your email domain here via a SRV
record and use it as your Dotplan provider.
+ How does it all work?
+