/** * Shortcut to same property on underlying {@link #setUrlPathHelper UrlPathHelper}. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
/** * Set if ";" (semicolon) content should be stripped from the request URI. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
/** * Set if ";" (semicolon) content should be stripped from the request URI. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
/** * Shortcut to same property on underlying {@link #setUrlPathHelper UrlPathHelper}. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
/** * Set if ";" (semicolon) content should be stripped from the request URI. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
/** * Set if ";" (semicolon) content should be stripped from the request URI. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
/** * Shortcut to same property on underlying {@link #setUrlPathHelper UrlPathHelper}. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource) { ((UrlBasedCorsConfigurationSource)this.corsConfigurationSource).setRemoveSemicolonContent(removeSemicolonContent); } }
public ForwardedHeaderFilter() { this.pathHelper = new UrlPathHelper(); this.pathHelper.setUrlDecode(false); this.pathHelper.setRemoveSemicolonContent(false); }
/** * Shortcut to same property on underlying {@link #setUrlPathHelper UrlPathHelper}. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource) { ((UrlBasedCorsConfigurationSource)this.corsConfigurationSource).setRemoveSemicolonContent(removeSemicolonContent); } }
public ForwardedHeaderFilter() { this.pathHelper = new UrlPathHelper(); this.pathHelper.setUrlDecode(false); this.pathHelper.setRemoveSemicolonContent(false); }
@Test public void getLookupPathWithSemicolonContent() { helper.setRemoveSemicolonContent(false); request.setContextPath("/petclinic"); request.setServletPath("/main"); request.setRequestURI("/petclinic;a=b/main;b=c/welcome.html;c=d"); assertEquals("/welcome.html;c=d", helper.getLookupPathForRequest(request)); }
@Test public void getLookupPathWithSemicolonContentAndNullPathInfo() { helper.setRemoveSemicolonContent(false); request.setContextPath("/petclinic"); request.setServletPath("/welcome.html"); request.setRequestURI("/petclinic;a=b/welcome.html;c=d"); assertEquals("/welcome.html;c=d", helper.getLookupPathForRequest(request)); }
@Test // SPR-10140, SPR-16867 public void handleMatchMatrixVariablesDecoding() { MockHttpServletRequest request; UrlPathHelper urlPathHelper = new UrlPathHelper(); urlPathHelper.setUrlDecode(false); urlPathHelper.setRemoveSemicolonContent(false); this.handlerMapping.setUrlPathHelper(urlPathHelper); request = new MockHttpServletRequest(); handleMatch(request, "/{cars}", "/cars;mvar=a%2Fb"); MultiValueMap<String, String> matrixVariables = getMatrixVariables(request, "cars"); Map<String, String> uriVariables = getUriTemplateVariables(request); assertNotNull(matrixVariables); assertEquals(Collections.singletonList("a/b"), matrixVariables.get("mvar")); assertEquals("cars", uriVariables.get("cars")); }
@Test public void getRequestRemoveSemicolonContent() throws UnsupportedEncodingException { helper.setRemoveSemicolonContent(true); request.setRequestURI("/foo;f=F;o=O;o=O/bar;b=B;a=A;r=R"); assertEquals("/foo/bar", helper.getRequestUri(request)); // SPR-13455 request.setServletPath("/foo/1"); request.setRequestURI("/foo/;test/1"); assertEquals("/foo/1", helper.getRequestUri(request)); }
@Test public void getRequestKeepSemicolonContent() throws UnsupportedEncodingException { helper.setRemoveSemicolonContent(false); request.setRequestURI("/foo;a=b;c=d"); assertEquals("/foo;a=b;c=d", helper.getRequestUri(request)); request.setRequestURI("/foo;jsessionid=c0o7fszeb1"); assertEquals("jsessionid should always be removed", "/foo", helper.getRequestUri(request)); request.setRequestURI("/foo;a=b;jsessionid=c0o7fszeb1;c=d"); assertEquals("jsessionid should always be removed", "/foo;a=b;c=d", helper.getRequestUri(request)); // SPR-10398 request.setRequestURI("/foo;a=b;JSESSIONID=c0o7fszeb1;c=d"); assertEquals("JSESSIONID should always be removed", "/foo;a=b;c=d", helper.getRequestUri(request)); }
/** * Set if ";" (semicolon) content should be stripped from the request URI. * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) */ public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); }
public HeimdallDecorationFilter(ProxyRouteLocator routeLocator, String dispatcherServletPath, ZuulProperties properties, ProxyRequestHelper proxyRequestHelper, OperationRepository operationRepository, RequestHelper requestHelper) { super(routeLocator, dispatcherServletPath, properties, proxyRequestHelper); this.routeLocator = routeLocator; this.properties = properties; this.urlPathHelper.setRemoveSemicolonContent(properties.isRemoveSemicolonContent()); this.dispatcherServletPath = dispatcherServletPath; this.proxyRequestHelper = proxyRequestHelper; this.operationRepository = operationRepository; this.zuulServletPath = properties.getServletPath(); this.requestHelper = requestHelper; }
@Override public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = new UrlPathHelper(); //we need below for @MatrixVariable urlPathHelper.setRemoveSemicolonContent(false); configurer.setUrlPathHelper(urlPathHelper); }
public ForwardedHeaderFilter() { this.pathHelper = new UrlPathHelper(); this.pathHelper.setUrlDecode(false); this.pathHelper.setRemoveSemicolonContent(false); }
public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = configurer.getUrlPathHelper(); if (null == urlPathHelper){ urlPathHelper = new UrlPathHelper(); } urlPathHelper.setRemoveSemicolonContent(false); configurer.setUrlPathHelper(urlPathHelper); }