cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Making reloadability more fine-grained
Date Sun, 04 May 2003 07:37:37 GMT
Hi,

'allow-reload' was switched off during some file upload changes:

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=104946515805696&w=2

I gather this was for security reasons, as its not good to allow random
users to restart Cocoon with ?cocoon-reload=yes

However this also removes the auto-reloading of cocoon.xconf, something I
find very handy.


So how about decoupling those two means of triggering a reload.  Instead
of a single 'allow-reload' flag, have one for cocoon.xconf, and another
for the cocoon-reload request parameter:

<!-- If cocoon.xconf changes, do we reload Cocoon to pick up the change?  -->
<init-param>
<param-name>allow-reload-onchange</param-name>
<param-value>yes</param-value>
</init-param>

<!-- Does ?cocoon-reload=yes params trigger a Cocoon reload? -->
<init-param>
<param-name>allow-reload-parameter</param-name>
<param-value>no</param-value>
</init-param>

Then, to keep backwards-compatibility, the 'allow-reload' parameter acts
as an override:

<!-- Overrides above allow-reload-* parameters
<init-param>
<param-name>allow-reload</param-name>
<param-value>yes</param-value>
</init-param>
-->

(commented out by default)


Does this sound okay?  Attached is the proposed patch to CocoonServlet.


--Jeff


Mime
View raw message