Created
February 3, 2015 22:56
-
-
Save LNA/d9b2e35c24226f43e282 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
if (requestURI.equals("/patch-content.txt")) { | |
String fileOneString = "../cob_spec/public" + requestURI; | |
System.out.println(fileOneString); | |
FileWriter fw = new FileWriter(fileOneString, APPEND); | |
fw.write(DEFAULT_RESPONSE); | |
System.out.println("it gets here"); | |
} else if (Arrays.asList("/file1", "/file2", "/image.jpeg", "/image.png", "/image.gif", "/text-file.txt").contains(requestURI)) { | |
byte[] body = pageBuilder.getBody(requestURI); | |
out.write(body); | |
out.flush(); | |
} else if (requestURI.equals("/partial_content.txt")) { | |
byte[] body = pageBuilder.handleRange(requestURI, range); | |
out.write(body); | |
out.flush(); | |
} else if (requestURI.equals("/logs")) { | |
byte[] body = pageBuilder.getLogs(); | |
out.write(body); | |
out.flush(); | |
} else if (requestURI.contains("/parameters")) { | |
byte[] body = pageBuilder.decodeParams(requestURI); | |
out.write(body); | |
out.flush(); | |
} else { | |
byte[] body = pageBuilder.getBodyLinks(); | |
out.write(body); | |
out.flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment