18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Exception when open IPv6 URL

ytchytch Members
edited November -1 in Sahi - Open Source
Hi,

I've tried to use sahi under IPv6 environment, and it is no problem.
but an exception will occur when I open URL like: http://[c00::10]
(This web can still open)
It is:
java.lang.NumberFormatException: For input string: ":10]:8080"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at net.sf.sahi.request.HttpRequest.setHostAndPort(HttpRequest.java:185)
        at net.sf.sahi.request.HttpRequest.<init>(HttpRequest.java:85)
        at net.sf.sahi.ProxyProcessor.getRequestFromBrowser(ProxyProcessor.java:226)
        at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:79)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

This is because in setHostAndPort function,
It just look at ":" for split host and port
but IPv6 will have ":" in host part

Comments

  • Hi ytch,

    Thanks for pointing that out. This feature will be available in the next release.

    Regards
    Sumitra
Sign In or Register to comment.