Hi,

Carlos, thank you for your reply.

Hm, I don't see any reason why the host part should be replaced at all.

Don't you agree that this will break all "location created" for
127.0.0.1 with respect to CORS handling of the browsers?

I also did not found any specification (but I did not search too long)
that states that 127.0.0.1 needs to be replaced by localhost.

I looked at the sources who is causing the change from 127.0.0.1 to
localhost and found it:

After the line
https://github.com/apache/cxf/blob/cxf-3.2.5/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java#L83
has been executed the variable u looks like
http://127.0.0.1:8080/

After that "toAbsoluteUri" of HttpUtils is called.
That's the part of the code that replaces 127.0.0.1 by localhost
https://github.com/apache/cxf/blob/cxf-3.2.5/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java#L388-L391

The commit that added that part of code is
https://github.com/apache/cxf/commit/ebc910780b2b9b971a7c1c2e4019bdf9ec35e460#diff-1e4a62a6414e4007d2f5be9f0313c8c0R311-R314

The commit messages refers to CXF-2007 but I do not get the point why
the replacement of IP to "locahost" is done.
https://issues.apache.org/jira/browse/CXF-2007

Do I need to open a Jira ticket for CXF?
Can you ping someone of the CXF guys to read this message?

Best regards,
Markus Rathgeb

Reply via email to