Http Server Backwards Compatibility
Katsute opened this issue · 5 comments
Katsute commented
Prerequisites
If all checks are not passed then the request will be closed
- I have checked that no other similar feature request already exists
- The feature request makes sense for the project
Proposal
Describe the feature that should be added
Allow the setting of a http session handler (similar to the current set executor method) which acts like a handler and asks for the cookie name in the constructor.
Reasoning
Explain why this feature should be added
This would make the http session more flexible.
Katsute commented
Utilize #lastAccessTime
Katsute commented
rewrite how server handles handlers --> have the server encapsulate every handler but link them so calling the inner one allows the deleting of the outer one.
Katsute commented
TODO:
- Adjust
#createContextmethod to addauthenticatoras a parameter. https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpContext.html - Remove simple authenticator and convert simple http handler to interface
- Change how server handles handlers →
- Create context creates contexts with wrapped handlers
- Server has wrapped handlers while get context returns the handlers the server is wrapping
- This will allow server pre-execution
- Add Http Session method to server, similar to set executor
Add illegalargs on any duplicate contexts
Katsute commented
Added to master