Fix HTML encoding of ampersand.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / page / StaticPage.java
index 7bff1e1..3d24fdd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * shortener - CSSPage.java - Copyright © 2010 David Roden
+ * Sone - StaticPage.java - Copyright © 2010 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -64,12 +64,12 @@ public class StaticPage implements Page {
         */
        @Override
        public Response handleRequest(Request request) {
-               String path = request.getURI().getPath();
+               String path = request.getUri().getPath();
                int lastSlash = path.lastIndexOf('/');
                String filename = path.substring(lastSlash + 1);
                InputStream fileInputStream = getClass().getResourceAsStream(resourcePathPrefix + filename);
                if (fileInputStream == null) {
-                       return new Response(404, "Not found.", null, (String) null);
+                       return new Response(404, "Not found.", null, "");
                }
                return new Response(200, "OK", mimeType, null, fileInputStream);
        }