You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Thomas Mathis (JIRA)" <ji...@apache.org> on 2007/04/20 08:36:15 UTC

[jira] Created: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

A redirect does not use the same ProtocolSocketFactory as the original method
-----------------------------------------------------------------------------

                 Key: HTTPCLIENT-648
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 3.1 RC1
            Reporter: Thomas Mathis


I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
It is the same method as I stated in the bugreport HTTPCLIENT-646


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490304 ] 

Oleg Kalnichevski commented on HTTPCLIENT-648:
----------------------------------------------

A self-contained test case that does not require an external site to run would be more preferable. Something along the lines:

http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java

You do not necessarily have to use SSL to reproduce the problem. You just have to be able to re-create the condition of HttpMethodDirector overriding the actual protocol socket factory with the default one.

Oleg

> A redirect does not use the same ProtocolSocketFactory as the original method
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-648
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>            Reporter: Thomas Mathis
>             Fix For: 3.1 Final
>
>         Attachments: TestBug_HTTPCLIENT_648.java
>
>
> I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
> The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
> I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
> It is the same method as I stated in the bugreport HTTPCLIENT-646

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

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

Oleg Kalnichevski resolved HTTPCLIENT-648.
------------------------------------------

    Resolution: Won't Fix

This issue has been fixed in HttpClient 4.0. There 's a workaround for HttpClient 3.1 (see HTTPCLIENT-634). 

Closing as WONTFIX.

Oleg

> A redirect does not use the same ProtocolSocketFactory as the original method
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-648
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>            Reporter: Thomas Mathis
>             Fix For: 3.1 Final
>
>         Attachments: TestBug_HTTPCLIENT_648.java, TestBug_HTTPCLIENT_648b.java
>
>
> I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
> The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
> I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
> It is the same method as I stated in the bugreport HTTPCLIENT-646

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490341 ] 

Oleg Kalnichevski commented on HTTPCLIENT-648:
----------------------------------------------

It would have been much nicer if you used the existing testing framework, but I can take it over from here

Oleg

> A redirect does not use the same ProtocolSocketFactory as the original method
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-648
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>            Reporter: Thomas Mathis
>             Fix For: 3.1 Final
>
>         Attachments: TestBug_HTTPCLIENT_648.java, TestBug_HTTPCLIENT_648b.java
>
>
> I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
> The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
> I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
> It is the same method as I stated in the bugreport HTTPCLIENT-646

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

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

Thomas Mathis updated HTTPCLIENT-648:
-------------------------------------

    Attachment: TestBug_HTTPCLIENT_648b.java

JUnit testcase which shows that the (non standard) ProtocolSocketFactory will be called only once - should be twice when a redirect is executed

> A redirect does not use the same ProtocolSocketFactory as the original method
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-648
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>            Reporter: Thomas Mathis
>             Fix For: 3.1 Final
>
>         Attachments: TestBug_HTTPCLIENT_648.java, TestBug_HTTPCLIENT_648b.java
>
>
> I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
> The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
> I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
> It is the same method as I stated in the bugreport HTTPCLIENT-646

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

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

Oleg Kalnichevski updated HTTPCLIENT-648:
-----------------------------------------

    Fix Version/s: 3.1 Final

Yes, this appears to be the case. I'll look into the problem unless someone else volunteers. You can speed the process up considerably by submitting a test case that reproduces the problem.

Oleg

> A redirect does not use the same ProtocolSocketFactory as the original method
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-648
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>            Reporter: Thomas Mathis
>             Fix For: 3.1 Final
>
>
> I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
> The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
> I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
> It is the same method as I stated in the bugreport HTTPCLIENT-646

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (HTTPCLIENT-648) A redirect does not use the same ProtocolSocketFactory as the original method

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

Thomas Mathis updated HTTPCLIENT-648:
-------------------------------------

    Attachment: TestBug_HTTPCLIENT_648.java

JUnit Testcase
The host and path has to be set (to existing ones)

> A redirect does not use the same ProtocolSocketFactory as the original method
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-648
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-648
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>            Reporter: Thomas Mathis
>             Fix For: 3.1 Final
>
>         Attachments: TestBug_HTTPCLIENT_648.java
>
>
> I use a GetMethod with a special ProtocolSocketFactory and execute a GetMethod where followRedirects is true. The Server has a test certificate which is trusted in the used keystore. 
> The primary GET is OK but the redirect does not use the same ProtocolSocketFactory and therefore fails because the server certificate is no longer trusted.
> I checked the code:  the ProtocolSocketFactory is replaced at HttpMethodDirector line 617 -> HostConfiguration line 315.
> It is the same method as I stated in the bugreport HTTPCLIENT-646

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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