https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412005-12-10T00:28:18Zlighty labsLighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=10692005-12-10T00:28:18ZAnonymous
<ul></ul><p>adding myself to the CC</p>
<p>-- eydaimon</p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=10702008-09-02T00:54:02Zstbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fixed</i></li><li><strong>Resolution</strong> set to <i>invalid</i></li></ul><p>As some modules do more than just checking the syntax while loading the config, we won't change that. And the syntax of your file is ok...</p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=10712008-09-02T01:32:30ZAnonymous
<ul><li><strong>Status</strong> changed from <i>Fixed</i> to <i>Need Feedback</i></li><li><strong>Resolution</strong> deleted (<del><i>invalid</i></del>)</li></ul><p>Then I suggest that:</p>
<pre><code>-t test the config-file, and exit</code></pre>
<p>is changed to read:</p>
<pre><code>-t test config-file for syntax errors, and exit</code></pre> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=90952016-03-06T21:13:27Zgstrauss
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/9095/diff?detail_id=7061">diff</a>)</li></ul><p><a class="user active user-mention" href="https://redmine.lighttpd.net/users/7">@stbuehler</a>, what would you think of extending the -t flag so that if provided more than once on command line (e.g. "-tt" or "-t -t"), that config processing continues, loads all modules, and exits after checking for unused/deprecated config keys?</p>
<p>Anything that with potentially destructive behavior would have to be skipped, such as overwriting pidfile. daemonizing would be disabled to keep process in foreground and stderr attached. network_init() would need to be passed an extra flags to indicate "check_only" so as not to attempt to bind() to potentially in-use addresses. plugin hooks 'init' and 'set_defaults', called by plugins_call_init() and plugins_call_set_defaults(), would need to take an "check-only" flag, too, so this would be a breaking change to third-party modules, similar to the change in 1.4.38 in r3049 which extended function signature of config_insert_values_internal(). For most modules, they would still perform their complete setup routine, but there might be a few which need to skip a few actions and the "check-only" flag would communicate that.</p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=91072016-03-08T05:17:21Zgstrauss
<ul></ul><p>Instead of changing the function signatures, a much less invasive way to make the change would be to add a flag 'preflight_check' to server_config (srv->srvconf) (e.g. right along with 'dont_daemonize' member)</p>
<p>I looked through the code and these places would need to check for srv->srvconf.preflight_check:<br /> server.c:main()<br /> skip pidfile creation<br /> skip daemonizing<br /> skip log_error_open()<br /> network.c:network_server_init()<br /> skip bind() to sockets</p>
<p>Skipping error log and access log opens is not technically required for a startup test, but probably still a good idea to avoid triggering custom behavior by piped loggers<br /> server.c:main()<br /> skip log_error_open()<br /> mod_accesslog.c:log_access_open()<br /> skip open_log_file_or_pipe()</p>
<p><a class="user active user-mention" href="https://redmine.lighttpd.net/users/7">@stbuehler</a>, think you would accept a patch for this if I created one?</p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=91322016-03-19T12:03:52Zstbuehler
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Feature</i></li><li><strong>Assignee</strong> deleted (<del><i>jan</i></del>)</li></ul><p><a class="user active user-mention" href="https://redmine.lighttpd.net/users/10519">@gstrauss</a>: No promises on acceptance or review time :) But I'm open to the idea.</p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=91582016-03-20T08:44:39Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Need Feedback</i> to <i>Patch Pending</i></li></ul><p>Submitted pull request <a class="external" href="https://github.com/lighttpd/lighttpd1.4/pull/44">https://github.com/lighttpd/lighttpd1.4/pull/44</a></p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=91592016-03-20T08:45:40Zgstrauss
<ul></ul><p>Turned out not to be a very large change:<br /><a class="external" href="https://github.com/lighttpd/lighttpd1.4/pull/44">https://github.com/lighttpd/lighttpd1.4/pull/44</a><br /><pre>
src/base.h | 1 +
src/mod_accesslog.c | 2 ++
src/network.c | 12 ++++++++++--
src/server.c | 23 ++++++++++++++++++++---
4 files changed, 33 insertions(+), 5 deletions(-)
</pre></p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=91832016-03-26T13:40:05Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset r3130.</p> Lighttpd - Feature #411: typo in config file did not show up in a config-testhttps://redmine.lighttpd.net/issues/411?journal_id=91842016-03-26T13:40:19Zstbuehler
<ul><li><strong>Target version</strong> set to <i>1.4.40</i></li></ul>