throw new CloudRuntimeException("Call failed: Bad redirect from UCS Manager"); post.setURI(new URI(redirectLocation)); result = client.executeMethod(post);
post.setURI(new URI(redirectLocation, true)); httpClient.executeMethod(post);
post.setURI(new URI(redirectLocation, true)); httpClient.executeMethod(post);
protected void resetClientForRedirect() throws XmlRpcException { //get the location header to find out where to redirect to Header locationHeader = method.getResponseHeader("location"); if (locationHeader == null) { throw new XmlRpcException("Invalid redirect: Missing location header"); } String location = locationHeader.getValue(); URI redirectUri = null; URI currentUri = null; try { currentUri = method.getURI(); String charset = currentUri.getProtocolCharset(); redirectUri = new URI(location, true, charset); method.setURI(redirectUri); } catch (URIException ex) { throw new XmlRpcException(ex.getMessage(), ex); } //And finally invalidate the actual authentication scheme method.getHostAuthState().invalidate(); }
protected void resetClientForRedirect() throws XmlRpcException { //get the location header to find out where to redirect to Header locationHeader = method.getResponseHeader("location"); if (locationHeader == null) { throw new XmlRpcException("Invalid redirect: Missing location header"); } String location = locationHeader.getValue(); URI redirectUri = null; URI currentUri = null; try { currentUri = method.getURI(); String charset = currentUri.getProtocolCharset(); redirectUri = new URI(location, true, charset); method.setURI(redirectUri); } catch (URIException ex) { throw new XmlRpcException(ex.getMessage(), ex); } //And finally invalidate the actual authentication scheme method.getHostAuthState().invalidate(); }