String targetUrl, boolean http10Compatible) throws IOException { String encodedURL = (isRemoteHost(targetUrl) ? targetUrl : response.encodeRedirectURL(targetUrl)); if (http10Compatible) { HttpStatus attributeStatusCode = (HttpStatus) request.getAttribute(View.RESPONSE_STATUS_ATTRIBUTE);
String targetUrl, boolean http10Compatible) throws IOException { String encodedURL = (isRemoteHost(targetUrl) ? targetUrl : response.encodeRedirectURL(targetUrl)); if (http10Compatible) { HttpStatus attributeStatusCode = (HttpStatus) request.getAttribute(View.RESPONSE_STATUS_ATTRIBUTE);
@Test // SPR-13693 public void remoteHost() throws Exception { RedirectView rv = new RedirectView(); assertFalse(rv.isRemoteHost("http://url.somewhere.com")); assertFalse(rv.isRemoteHost("/path")); assertFalse(rv.isRemoteHost("http://url.somewhereelse.com")); rv.setHosts(new String[] {"url.somewhere.com"}); assertFalse(rv.isRemoteHost("http://url.somewhere.com")); assertFalse(rv.isRemoteHost("/path")); assertTrue(rv.isRemoteHost("http://url.somewhereelse.com")); }
String targetUrl, boolean http10Compatible) throws IOException { String encodedURL = (isRemoteHost(targetUrl) ? targetUrl : response.encodeRedirectURL(targetUrl)); if (http10Compatible) { HttpStatus attributeStatusCode = (HttpStatus) request.getAttribute(View.RESPONSE_STATUS_ATTRIBUTE);