You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sean Qiu (JIRA)" <ji...@apache.org> on 2007/01/10 04:45:27 UTC
[jira] Updated: (HARMONY-2930) [classlib][luni]java.net.Socket
cann't bind the local address when constructed with proxy
[ https://issues.apache.org/jira/browse/HARMONY-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu updated HARMONY-2930:
------------------------------
Attachment: patch.diff
> [classlib][luni]java.net.Socket cann't bind the local address when constructed with proxy
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-2930
> URL: https://issues.apache.org/jira/browse/HARMONY-2930
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Ubuntu
> Reporter: Sean Qiu
> Attachments: patch.diff
>
>
> Test:
> public void test_SocketWithProxy() throws IOException {
> //Confiure a available proxy here
> InetSocketAddress isa = new InetSocketAddress(InetAddress.getByName("Your proxy host"), 80);
> Socket socket = new Socket(new Proxy(Proxy.Type.SOCKS, isa));
> InetAddress address = InetAddress.getByName("localhost");
> int port = 23232;
> socket.bind(new InetSocketAddress(address, port));
> assertEquals(port, socket.getLocalPort());
> assertEquals(address, socket.getLocalAddress());
> }
> Result:
> RI passes
> Harmony fails
> While constructing a new socket with proxy, in contrast with RI, Harmony will keep the address and port zero.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira