[
https://issues.apache.org/jira/browse/CXF-9153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Yue Fang resolved CXF-9153.
-----------------------------------
Fix Version/s: 4.1.3
4.0.9
3.6.8
Resolution: Fixed
> The class
> org.apache.cxf.transport.servlet.servicelist.UnformattedServiceListWriter
> does not work for RESTful destinations
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-9153
> URL: https://issues.apache.org/jira/browse/CXF-9153
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 4.0.5
> Reporter: Miroslav Chladny
> Assignee: Freeman Yue Fang
> Priority: Major
> Fix For: 4.1.3, 4.0.9, 3.6.8
>
>
> The class
> org.apache.cxf.transport.servlet.servicelist.UnformattedServiceListWriter
> does not work for RESTful destinations and needs substantial revising. I
> report the issue for version 4.0.5, however the source-code on github has not
> changed, therefore probably multiple versions (including the newest one) are
> affected. I have analyzed the source-code, not only the behavior.
> The prupose of this class is to output the list of available endpoints in raw
> form, if "formatted=false" is requested. However, there are multiple issues
> in the method {_}writeUnformattedRESTfulEndpoints{_}:
> * There is a typo in the name of properties (3 times): _descrition_ instead
> of {_}description{_}, thus the values for properties are not read at all
> * There are 3 properties: {_}wadlAvailable{_}, {_}swaggerAvailable{_}, and
> _openApiAvailable_ to test. If none of them is active a "raw output" shall
> follow. However, the method incorrectly checks for _!wadlAvailable &&
> !swaggerAvailable_ only instead of _!wadlAvailable && !swaggerAvailable
> &&!openApiAvailable_
> * If none of the properties is set and "raw output" activates, the method
> incorrectly outputs the first destination only and returns. It shall continue
> instead and report all destinations ({_}continue{_} instead of {_}return{_})
> Moreover, in the method _getContentType_ the content type _text/html_ is
> spacified. Although partially disputable, there is no reason for
> HTML-content, as the output is unformatted. If viewed by a human, under
> _text/html_ the ouput is distored (although previously raw-formatted by
> new-line symbols)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)