OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 599 forks source link

Failed to run POST request by openapi/ui through Skills Network environment #17048

Open gkwan-ibm opened 3 years ago

gkwan-ibm commented 3 years ago

To reproduce the problem:

gkwan-ibm commented 3 years ago

traces: jaxrs-traces.log.zip webcontainer-traces.log.zip

gkwan-ibm commented 3 years ago

We can open issue to SN network if it need to fix something.

gkwan-ibm commented 3 years ago

The problem is starting from SN. https://accountname-9080.theiadocker-1.proxy.cognitiveclass.ai/openapi/ui starts by https, it forwards to http://localhost:9080/..., and the orderCoffee endpoint use uriInfo to construct an URI to call another endpoint. That produced the scheme to be https,http,http and exception.

Phu gave us a workaround by setting <webContainer trusted="false"/> to the coffee-shop server.xml.

@pmd1nh @andymc12 you can keep this issue to fix the code to throw 400 instead of 500 error. Or, you can close this issue.

Thanks