- Removes
Response
interface - Adds
MockHttpRouter
guts to testSetUp
- Modifies
RequestParserTest
to remove unnecessary test cases and addsparams
tests - Uncomments
testReadRequest()
fromHttpServerIOTest
- Includes
FileSystem
as dependency forFileIO
and adds update and delete tests forHttpFileIOTest
- Adds
ResponseBuilder
interface andMockHttpResponseBuilder
to testFileHandler
- naming - handles both files and directories
- html variables and formatting should be in a separate class
- file extensions should be in separate class (also not tested)
- if/else chain, consider another way to handle to reduce duplication
- html formatting should be in separate class
- only passes cob spec, not actually doing what it should
- Using Java
PrintWriter
andBufferedWriter
classes, should be wrapped - testing - Tests ignored, can you test relative path instead of absolute?
- Does this class seem big to you?
- testing - missing test file
- testing - missing test case for
handleRouteCalled
- Should this have more to it?
- testing - missing test file
- Note: /Users/foo/Desktop/coding/java/applications/JavaHttpServer/src/main/java/util/RequestLogger.java uses unchecked or unsafe operations.
- This fails every 10 threads or so. It is not something I know how to replicate.
- Missing test cases: TDD classes that have missing test cases (delete and TDD)
- Server will become a library - 2 apps that will use this library, one that satisfies cob spec and one that works as an app that you can telnet into, leave a note (write to a file when you close telnet)
- Problems: File names in router (only satisfying cob spec), can blow up
- Request could be parsed into better objects
- register 404 every time, can handle it once it is registered instead of constantly re-registering
- open in Intellij to see squiggly stuff
- file type checker breaks on pdf
- sub-handlers from file handle
- Config for setup from main, pass to router
- Attach handler to router, router delegate to handler