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

Bugfix/zcs 11132 #1224

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/src/java/com/zimbra/common/localconfig/LC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,9 @@ public final class LC {
@Supported
public static final KnownKey redis_cache_synchronize_waitset = KnownKey.newKey(false);

// to switch to Tika com.zimbra.cs.convert.TikaExtractionClient
public static final KnownKey attachment_extraction_client_class = KnownKey.newKey("com.zimbra.cs.convert.LegacyConverterClient");

@Supported
public static final KnownKey lock_based_cache_invalidation_enabled = KnownKey.newKey(true);

Expand Down
2 changes: 2 additions & 0 deletions store-conf/conf/globs2
Original file line number Diff line number Diff line change
Expand Up @@ -743,3 +743,5 @@
50:application/vnd.openxmlformats-officedocument.presentationml.presentation:*.pptm
10:text/x-readme:README*
10:text/x-makefile:Makefile.*
50:text/html:*.har

3 changes: 2 additions & 1 deletion store/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@
<ivy:install organisation="org.apache.curator" module="curator-framework" revision="2.0.1-incubating" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="asm" module="asm" revision="3.3.1" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="oauth" module="oauth" revision="1.4" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.tika" module="tika-core" revision="1.22" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.xmlgraphics" module="batik-css" revision="1.7" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.w3c.css" module="sac" revision="1.3" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.xmlgraphics" module="batik-i18n" revision="1.9" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
Expand Down Expand Up @@ -331,6 +330,8 @@
<ivy:install organisation="org.antlr" module="antlr4-runtime" revision="4.7.1" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.eclipse.jetty" module="jetty-servlets" revision="9.4.18.v20190429" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.eclipse.jetty" module="jetty-servlet" revision="9.4.18.v20190429" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.tukaani" module="xz" revision="1.8" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.commons" module="commons-compress" revision="1.20" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>

<war warfile="${warfile}" webxml="${war.web.xml}">
<fileset dir="WebRoot"/>
Expand Down
10 changes: 5 additions & 5 deletions store/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<dependency org="commons-cli" name="commons-cli" rev="1.2"/>
<dependency org="commons-pool" name="commons-pool" rev="1.6"/>
<dependency org="commons-dbcp" name="commons-dbcp" rev="1.4"/>
<dependency org="commons-codec" name="commons-codec" rev="1.7"/>
<dependency org="commons-io" name="commons-io" rev="1.4"/>
<dependency org="commons-codec" name="commons-codec" rev="1.14"/>
<dependency org="commons-io" name="commons-io" rev="2.6"/>
<dependency org="com.ibm.icu" name="icu4j" rev="4.8.1.1"/>
<dependency org="oauth" name="oauth" rev="1.4"/>
<dependency org="zimbra" name="zm-ews-stub" rev="2.0"/>
Expand Down Expand Up @@ -70,7 +70,7 @@
<dependency org="org.apache.httpcomponents" name="httpcore" rev="${httpclient.httpcore.version}"/>
<dependency org="org.apache.httpcomponents" name="httpcore-nio" rev="${httpclient.httpcore.version}"/>
<dependency org="org.apache.httpcomponents" name="httpmime" rev="${httpclient.version}"/>
<dependency org="org.apache.commons" name="commons-compress" rev="1.10" />
<dependency org="org.apache.commons" name="commons-compress" rev="1.20" />
<dependency org="org.apache.mina" name="mina-core" rev="2.0.4"/>
<dependency org="org.apache.curator" name="curator-recipes" rev="2.0.1-incubating" />
<dependency org="org.apache.curator" name="curator-client" rev="2.0.1-incubating" />
Expand All @@ -97,7 +97,7 @@
<dependency org="cglib" name="cglib" rev="2.2.2" />
<dependency org="cglib" name="cglib-nodep" rev="2.2"/>
<dependency org="org.objenesis" name="objenesis" rev="1.2"/>
<dependency org="asm" name="asm" rev="3.3.1" />
<dependency org="org.ow2.asm" name="asm" rev="8.0.1"/>
<dependency org="zimbra" name="zm-common" rev="latest.integration" />
<dependency org="zimbra" name="zm-soap" rev="latest.integration" />
<dependency org="zimbra" name="zm-client" rev="latest.integration" />
Expand All @@ -124,6 +124,6 @@
<dependency org="org.w3c.css" name="sac" rev="1.3"/>
<dependency org="org.apache.xmlgraphics" name="batik-i18n" rev="1.9"/>
<dependency org="org.apache.xmlgraphics" name="batik-util" rev="1.8"/>
<dependency org="org.apache.tika" name="tika-core" rev="1.22"/>
<dependency org="org.apache.tika" name="tika-app" rev="1.24.1"/>
</dependencies>
</ivy-module>
5 changes: 1 addition & 4 deletions store/src/java/com/zimbra/cs/service/FileUploadServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -55,7 +54,6 @@
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.tika.Tika;

import com.google.common.base.Strings;
import com.zimbra.client.ZMailbox;
Expand Down Expand Up @@ -722,8 +720,7 @@ List<Upload> handlePlainUpload(HttpServletRequest req, HttpServletResponse resp,
if (filename.endsWith(".har")) {
File file = ((DiskFileItem) fi).getStoreLocation();
try {
Tika tika = new Tika();
String mimeType = tika.detect(file);
String mimeType = MimeDetect.getMimeDetect().detect(file);
if (mimeType != null) {
up.contentType = mimeType;
}
Expand Down