You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2007/01/05 19:08:27 UTC

[jira] Created: (HTTPCORE-22) connection close fails with SSLSocket

connection close fails with SSLSocket 
--------------------------------------

                 Key: HTTPCORE-22
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-22
             Project: HttpComponents Core
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 4.0-alpha3
         Environment: Linux, SUN JDK 1.50_09 and IBM JDK 1.4.0 J9 2.3
            Reporter: Roland Weber
         Assigned To: Roland Weber
             Fix For: 4.0-alpha4


When closing a connection, output and input streams are shut down explicitly before the socket itself is closed. IOException get ignored. SSL sockets do not implement the partial shutdown. They throw an UnsupportedOperationException, which is not ignored.

SUN stack trace:
Exception in thread "main" java.lang.UnsupportedOperationException: The method shutdownOutput() is not supported in SSLSocket
        at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.shutdownOutput(BaseSSLSocketImpl.java:192)
        at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:151)

IBM stack trace:
Exception in thread "main" java.lang.UnsupportedOperationException: The method shutdownOutput() is not supported in SSLSocket
        at com.ibm.jsse2.ic.shutdownOutput(ic.java:109)
        at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:151)
        at org.apache.http.examples.conn.OperatorConnectProxy.main(OperatorConnectProxy.java:152)

cheers,
  Roland


-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Closed: (HTTPCORE-22) connection close fails with SSLSocket

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roland Weber closed HTTPCORE-22.
--------------------------------

    Resolution: Fixed

I've added a try/catch for UnsupportedOperationException. There is only a single try/catch which contains both shutdownOutput and shutdownInput. If one isn't implemented the other one isn't either, and there is no point in triggering two exceptions.

cheers,
  Roland


> connection close fails with SSLSocket 
> --------------------------------------
>
>                 Key: HTTPCORE-22
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-22
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>         Environment: Linux, SUN JDK 1.50_09 and IBM JDK 1.4.0 J9 2.3
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>             Fix For: 4.0-alpha4
>
>
> When closing a connection, output and input streams are shut down explicitly before the socket itself is closed. IOException get ignored. SSL sockets do not implement the partial shutdown. They throw an UnsupportedOperationException, which is not ignored.
> SUN stack trace:
> Exception in thread "main" java.lang.UnsupportedOperationException: The method shutdownOutput() is not supported in SSLSocket
>         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.shutdownOutput(BaseSSLSocketImpl.java:192)
>         at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:151)
> IBM stack trace:
> Exception in thread "main" java.lang.UnsupportedOperationException: The method shutdownOutput() is not supported in SSLSocket
>         at com.ibm.jsse2.ic.shutdownOutput(ic.java:109)
>         at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:151)
>         at org.apache.http.examples.conn.OperatorConnectProxy.main(OperatorConnectProxy.java:152)
> cheers,
>   Roland

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org