Change in ovirt-engine[master]: restapi: Add null servlet

Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Add null servlet ...................................................................... restapi: Add null servlet When there is nothing mapped explicity (without patterns) to the root of the application, the servlet container assumes that requests for this root without a trailing slash correspond to a directory, and as a result it redirects, using the HTTP 302 code, to the same root with a trailing slash. For example, if the client sends this request: GET /ovirt-engine/api HTTP/1.1 The server will responds like this: HTTP/1.1 302 Found Location: https://engine.example.com/ovirt-engine/api/ This works fine for browsers, but it isn't supported by the SDKs, as they don't understand HTTP redirections. To avoid this issue this patch introduces a "null" servlet, that does nothing and is explicitly mapped to the root of the application. Change-Id: I45ddcc86b519cca6422f9347eaa18a18b305df53 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/NullServlet.java M backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml 2 files changed, 60 insertions(+), 0 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/53106 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45ddcc86b519cca6422f9347eaa18a18b305df53 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
juan.hernandez@redhat.com