diff --git a/src/main/java/jp/sf/fess/action/IndexAction.java b/src/main/java/jp/sf/fess/action/IndexAction.java index 6bcc76928..4801081d0 100644 --- a/src/main/java/jp/sf/fess/action/IndexAction.java +++ b/src/main/java/jp/sf/fess/action/IndexAction.java @@ -317,7 +317,7 @@ public class IndexAction { } } - if (url.startsWith("file:")) { + if (isFileSystemPath(url)) { if (Constants.TRUE.equals(crawlerProperties.getProperty( Constants.SEARCH_FILE_PROXY_PROPERTY, Constants.TRUE))) { final CrawlingConfigHelper crawlingConfigHelper = SingletonS2Container @@ -370,6 +370,10 @@ public class IndexAction { return null; } + protected boolean isFileSystemPath(final String url) { + return url.startsWith("file:") || url.startsWith("smb:"); + } + protected String doSearchInternal() { final StringBuilder queryBuf = new StringBuilder(255); if (StringUtil.isNotBlank(indexForm.query)) { diff --git a/src/main/java/jp/sf/fess/helper/CrawlingConfigHelper.java b/src/main/java/jp/sf/fess/helper/CrawlingConfigHelper.java index 9abe8660f..f5650432c 100644 --- a/src/main/java/jp/sf/fess/helper/CrawlingConfigHelper.java +++ b/src/main/java/jp/sf/fess/helper/CrawlingConfigHelper.java @@ -96,6 +96,9 @@ public class CrawlingConfigHelper implements Serializable { } public void writeContent(final Map doc) { + if (logger.isDebugEnabled()) { + logger.debug("writing the content of: " + doc); + } final Object configIdObj = doc.get(configIdField); if (configIdObj == null || configIdObj.toString().length() < 2) { throw new FessSystemException("Invalid configId: " + configIdObj); @@ -103,6 +106,9 @@ public class CrawlingConfigHelper implements Serializable { final String configType = configIdObj.toString().substring(0, 1); final String idStr = configIdObj.toString().substring(1); CrawlingConfig config = null; + if (logger.isDebugEnabled()) { + logger.debug("configType: " + configType + ", idStr: " + idStr); + } if (Constants.WEB_CONFIG_ID_PREFIX.equals(configType)) { final WebCrawlingConfigService webCrawlingConfigService = SingletonS2Container .getComponent(WebCrawlingConfigService.class); @@ -151,6 +157,9 @@ public class CrawlingConfigHelper implements Serializable { IOUtils.closeQuietly(is); IOUtils.closeQuietly(os); } + if (logger.isDebugEnabled()) { + logger.debug("Finished to write " + url); + } } protected void writeNoCache(final HttpServletResponse response, @@ -179,6 +188,11 @@ public class CrawlingConfigHelper implements Serializable { name = URLDecoder.decode(url, charset); } + if (logger.isDebugEnabled()) { + logger.debug("userAgentType: " + userAgentType + ", charset: " + + charset + ", name: " + name); + } + switch (userAgentType) { case IE: response.setHeader( @@ -215,6 +229,9 @@ public class CrawlingConfigHelper implements Serializable { protected void writeContentType(final HttpServletResponse response, final ResponseData responseData) { final String mimeType = responseData.getMimeType(); + if (logger.isDebugEnabled()) { + logger.debug("mimeType: " + mimeType); + } if (mimeType == null) { return; } diff --git a/src/test/resources/app_ut.dicon b/src/test/resources/app_ut.dicon index b41e11ab7..5bb411a0e 100644 --- a/src/test/resources/app_ut.dicon +++ b/src/test/resources/app_ut.dicon @@ -47,6 +47,8 @@ true --> + + "Fess Robot/1.0"