Created
March 13, 2015 22:51
-
-
Save mattrude/72f7e6e3fcee62be0402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d6557aa324e6db67937a555a5705ed5ad13adab0 Mon Sep 17 00:00:00 2001 | |
--- | |
dbserver.ml | 2 +- | |
htmlTemplates.ml | 2 +- | |
stats.ml | 4 ++-- | |
wserver.ml | 2 +- | |
4 files changed, 5 insertions(+), 5 deletions(-) | |
diff --git a/dbserver.ml b/dbserver.ml | |
index 583c484..7c2b926 100644 | |
--- a/dbserver.ml | |
+++ b/dbserver.ml | |
@@ -261,7 +261,7 @@ struct | |
else Armor.encode_pubkey_string (Key.to_string_multiple keys) | |
in | |
if request.machine_readable then | |
- ("application/pgp-keys; charset=UTF-8", count, aakeys) | |
+ ("text/plain; charset=UTF-8", count, aakeys) | |
else | |
("text/html; charset=UTF-8", | |
count, | |
diff --git a/htmlTemplates.ml b/htmlTemplates.ml | |
index e220d72..c3fb69e 100644 | |
--- a/htmlTemplates.ml | |
+++ b/htmlTemplates.ml | |
@@ -50,7 +50,7 @@ let html_quote string = | |
let br_regexp = Str.regexp_case_fold "<br />" | |
let page ~title ~body = | |
sprintf | |
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\" >\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>%s</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<style type=\"text/css\">\r\n/*<![CDATA[*/\r\n .uid { color: green; text-decoration: underline; }\r\n .warn { color: red; font-weight: bold; }\r\n/*]]>*/\r\n</style></head><body><h1>%s</h1>%s</body></html>" | |
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\" >\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>%s</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<link href='/assets/bootstrap/3.3.2/css/bootstrap.min.css' rel='stylesheet' type='text/css'>\r\n<style type=\"text/css\">\r\n/*<![CDATA[*/\r\n .uid { color: green; text-decoration: underline; }\r\n .warn { color: red; font-weight: bold; }\r\n/*]]>*/\r\n</style></head><body><div id='wrap'><div class='container'><h1>%s</h1>%s</div></div></body></html>" | |
(Str.global_replace br_regexp " | " title) title body | |
let link ~op ~hash ~fingerprint ~keyid = | |
diff --git a/stats.ml b/stats.ml | |
index 3647e4b..d9d33dd 100644 | |
--- a/stats.ml | |
+++ b/stats.ml | |
@@ -139,7 +139,7 @@ let info_tables () = | |
<table summary=\"Keyserver Settings\"> | |
<tr><td>Hostname:</td><td>%s</td></tr> | |
<tr><td>Nodename:</td><td>%s</td></tr> | |
- <tr><td>Version:</td><td>%s%s</td></tr> | |
+ <tr><td>SKS Version:</td><td>%s%s</td></tr> | |
<tr><td>Server contact:</td><td>%s</td></tr> | |
<tr><td>HTTP port:</td><td>%d</td></tr> | |
<tr><td>Recon port:</td><td>%d</td></tr> | |
@@ -180,7 +180,7 @@ let generate_html_stats_page log size = | |
let num_keys = sprintf "<p>Total number of keys: %d</p>\n" size in | |
let title = | |
sprintf | |
- "SKS OpenPGP Keyserver statistics<br />Taken at %s" | |
+ "OpenPGP Keyserver statistics<br />Taken at %s" | |
(time_to_tz_string now) | |
in | |
if Array.length log = 0 then | |
diff --git a/wserver.ml b/wserver.ml | |
index 6ccfc62..b758084 100644 | |
--- a/wserver.ml | |
+++ b/wserver.ml | |
@@ -305,7 +305,7 @@ let send_result cout ?(error_code = 200) ?(content_type = "text/html; charset=UT | |
* This should probably be passed down in the request itself. | |
*) | |
if content_type = "application/pgp-keys; charset=UTF-8" then | |
- fprintf cout "Content-disposition: attachment; filename=gpgkey.asc\r\n"; | |
+ fprintf cout "Content-disposition: attachment; filename=gpgkey.txt\r\n"; | |
(* | |
* Allow access from Javascript code on other sites. | |
* For details, see https://en.wikipedia.org/wiki/Cross-origin_resource_sharing. | |
-- | |
1.9.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment