lightblue-platform / lightblue-applications

GNU General Public License v3.0
5 stars 9 forks source link

Metadata mgmt: A trailing slash at the end of lightblue metadata endpoint breaks the app #99

Closed paterczm closed 9 years ago

paterczm commented 9 years ago

If you configure: serviceURI=https://lightbluemetadatasvc.dev.a1.vary.redhat.com/rest/metadata/ then metadata mgmt app will make a call like this: https://{lightblue host}/rest/metadata//termsAcknowledgement Which will result in: JBWEB000065: HTTP Status 404 - Could not find resource for relative : //termsAcknowledgement

This behavior is controlled by com.redhat.lightblue.client.http.LightblueProxyServlet, which is now deprecated. Use com.redhat.lightblue.client.http.servlet.LightblueMetadataProxyServlet instead for consistency with data-mgmt app and make sure it works with the trailing slash and without it. Note this will require configuration changes as well (serviceURI renamed to metadataServiceURI).

alechenninger commented 9 years ago

for consistency with data-mgmt app

Note that while I added these in development of the data mgmt app, it ultimately does not actually use them since it talks to LB directly.

paterczm commented 9 years ago

Ah, right. In any case, metadata-mgmt app should use the same lightblue-client.properties syntax as everything else.

alechenninger commented 9 years ago

Definitely :)

I looked into the trailing slash thing, it looks like the servlets will work regardless if url ends in trailing slash: https://github.com/lightblue-platform/lightblue-client/blob/master/http/src/test/java/com/redhat/lightblue/client/http/servlet/LightblueMetadataProxyServletTest.java#L56