title: myfaces ExtensionsFilter corrupt xlsx during download
body: <p>I'm uploading and downloading .xlsx file <strong>on the same page</strong> using jsf 1.2 and tomahawk inputFileUpload. Upload works fine, even with max file size limitation. When I download and open some Excel spreadsheet I get error with corrupted file. Excel will fix the file but it's annoying to repair it every time. This error is caused by ExtensionFilter in web.xml. When I remove filter from web.xml all works fine.</p>
  
  <p>Is there any solution how to prevent intercepting ExtensionFilter while downloading? Or is there any other way how to manage max file size before I upload file? Thank you</p>
  
  <pre><code>&lt;h:form id="upload_form" styleClass="form" enctype="multipart/form-data"&gt;
      &lt;t:saveState value="#{editedPeriodBean.editedPeriod}" /&gt;
          &lt;h:panelGrid columns="1"&gt;
               &lt;h:outputLabel for="file" value="#{ms['com.selectFile']}:" styleClass="full" /&gt;
               &lt;t:inputFileUpload id="file" value="#{editedPeriodBean.uploadedFile}" required="true" onchange="verifyFile(this);"  /&gt;
               &lt;h:commandButton id="submit_btn" value="#{ms['com.import']}" action="#{editedPeriodBean.importPaymentsToEditedPeriod}" disabled="true" styleClass="align_right" /&gt;
          &lt;/h:panelGrid&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;filter&gt;
          &lt;filter-name&gt;Extensions Filter&lt;/filter-name&gt;
          &lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt;
              &lt;init-param&gt;
                  &lt;description&gt;
                      Set the size limit for uploaded files.
                          Format: 10  - 10 bytes
                                  10k - 10 KB
                                  10m - 10 MB
                                  1g  - 1 GB
                  &lt;/description&gt;
                  &lt;param-name&gt;uploadMaxFileSize&lt;/param-name&gt;
                  &lt;param-value&gt;20m&lt;/param-value&gt;
              &lt;/init-param&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;Extensions Filter&lt;/filter-name&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;/filter-mapping&gt;
  </code></pre>