Author: cziegeler Date: Mon Jul 10 14:15:01 2017 New Revision: 1801471 URL: http://svn.apache.org/viewvc?rev=1801471&view=rev Log: Remove R7 features
Removed: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PreprocessorHandler.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/UploadTest.java Modified: felix/trunk/http/base/pom.xml felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RegistryRuntime.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/ServletDTOBuilder.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java felix/trunk/http/bridge/pom.xml felix/trunk/http/itest/pom.xml felix/trunk/http/jetty/pom.xml Modified: felix/trunk/http/base/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/http/base/pom.xml?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/pom.xml (original) +++ felix/trunk/http/base/pom.xml Mon Jul 10 14:15:01 2017 @@ -49,7 +49,7 @@ <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.api</artifactId> - <version>3.0.1-SNAPSHOT</version> + <version>3.0.0</version> <scope>provided</scope> </dependency> <dependency> Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java Mon Jul 10 14:15:01 2017 @@ -21,7 +21,6 @@ import java.util.Set; import javax.annotation.CheckForNull; import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.ServletRequest; @@ -39,7 +38,6 @@ import org.apache.felix.http.base.intern import org.apache.felix.http.base.internal.registry.PathResolution; import org.apache.felix.http.base.internal.registry.PerContextHandlerRegistry; import org.apache.felix.http.base.internal.whiteboard.WhiteboardManager; -import org.osgi.service.http.whiteboard.Preprocessor; public final class Dispatcher { @@ -87,21 +85,7 @@ public final class Dispatcher mgr.sessionDestroyed(session, ids); } - // invoke preprocessors and then dispatching - mgr.invokePreprocessors(req, res, new Preprocessor() { - - @Override - public void init(final FilterConfig filterConfig) throws ServletException - { - // nothing to do - } - - @Override - public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) - throws IOException, ServletException - { - final HttpServletRequest req = (HttpServletRequest)request; - final HttpServletResponse res = (HttpServletResponse)response; + { // get full decoded path for dispatching // we can't use req.getRequestURI() or req.getRequestURL() as these are returning the encoded path String path = req.getServletPath(); @@ -160,14 +144,7 @@ public final class Dispatcher { servletContext.getServletRequestListener().requestDestroyed(new ServletRequestEvent(servletContext, wrappedRequest)); } - } } - - @Override - public void destroy() - { - // nothing to do - } - }); - + } + } } } Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java Mon Jul 10 14:15:01 2017 @@ -87,26 +87,8 @@ public class ServletInfo extends Whitebo this.errorPage = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_ERROR_PAGE); this.patterns = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN); this.asyncSupported = getBooleanProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED); - if ( getBooleanProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_MULTIPART_ENABLED) ) - { - MultipartConfig cfg = null; - try - { - cfg = new MultipartConfig(getIntProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_MULTIPART_FILESIZETHRESHOLD), - getStringProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_MULTIPART_LOCATION), - getLongProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXFILESIZE), - getLongProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_MULTIPART_MAXREQUESTSIZE)); - } - catch (final IllegalArgumentException iae) - { - cfg = MultipartConfig.INVALID_CONFIG; - } - this.multipartConfig = cfg; - } - else - { - this.multipartConfig = null; - } + this.multipartConfig = null; + this.initParams = getInitParams(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_INIT_PARAM_PREFIX); this.isResource = false; this.prefix = null; Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java Mon Jul 10 14:15:01 2017 @@ -26,14 +26,12 @@ import org.apache.felix.http.base.intern import org.apache.felix.http.base.internal.runtime.AbstractInfo; import org.apache.felix.http.base.internal.runtime.FilterInfo; import org.apache.felix.http.base.internal.runtime.ListenerInfo; -import org.apache.felix.http.base.internal.runtime.PreprocessorInfo; import org.apache.felix.http.base.internal.runtime.ResourceInfo; import org.apache.felix.http.base.internal.runtime.ServletContextHelperInfo; import org.apache.felix.http.base.internal.runtime.ServletInfo; import org.osgi.service.http.runtime.dto.FailedErrorPageDTO; import org.osgi.service.http.runtime.dto.FailedFilterDTO; import org.osgi.service.http.runtime.dto.FailedListenerDTO; -import org.osgi.service.http.runtime.dto.FailedPreprocessorDTO; import org.osgi.service.http.runtime.dto.FailedResourceDTO; import org.osgi.service.http.runtime.dto.FailedServletContextDTO; import org.osgi.service.http.runtime.dto.FailedServletDTO; @@ -53,8 +51,6 @@ public final class FailedDTOHolder public final List<FailedServletContextDTO> failedServletContextDTOs = new ArrayList<FailedServletContextDTO>(); - public final List<FailedPreprocessorDTO> failedPreprocessorDTOs = new ArrayList<FailedPreprocessorDTO>(); - public void add(final AbstractInfo<?> info, final long contextId, final int failureCode) { if (info instanceof ServletContextHelperInfo) @@ -83,8 +79,8 @@ public final class FailedDTOHolder if ( ((ServletInfo) info).getPatterns() != null ) { dto.patterns = ((ServletInfo) info).getPatterns(); - } - else + } + else { dto.patterns = BuilderConstants.EMPTY_STRING_ARRAY; } @@ -114,11 +110,6 @@ public final class FailedDTOHolder dto.servletContextId = contextId; this.failedListenerDTOs.add(dto); } - else if ( info instanceof PreprocessorInfo ) - { - final FailedPreprocessorDTO dto = (FailedPreprocessorDTO)PreprocessorDTOBuilder.build((PreprocessorInfo) info, failureCode); - this.failedPreprocessorDTOs.add(dto); - } else { SystemLogger.error("Unsupported info type: " + info.getClass(), null); Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RegistryRuntime.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RegistryRuntime.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RegistryRuntime.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RegistryRuntime.java Mon Jul 10 14:15:01 2017 @@ -20,22 +20,18 @@ package org.apache.felix.http.base.inter import java.util.Collection; -import org.osgi.service.http.runtime.dto.PreprocessorDTO; import org.osgi.service.http.runtime.dto.ServletContextDTO; public final class RegistryRuntime { private final Collection<ServletContextDTO> contextDTOs; private final FailedDTOHolder failedDTOHolder; - private final Collection<PreprocessorDTO> preprocessorDTOs; public RegistryRuntime(final FailedDTOHolder failedDTOHolder, - final Collection<ServletContextDTO> contextDTOs, - final Collection<PreprocessorDTO> preprocessorDTOs) + final Collection<ServletContextDTO> contextDTOs) { this.failedDTOHolder = failedDTOHolder; this.contextDTOs = contextDTOs; - this.preprocessorDTOs = preprocessorDTOs; } public FailedDTOHolder getFailedDTOHolder() @@ -47,9 +43,4 @@ public final class RegistryRuntime { return this.contextDTOs; } - - public Collection<PreprocessorDTO> getPreprocessorDTOs() - { - return this.preprocessorDTOs; - } } Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java Mon Jul 10 14:15:01 2017 @@ -30,11 +30,9 @@ import org.osgi.service.http.runtime.Htt import org.osgi.service.http.runtime.dto.FailedErrorPageDTO; import org.osgi.service.http.runtime.dto.FailedFilterDTO; import org.osgi.service.http.runtime.dto.FailedListenerDTO; -import org.osgi.service.http.runtime.dto.FailedPreprocessorDTO; import org.osgi.service.http.runtime.dto.FailedResourceDTO; import org.osgi.service.http.runtime.dto.FailedServletContextDTO; import org.osgi.service.http.runtime.dto.FailedServletDTO; -import org.osgi.service.http.runtime.dto.PreprocessorDTO; import org.osgi.service.http.runtime.dto.RuntimeDTO; import org.osgi.service.http.runtime.dto.ServletContextDTO; @@ -55,7 +53,6 @@ public final class RuntimeDTOBuilder final RuntimeDTO runtimeDTO = new RuntimeDTO(); runtimeDTO.serviceDTO = createServiceDTO(); runtimeDTO.servletContextDTOs = createContextDTOs(); - runtimeDTO.preprocessorDTOs = createPreprocessorDTOs(); runtimeDTO.failedErrorPageDTOs = registry.getFailedDTOHolder().failedErrorPageDTOs.toArray(new FailedErrorPageDTO[registry.getFailedDTOHolder().failedErrorPageDTOs.size()]); runtimeDTO.failedFilterDTOs = registry.getFailedDTOHolder().failedFilterDTOs.toArray(new FailedFilterDTO[registry.getFailedDTOHolder().failedFilterDTOs.size()]); @@ -63,7 +60,6 @@ public final class RuntimeDTOBuilder runtimeDTO.failedResourceDTOs = registry.getFailedDTOHolder().failedResourceDTOs.toArray(new FailedResourceDTO[registry.getFailedDTOHolder().failedResourceDTOs.size()]); runtimeDTO.failedServletContextDTOs = registry.getFailedDTOHolder().failedServletContextDTOs.toArray(new FailedServletContextDTO[registry.getFailedDTOHolder().failedServletContextDTOs.size()]); runtimeDTO.failedServletDTOs = registry.getFailedDTOHolder().failedServletDTOs.toArray(new FailedServletDTO[registry.getFailedDTOHolder().failedServletDTOs.size()]); - runtimeDTO.failedPreprocessorDTOs = registry.getFailedDTOHolder().failedPreprocessorDTOs.toArray(new FailedPreprocessorDTO[registry.getFailedDTOHolder().failedPreprocessorDTOs.size()]); return runtimeDTO; } @@ -102,10 +98,4 @@ public final class RuntimeDTOBuilder final Collection<ServletContextDTO> contexts = registry.getServletContextDTOs(); return contexts.toArray(new ServletContextDTO[contexts.size()]); } - - private PreprocessorDTO[] createPreprocessorDTOs() - { - final Collection<PreprocessorDTO> dtos = registry.getPreprocessorDTOs(); - return dtos.toArray(new PreprocessorDTO[dtos.size()]); - } } Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/ServletDTOBuilder.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/ServletDTOBuilder.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/ServletDTOBuilder.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/runtime/dto/ServletDTOBuilder.java Mon Jul 10 14:15:01 2017 @@ -18,7 +18,6 @@ */ package org.apache.felix.http.base.internal.runtime.dto; -import org.apache.felix.http.base.internal.dispatch.MultipartConfig; import org.apache.felix.http.base.internal.handler.ServletHandler; import org.apache.felix.http.base.internal.runtime.ServletInfo; import org.osgi.service.http.runtime.dto.FailedServletDTO; @@ -58,15 +57,6 @@ public final class ServletDTOBuilder ext } dto.patterns = BuilderConstants.EMPTY_STRING_ARRAY; - final MultipartConfig config = info.getMultipartConfig(); - dto.multipartEnabled = config != null; - if ( config != null ) - { - dto.multipartFileSizeThreshold = config.multipartThreshold; - dto.multipartLocation = config.multipartLocation; - dto.multipartMaxFileSize = config.multipartMaxFileSize; - dto.multipartMaxRequestSize = config.multipartMaxRequestSize; - } return dto; } } Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java Mon Jul 10 14:15:01 2017 @@ -21,7 +21,6 @@ import static org.osgi.service.http.runt import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_UNKNOWN; import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_VALIDATION_FAILED; -import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -32,18 +31,11 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; import javax.annotation.Nonnull; -import javax.servlet.FilterChain; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionEvent; @@ -53,7 +45,6 @@ import org.apache.felix.http.base.intern import org.apache.felix.http.base.internal.handler.HttpServiceServletHandler; import org.apache.felix.http.base.internal.handler.HttpSessionWrapper; import org.apache.felix.http.base.internal.handler.ListenerHandler; -import org.apache.felix.http.base.internal.handler.PreprocessorHandler; import org.apache.felix.http.base.internal.handler.ServletHandler; import org.apache.felix.http.base.internal.handler.WhiteboardFilterHandler; import org.apache.felix.http.base.internal.handler.WhiteboardListenerHandler; @@ -64,13 +55,11 @@ import org.apache.felix.http.base.intern import org.apache.felix.http.base.internal.runtime.AbstractInfo; import org.apache.felix.http.base.internal.runtime.FilterInfo; import org.apache.felix.http.base.internal.runtime.ListenerInfo; -import org.apache.felix.http.base.internal.runtime.PreprocessorInfo; import org.apache.felix.http.base.internal.runtime.ResourceInfo; import org.apache.felix.http.base.internal.runtime.ServletContextHelperInfo; import org.apache.felix.http.base.internal.runtime.ServletInfo; import org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo; import org.apache.felix.http.base.internal.runtime.dto.FailedDTOHolder; -import org.apache.felix.http.base.internal.runtime.dto.PreprocessorDTOBuilder; import org.apache.felix.http.base.internal.runtime.dto.RegistryRuntime; import org.apache.felix.http.base.internal.runtime.dto.ServletContextDTOBuilder; import org.apache.felix.http.base.internal.service.HttpServiceFactory; @@ -78,7 +67,6 @@ import org.apache.felix.http.base.intern import org.apache.felix.http.base.internal.service.ResourceServlet; import org.apache.felix.http.base.internal.whiteboard.tracker.FilterTracker; import org.apache.felix.http.base.internal.whiteboard.tracker.ListenersTracker; -import org.apache.felix.http.base.internal.whiteboard.tracker.PreprocessorTracker; import org.apache.felix.http.base.internal.whiteboard.tracker.ResourceTracker; import org.apache.felix.http.base.internal.whiteboard.tracker.ServletContextHelperTracker; import org.apache.felix.http.base.internal.whiteboard.tracker.ServletTracker; @@ -94,10 +82,8 @@ import org.osgi.service.http.context.Ser import org.osgi.service.http.runtime.HttpServiceRuntime; import org.osgi.service.http.runtime.HttpServiceRuntimeConstants; import org.osgi.service.http.runtime.dto.DTOConstants; -import org.osgi.service.http.runtime.dto.PreprocessorDTO; import org.osgi.service.http.runtime.dto.ServletContextDTO; import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; -import org.osgi.service.http.whiteboard.Preprocessor; import org.osgi.util.tracker.ServiceTracker; public final class WhiteboardManager @@ -120,8 +106,6 @@ public final class WhiteboardManager /** A map with all servlet/filter registrations, mapped by abstract info. */ private final Map<WhiteboardServiceInfo<?>, List<WhiteboardContextHandler>> servicesMap = new HashMap<WhiteboardServiceInfo<?>, List<WhiteboardContextHandler>>(); - private volatile List<PreprocessorHandler> preprocessorHandlers = Collections.emptyList(); - private final HandlerRegistry registry; private final FailureStateHandler failureStateHandler = new FailureStateHandler(); @@ -210,7 +194,6 @@ public final class WhiteboardManager }, props); addTracker(new FilterTracker(this.httpBundleContext, this)); addTracker(new ListenersTracker(this.httpBundleContext, this)); - addTracker(new PreprocessorTracker(this.httpBundleContext, this)); addTracker(new ResourceTracker(this.httpBundleContext, this)); addTracker(new ServletContextHelperTracker(this.httpBundleContext, this)); addTracker(new ServletTracker(this.httpBundleContext, this)); @@ -242,7 +225,6 @@ public final class WhiteboardManager this.serviceRuntime.setServiceReference(null); - this.preprocessorHandlers = Collections.emptyList(); this.contextMap.clear(); this.servicesMap.clear(); this.failureStateHandler.clear(); @@ -565,7 +547,7 @@ public final class WhiteboardManager final Map<String, String> props = new HashMap<String, String>(); props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, h.getContextInfo().getName()); props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, h.getContextInfo().getPath()); - props.put(HttpWhiteboardConstants.HTTP_SERVICE_CONTEXT_PROPERTY, h.getContextInfo().getName()); + props.put("osgi.http.whiteboard.context.httpservice", h.getContextInfo().getName()); if ( info.getContextSelectionFilter().matches(props) ) { @@ -590,28 +572,6 @@ public final class WhiteboardManager { if ( info.isValid() ) { - if ( info instanceof PreprocessorInfo ) - { - final PreprocessorHandler handler = new PreprocessorHandler(this.httpBundleContext, - this.webContext, ((PreprocessorInfo)info)); - final int result = handler.init(); - if ( result == -1 ) - { - synchronized ( this.preprocessorHandlers ) - { - final List<PreprocessorHandler> newList = new ArrayList<PreprocessorHandler>(this.preprocessorHandlers); - newList.add(handler); - Collections.sort(newList); - this.preprocessorHandlers = newList; - } - } - else - { - this.failureStateHandler.addFailure(info, FAILURE_REASON_VALIDATION_FAILED); - } - updateRuntimeChangeCount(); - return true; - } synchronized ( this.contextMap ) { final List<WhiteboardContextHandler> handlerList = this.getMatchingContexts(info); @@ -681,7 +641,7 @@ public final class WhiteboardManager final boolean patternIsEmpty = servletInfo.getPatterns() == null || servletInfo.getPatterns().length == 0; if ( !nameIsEmpty || !errorPageIsEmpty ) { - if ( patternIsEmpty ) + if ( patternIsEmpty ) { // no pattern, so this is valid return -1; @@ -691,7 +651,7 @@ public final class WhiteboardManager // pattern is invalid, regardless of the other values this.failureStateHandler.addFailure(info, HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID, DTOConstants.FAILURE_REASON_VALIDATION_FAILED); - return DTOConstants.FAILURE_REASON_VALIDATION_FAILED; + return DTOConstants.FAILURE_REASON_VALIDATION_FAILED; } } @@ -709,27 +669,6 @@ public final class WhiteboardManager { if ( !failureStateHandler.remove(info) ) { - if ( info instanceof PreprocessorInfo ) - { - synchronized ( this.preprocessorHandlers ) - { - final List<PreprocessorHandler> newList = new ArrayList<PreprocessorHandler>(this.preprocessorHandlers); - final Iterator<PreprocessorHandler> iter = newList.iterator(); - while ( iter.hasNext() ) - { - final PreprocessorHandler handler = iter.next(); - if ( handler.getPreprocessorInfo().compareTo((PreprocessorInfo)info) == 0 ) - { - iter.remove(); - this.preprocessorHandlers = newList; - updateRuntimeChangeCount(); - return; - } - } - // not found, nothing to do - } - return; - } final List<WhiteboardContextHandler> handlerList = this.servicesMap.remove(info); if ( handlerList != null ) { @@ -964,60 +903,7 @@ public final class WhiteboardManager } } - final List<PreprocessorDTO> preprocessorDTOs = new ArrayList<PreprocessorDTO>(); - final List<PreprocessorHandler> localHandlers = this.preprocessorHandlers; - for(final PreprocessorHandler handler : localHandlers) - { - preprocessorDTOs.add(PreprocessorDTOBuilder.build(handler.getPreprocessorInfo(), -1)); - } - - return new RegistryRuntime(failedDTOHolder, contextDTOs, preprocessorDTOs); - } - - /** - * Invoke all preprocessors - * - * @param req The request - * @param res The response - * @return {@code true} to continue with dispatching, {@code false} to terminate the request. - * @throws IOException - * @throws ServletException - */ - public void invokePreprocessors(final HttpServletRequest req, - final HttpServletResponse res, - final Preprocessor dispatcher) - throws ServletException, IOException - { - final List<PreprocessorHandler> localHandlers = this.preprocessorHandlers; - if ( localHandlers.isEmpty() ) - { - // no preprocessors, we can directly execute - dispatcher.doFilter(req, res, null); - } - else - { - final FilterChain chain = new FilterChain() - { - private int index = 0; - - @Override - public void doFilter(final ServletRequest request, final ServletResponse response) - throws IOException, ServletException - { - if ( index == localHandlers.size() ) - { - dispatcher.doFilter(request, response, null); - } - else - { - final PreprocessorHandler handler = localHandlers.get(index); - index++; - handler.handle(request, response, this); - } - } - }; - chain.doFilter(req, res); - } + return new RegistryRuntime(failedDTOHolder, contextDTOs); } private void updateRuntimeChangeCount() Modified: felix/trunk/http/bridge/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/http/bridge/pom.xml?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/bridge/pom.xml (original) +++ felix/trunk/http/bridge/pom.xml Mon Jul 10 14:15:01 2017 @@ -63,7 +63,7 @@ * </Import-Package> <Provide-Capability> - osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1"; + osgi.implementation;osgi.implementation="osgi.http";version:Version="1.0"; uses:="javax.servlet,javax.servlet.http,org.osgi.service.http.context,org.osgi.service.http.whiteboard", osgi.service;objectClass:List<String>="org.osgi.service.http.runtime.HttpServiceRuntime"; uses:="org.osgi.service.http.runtime,org.osgi.service.http.runtime.dto" @@ -86,7 +86,7 @@ <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.api</artifactId> - <version>3.0.1-SNAPSHOT</version> + <version>3.0.0</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> Modified: felix/trunk/http/itest/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/http/itest/pom.xml?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/itest/pom.xml (original) +++ felix/trunk/http/itest/pom.xml Mon Jul 10 14:15:01 2017 @@ -34,7 +34,7 @@ <felix.java.version>8</felix.java.version> <pax.exam.version>4.4.0</pax.exam.version> <pax.url.aether.version>2.4.1</pax.url.aether.version> - <http.servlet.api.version>1.1.3-SNAPSHOT</http.servlet.api.version> + <http.servlet.api.version>1.1.2</http.servlet.api.version> <http.jetty.version>3.4.3-SNAPSHOT</http.jetty.version> </properties> Modified: felix/trunk/http/jetty/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/pom.xml?rev=1801471&r1=1801470&r2=1801471&view=diff ============================================================================== --- felix/trunk/http/jetty/pom.xml (original) +++ felix/trunk/http/jetty/pom.xml Mon Jul 10 14:15:01 2017 @@ -96,7 +96,7 @@ org.osgi.service.metatype;version="[1.1,2)" </DynamicImport-Package> <Provide-Capability> - osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1"; + osgi.implementation;osgi.implementation="osgi.http";version:Version="1.0"; uses:="javax.servlet,javax.servlet.http,org.osgi.service.http.context,org.osgi.service.http.whiteboard", osgi.service;objectClass:List<String>="org.osgi.service.http.runtime.HttpServiceRuntime"; uses:="org.osgi.service.http.runtime,org.osgi.service.http.runtime.dto"