Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if module has been registered when referenced by a file handler #178

Open
wagnert opened this issue Mar 16, 2016 · 0 comments
Open

Comments

@wagnert
Copy link
Member

wagnert commented Mar 16, 2016

Actually there is a chance to misconfigure file handlers by specifying the name of a not existing module, like

<fileHandlers>
    <fileHandler name="<INVALID_MODULE_NAME>" extension=".do" />
</fileHandlers>

This actually would invoke the ProxyModule which triggers an error because of a missing upstream configuration (by default, appserver.xml has NO upstream configuration).

invalid configuration

To avoid misconfigurations, the CoreModule should check, if the module, a file handler references is available or not. If not, a 500 error should be triggered and a debug message should be written to the error log.

Additional Optimization:

It would make sense, to NOT hardcode module names, but instead make them configurable in appserver.xml like

<modules>
    <module name="vhost" type="\AppserverIo\WebServer\Modules\VirtualHostModule"/>
    <module name="env" type="\AppserverIo\WebServer\Modules\EnvironmentVariableModule" />
    ...
</modules>

These names can then be used for the file handler configuration later on, without the need to know the modules names from the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant