Mercurial Hosting > luan
comparison src/goodjava/webserver/handlers/DirHandler.java @ 1931:28cd9b3abdb3
add lang
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 02 May 2025 10:24:38 -0600 |
parents | 6f3f1768fdde |
children |
comparison
equal
deleted
inserted
replaced
1930:2b5eccebddd9 | 1931:28cd9b3abdb3 |
---|---|
43 if( path.endsWith("/") && file.isDirectory() ) { | 43 if( path.endsWith("/") && file.isDirectory() ) { |
44 DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz"); | 44 DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz"); |
45 Response response = new Response(); | 45 Response response = new Response(); |
46 response.headers.put( "Content-Type", "text/html; charset=utf-8" ); | 46 response.headers.put( "Content-Type", "text/html; charset=utf-8" ); |
47 Writer writer = new OutputStreamWriter( new ResponseOutputStream(response) ); | 47 Writer writer = new OutputStreamWriter( new ResponseOutputStream(response) ); |
48 writer.write( "<!doctype html>\n<html>\n" ); | 48 writer.write( "<!doctype html>\n<html lang=\"en\">\n" ); |
49 writer.write( "\t<head>\n" ); | 49 writer.write( "\t<head>\n" ); |
50 writer.write( "\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n" ); | 50 writer.write( "\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n" ); |
51 writer.write( "\t\t<meta name=\"robots\" content=\"noindex,nofollow\">\n" ); | 51 writer.write( "\t\t<meta name=\"robots\" content=\"noindex,nofollow\">\n" ); |
52 writer.write( "\t\t<style>\n" ); | 52 writer.write( "\t\t<style>\n" ); |
53 writer.write( "\t\t\ttd {padding: 2px 8px}\n" ); | 53 writer.write( "\t\t\ttd {padding: 2px 8px}\n" ); |