diff options
| author | Keith Packard <keithp@keithp.com> | 2018-10-06 18:10:57 -0600 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2018-10-06 18:10:57 -0600 | 
| commit | a372152654613fd8479ed4687b987ae2a513adf6 (patch) | |
| tree | e24379644dcb9a6701ceb4732e8df34f58713de7 | |
| parent | 3b817a2b854065af23c9ec8e849150e6930f51e9 (diff) | |
altos-map: Fix altos-map HTTP syntax
Add blank line between header and content.
Make error pages have actual HTML content.
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rw-r--r-- | map-server/altos-map/AltosMap.java | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/map-server/altos-map/AltosMap.java b/map-server/altos-map/AltosMap.java index 83bc7cea..380556f4 100644 --- a/map-server/altos-map/AltosMap.java +++ b/map-server/altos-map/AltosMap.java @@ -56,7 +56,11 @@ public class AltosMap {  	public void fail(int status, String reason) {  		write_status(status);  		write_type("text/html"); +		System.out.printf("\n"); +		System.out.printf("<html>\n"); +		System.out.printf("<head><title>Map Fetch Failure</title></head>\n");  		System.out.printf("<body>%s</body>\n", reason); +		System.out.printf("</html>\n");  		System.exit(1);  	} @@ -133,6 +137,7 @@ public class AltosMap {  				String content_type = reply.get_string("content_type", null);  				System.out.printf("Content-Type: %s\n", content_type);  				System.out.printf("Content-Length: %d\n", file.length()); +				System.out.printf("\n");  				byte[] buf = new byte[4096];  				int bytes_read;  				while ((bytes_read = in.read(buf)) > 0)  | 
