| Summary: | ServiceManager#getServiceHandlerUrl should return relative URLs | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Holger Staudacher <holger.staudacher> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | hannes, jboehme, mknauer, rsternberg |
| Version: | 2.0 | ||
| Target Milestone: | 2.3 M2 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Holger Staudacher
(In reply to comment #0) > We noticed the ServiceManager#getServiceHandlerUrl always returns an absolute > path. It also seems that it ignores the "context" property of the > ApplicationConfiguration service. RWT does not depend on OSGi and knows nothing about the service property. However, the context path is taken into account, as the URL is based on the actual POST request. For example, if the context path is /context/, the URL returned by getServiceHandlerUrl() will be something like /context/servlet?servicehandler=bar&cid=cc36429c I don't see the advantage of a relative path yet. Why would that be easier for you? > So, as a result the client couldn't do anything with this url. I couldn't follow. Which part of the URL is inappropriate and why? Could you provide an example as returned by getServiceHandlerUrl() and explain what you'd expect? > I also noticed the the implementation of this method uses the context path. This > may lead to problems too e.g. when he servlet container may be behind a load > balancer or something similar. Could you explain why this could be a problem? Absolute URLs are problematic in server environments that rewrite URLs. Since servicehandler requests are handled by the RWTServlet, we should be able to use relative URLs instead. These would not require any additional rewrite rules. Fixed with https://git.eclipse.org/r/#/c/22518/ ServiceManager.getServiceHandlerUrl() now returns relative URLs in the form `?servicehandler=foo`. I think this changed has caused a regression when the client does not use cookies, please see bug#437211 . |