Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-80123

Struts does not reflect Text-Encoding setting change immediately

    XMLWordPrintable

Details

    Description

      The following Struts properties are loaded on startup by ConfluenceStrutsSettings via ConfluenceStrutsConfigurationProvider (and reloaded on plugin install/uninstall):

      • struts.i18n.encoding
      • struts.multipart.maxFileSize (custom property)

      However, these property values should immediately reflect Confluence settings as set by `/admin/viewgeneralconfig.action`

      A Strut configuration reload should be triggered when those settings are changed. However, Struts has no mechanism to wait until completion of any pending requests prior to triggering the reload. So reloading immediately will cause any pending requests to malfunction including the request that changed these properties. A delayed reload of between 0.25-0.5s seems to remedy this issue (in the integration tests), however, it causes integration tests for the OfficeConnector plugin to fail. We are yet to investigate this further.

      Workaround

      Currently, for `struts.multipart.maxFileSize`, we are using the workaround of retrieving the AttachmentMaxFileSize directly from the SettingsService from ConfluenceJakartaMultipartRequest. So this functionality is not affected.

      We have no workaround for the text encoding property, and it will not be reflected in Struts until a server restart or plugin install/uninstall.

      Attachments

        Issue Links

          Activity

            People

              854eef6f5746 Kusal Kithul-Godage
              854eef6f5746 Kusal Kithul-Godage
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: