Hi Brian

On Thu, Jun 9, 2011 at 1:05 AM, bks <[email protected]> wrote:
> Hi Sergey,
>
> Thanks for taking a look at this.  I just tried a few things, and I'm not
> sure we're out of the woods on this one yet ...
>
> I tried 2.4.0 previously, and there are some other components in our system
> that were not compatible (I think some Spring bits), so I have to stick with
> the 2.3.x branch for now.
>
> So I just tried with 2.3.5-SNAPSHOT, and I still have the problem,
> http://[::1]/rws/mobile/devices does not work.  However, looking at your
> most recent example, your URLs have an explicit port number.  So I tried
> http://[::1]:80/rws/mobile/devices, and that WORKED.  So I backed up to
> 2.3.1 (the version that we're currently working with), and
> http://[::1]:80/...  ALSO WORKED!
>
> I'm starting to think that the problem lies somewhere in parsing off the
> port number.  I bet there's some code in CXF that is looking for the last
> ':' character, and if it finds one, assumes that everything before it is the
> host part, and everything after is the port part.  So in the case where an
> explicit port number is specified, it will work.  This works in every case
> EXCEPT for the case where we have a IPv6 address with no explicit port; in
> that case it finds the last ':' , thinks there is a port specification, and
> then starts breaking things apart, and ends up with a broken IP adress and a
> bogus port number.
>
> Sorry I can't easily try with 2.4.x, but it looks like at least 2.3.1 ->
> 2.3.5-SNAPSHOT are behaving in this way.
>
> Are you able to try this with default port and leaving off the ":port"
> specification?
>
I started Eclipse as a root, and run the test using an embedded Jetty,
still works for me:

Server:
sf.setAddress("http://[::1]/";);
...
INFO: Started SelectChannelConnector@[::1]:80 STARTING

Client uses:
String endpointAddress ="http://[::1]/bookstore/name-in-query";

BookStore root resource prints:
http://[::1]:80/bookstore/name-in-query

I don't actually think CXF does an explicit parsing.
Are you using Tomcat or Jetty or something else ? It could be the bug
in the underlying servlet container after all.

Can you download CXF 2.3.4 source and debug CXF ServletController, add
a breakpoint in ServletController.invoke as well as in
AbstractHttpDestination.setupMessage and see if [::1] leaks somehow in
the path info part, so may be indeed it ends up with something like
'1]/bookstore/name-in-query'...My theory is that the container wrongly
reports the path info

Thanks, Sergey

> Thanks,
> Brian
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/404-with-numeric-IPv6-address-in-URL-tp4449661p4471257.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Sergey Beryozkin

Application Integration Division of Talend
http://sberyozkin.blogspot.com

Reply via email to