aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/sdl_net/localwebserver.h
AgeCommit message (Collapse)Author
2016-08-24CLOUD: Add "minimal mode" in LocalWebserverAlexander Tkachev
StorageWizardDialog now runs LocalWebserver in "minimal mode" for security reasons. In this mode server uses only those handlers which state to support it. There are two handlers which support minimal mode: IndexPageHandler (which handles `code` requests needed by StorageWizardDialog) and ResourceHandler (which provides inner resources like `style.css` or `logo.png` from `wwwroot.zip` archive).
2016-08-24CLOUD: Use overriden handle() instead of ClientHandlerCallback in page handlersPeter Bozsó
Using a dedicated callback object for this was an unnecessary overhead.
2016-08-24CLOUD: Move determineMimeType to ResourceHandlerPeter Bozsó
2016-08-24CLOUD: Remove unused removePathHandler(), make addPathHandler() privatePeter Bozsó
2016-08-24CLOUD: Fix code formattingPeter Bozsó
2016-08-24JANITORIAL: Remove spaces at the end of the lineAlexander Tkachev
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
2016-08-24CLOUD: Do some refactoring/cleanup in NetworkingAlexander Tkachev
2016-08-24CLOUD: Update StorageWizardDialogAlexander Tkachev
It now hides code fields not just when built with SDL_Net, but also when LocalWebserver's using default port. So that's why NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is defined in localwebserver.h now.
2016-08-24CLOUD: Add port override for LocalWebserverAlexander Tkachev
It's enabled only when NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is defined. It's not defined, because override means we have to reconfigure our redirect links somehow to use the override port.
2016-08-24CLOUD: Add "/filesAJAX" sketchAlexander Tkachev
It works already, but still requires some polishing.
2016-08-24CLOUD: Add ListAjaxHandlerAlexander Tkachev
"/list" now returns JSON with directory information. Would be used in AJAX-based Files Manager.
2016-08-24CLOUD: Add LocalWebserver::resolveAddress()Alexander Tkachev
Works on Linux too. And, well, I'm bad in adding backends, so it's just #ifdefed there.
2016-08-24CLOUD: Add UploadFileHandlerAlexander Tkachev
2016-08-24CLOUD: Add query parameters URL encodingAlexander Tkachev
In local webserver's links. Fixed URL decoding to understand '+', by the way. Firefox sends these instead of spaces and "%2B" instead of '+'.
2016-08-24CLOUD: Add "/download" handlerAlexander Tkachev
Now one can download files from the device through browser!
2016-08-24CLOUD: Move "/create" to separate HandlerAlexander Tkachev
It does redirect to "/files" on success, so user doesn't even see the strange "/create" URL at all. This commit is for keeping these handlers small, not making one (FilesPageHandler in this case) do everything.
2016-08-24CLOUD: Make "/create" workAlexander Tkachev
One can now create directories through browser.
2016-08-24CLOUD: Refactor LocalWebserverAlexander Tkachev
Its handlers are now more compact. This commit moves Handler classes in handlers\ directory. ResourceHandler ignores "hidden" files in the archive, and these are used as markup templates in IndexPageHandler and FilesPageHandler.
2016-08-24CLOUD: Make "Run server" button activeAlexander Tkachev
It should show the real server's IP over there, but that doesn't work yet.
2016-08-24CLOUD: Add some mutexes in LocalWebserverAlexander Tkachev
2016-08-24CLOUD: Update LocalWebserverAlexander Tkachev
* fix handling connections; * fix idling strategy; * add setClientGetHandler() for SeekableReadStream; * add determineMimeType().
2016-08-24CLOUD: Add IndexPageHandlerAlexander Tkachev
This commit also adds LocalWebserver's stopOnIdle(). That means server is not stopped immediately, but only when all clients are served.
2016-08-24CLOUD: Prepare code for path handlersAlexander Tkachev
LocalWebserver would storage the handlers. Client now has methods like path() or query() to access different parts of the request.
2016-08-24CLOUD: Add GetClientHandlerAlexander Tkachev
That ClientHandler is made for responding GET requests. It calculates stream's length, it allows to specify response code and headers, it can be used to transfer any ReadStream.
2016-08-24CLOUD: Add Networking::ClientAlexander Tkachev
Keeps current client's state
2016-08-24CLOUD: Add LocalWebserverAlexander Tkachev
Available as LocalServer singleton. It's being started and stopped by StorageWizardDialog. It doesn't handle clients yet, though.