Ori Liel has posted comments on this change.

Change subject: restapi: Return Additional Info For 400 Messages (#867794)
......................................................................


Patch Set 2: Verified+1

(1 comment)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
Line 107:                  * uriInfo.getBaseUri().getPath() might be: 
/ovirt-engine/api/ (with trailing '/') or: /ovirt-engine/api
Line 108:                  * (without trailing '/') - depending on the context 
of the request. The reason for this variability is
Line 109:                  * not clear. In any case - we assume no trailing '/' 
when creating the action name, so we add a check
Line 110:                  * and eliminate the trailing slash if necessary.
Line 111:                  */
Notice this addition. I noticed that if the first build of RSDL, since the time 
the server goes up, is from an invokation inside the new exception mappers 
which I have added in this patch (as opposed to from a .../api?rsdl request), 
there's the additional '/' issue described above (see the inline comment). This 
addition takes care of that. I admit that the reason for this fluctuation 
(trailing slash or no trailing slash) is unclear to me, but it's something 
that's done by jax-rs and not us, so I don't think I can change it, all I can 
do is adjust accordingly - which is what I'm doing here.
Line 112:                 String baseUri = uriInfo.getBaseUri().getPath();
Line 113:                 if (baseUri.endsWith("/")) {
Line 114:                     baseUri = baseUri.substring(0, baseUri.length() - 
1);
Line 115:                 }


-- 
To view, visit http://gerrit.ovirt.org/23017
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7a6da4fbb00ea5f1e6919ddfe21dd7b3dd126fd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to