Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.felix.http.base.internal.logger.SystemLogger;
import org.apache.felix.http.base.internal.runtime.PreprocessorInfo;
import org.apache.felix.http.base.internal.wrappers.PreprocessorWrapper;
import org.jetbrains.annotations.NotNull;
import org.osgi.framework.BundleContext;
import org.osgi.service.servlet.runtime.dto.DTOConstants;
Expand All @@ -30,6 +31,7 @@
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;

/**
* The preprocessor handler handles the initialization and destruction of preprocessor
Expand Down Expand Up @@ -129,6 +131,16 @@ public void handle(@NotNull final ServletRequest req,
final Preprocessor local = this.preprocessor;
if ( local != null )
{
if (SystemLogger.LOGGER.isDebugEnabled()) {
HttpServletRequest hRequest = (HttpServletRequest) req;
if (local instanceof org.apache.felix.http.base.internal.wrappers.PreprocessorWrapper) {
PreprocessorWrapper tmpLocal = (org.apache.felix.http.base.internal.wrappers.PreprocessorWrapper) local;
SystemLogger.LOGGER.debug("Invoking OSGi preprocessor {} for path {}", tmpLocal.getPreprocessor().getClass().getName(), hRequest.getRequestURI());
} else {
SystemLogger.LOGGER.debug("Invoking OSGi preprocessor {} for path {}", local.getClass().getName(), hRequest.getRequestURI());
}

}
local.doFilter(req, res, chain);
}
else
Expand Down