Age | Commit message (Collapse) | Author |
|
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).
|
|
Using a dedicated callback object for this was an unnecessary overhead.
|
|
|
|
|
|
|
|
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
|
|
|
|
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.
|
|
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.
|
|
It works already, but still requires some polishing.
|
|
"/list" now returns JSON with directory information. Would be used in
AJAX-based Files Manager.
|
|
Works on Linux too. And, well, I'm bad in adding backends, so it's just
#ifdefed there.
|
|
|
|
In local webserver's links.
Fixed URL decoding to understand '+', by the way. Firefox sends these
instead of spaces and "%2B" instead of '+'.
|
|
Now one can download files from the device through browser!
|
|
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.
|
|
One can now create directories through browser.
|
|
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.
|
|
It should show the real server's IP over there, but that doesn't work
yet.
|
|
|
|
* fix handling connections;
* fix idling strategy;
* add setClientGetHandler() for SeekableReadStream;
* add determineMimeType().
|
|
This commit also adds LocalWebserver's stopOnIdle().
That means server is not stopped immediately, but only when all clients
are served.
|
|
LocalWebserver would storage the handlers.
Client now has methods like path() or query() to access different parts
of the request.
|
|
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.
|
|
Keeps current client's state
|
|
Available as LocalServer singleton. It's being started and stopped by
StorageWizardDialog. It doesn't handle clients yet, though.
|