Vojtech Szocs has uploaded a new change for review. Change subject: webadmin: Fix REST API URL in UI plugin infra ......................................................................
webadmin: Fix REST API URL in UI plugin infra This patch ensures that UI plugin infrastructure acquires REST API session using URL: /ovirt-engine/api/ (i.e. using appropriate base context path) instead of current URL: /api/ which yields HTTP 404 response without redirect. Change-Id: I5a538036f14a823ce831375ba3323fe2a0b7b7da Signed-off-by: Vojtech Szocs <[email protected]> --- M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/04/22104/1 diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java index 20ac492..908fa41 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java @@ -4,7 +4,7 @@ import java.util.logging.Logger; import org.ovirt.engine.ui.common.system.ClientStorage; -import org.ovirt.engine.ui.frontend.utils.FrontendUrlUtils; +import org.ovirt.engine.ui.frontend.utils.BaseContextPathData; import com.google.gwt.event.shared.EventBus; import com.google.gwt.http.client.Request; @@ -71,7 +71,7 @@ // Note that the slash at the end of the URL is not just a whim. With the trailing slash the browser will only // send authentication headers to URLs ending in api/, otherwise it will send them to URLs ending in /, and // this causes problems in other applications, for example in the reports application. - this.restApiBaseUrl = FrontendUrlUtils.getRootURL() + "api/"; //$NON-NLS-1$ + this.restApiBaseUrl = BaseContextPathData.getInstance().getPath() + "api/"; //$NON-NLS-1$ } void sendRequest(RequestBuilder requestBuilder, RestApiCallback callback) { -- To view, visit http://gerrit.ovirt.org/22104 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a538036f14a823ce831375ba3323fe2a0b7b7da Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vojtech Szocs <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
