WebApp.py [191:219]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.send_response(200)
        self.send_header("Content-type", ctype)
        fs = os.fstat(f.fileno())
        self.send_header("Content-Length", str(fs[6]))
        self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
        self.end_headers()
        return f

    def list_directory(self, path):
        """Helper to produce a directory listing (absent index.html).
        Return value is either a file object, or None (indicating an
        error).  In either case, the headers are sent, making the
        interface the same as for send_head().
        """
        try:
            list = os.listdir(path)
        except os.error:
            self.send_error(404, "No permission to list directory")
            return None
        list.sort(key=lambda a: a.lower())

        
        f = StringIO()
        displaypath = cgi.escape(urllib.unquote(self.path))
        f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
        f.write("<html>\n<title>KMS Workshop - Sample WebApp S3 Uploader</title>\n")   
        f.write("<style> .center { display: block; margin-left: auto; margin-right: auto;}</style>") 
        f.write("<body>\n<img src=\"https://github.com/DanGOTO100/Draft-AWS-KMS-Workshop/blob/master/res/IconWebApp.png?raw=true\" alt=\"KMSicon\" class=\"center\">\n<h2><center>KMS Workshop - Sample WebApp S3 Uploader</center></h2>\n")
        f.write("<hr>\n")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



WebAppEncSSE.py [198:226]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.send_response(200)
        self.send_header("Content-type", ctype)
        fs = os.fstat(f.fileno())
        self.send_header("Content-Length", str(fs[6]))
        self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
        self.end_headers()
        return f

    def list_directory(self, path):
        """Helper to produce a directory listing (absent index.html).
        Return value is either a file object, or None (indicating an
        error).  In either case, the headers are sent, making the
        interface the same as for send_head().
        """
        try:
            list = os.listdir(path)
        except os.error:
            self.send_error(404, "No permission to list directory")
            return None
        list.sort(key=lambda a: a.lower())

        
        f = StringIO()
        displaypath = cgi.escape(urllib.unquote(self.path))
        f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
        f.write("<html>\n<title>KMS Workshop - Sample WebApp S3 Uploader</title>\n")   
        f.write("<style> .center { display: block; margin-left: auto; margin-right: auto;}</style>") 
        f.write("<body>\n<img src=\"https://github.com/DanGOTO100/Draft-AWS-KMS-Workshop/blob/master/res/IconWebApp.png?raw=true\" alt=\"KMSicon\" class=\"center\">\n<h2><center>KMS Workshop - Sample WebApp S3 Uploader</center></h2>\n")
        f.write("<hr>\n")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



