anunnakian / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

upgrade HttpClient library: version 3.x --> version 4 #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Background:

-- currently, openid4java uses Jakarta Commons HttpClient version 3.0.1

         trunk/lib/commons-httpclient-3.0.1.jar

-- I am planning to use openid4java (ConsumerManager) in 
   an Android application. 

-- the Android runtime uses Apache HttpClient 4

http://code.google.com/android/reference/org/apache/http/client/package-summary.
html

To faciliate the use of OpenID in Android applications, I have modified 
openid4java source code.  My changes eliminate HttpClient 3.0.1 and replace
it with HttpClient 4.

For your consideration, I am submitting my changes to the openid4java project.

I have run all openid4java unit tests against these changes. All tests pass:

$ ant clean test

    [junit] Running org.openid4java.association.AssociationTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.634 sec
    [junit] Running org.openid4java.association.DiffieHellmanSessionTest
    [junit] Tests run: 14, Failures: 0, Errors: 0, Time elapsed: 3.412 sec
    [junit] Running org.openid4java.consumer.ConsumerAssociationStoreTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.543 sec
    [junit] Running org.openid4java.consumer.EhcacheNonceVerifierTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 1.316 sec
    [junit] Running
org.openid4java.consumer.InMemoryConsumerAssociationStoreTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.549 sec
    [junit] Running org.openid4java.consumer.InMemoryNonceVerifierTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 1.221 sec
    [junit] Running org.openid4java.discovery.DiscoveryTest
    [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.459 sec
    [junit] Running org.openid4java.discovery.NormalizationTest
    [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.338 sec
    [junit] Running org.openid4java.discovery.yadis.YadisResolverTest
    [junit] Tests run: 18, Failures: 0, Errors: 0, Time elapsed: 3.318 sec
    [junit] Running org.openid4java.discovery.yadis.YadisUrlTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.194 sec
    [junit] Running org.openid4java.infocard.OpenIDTokenTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.302 sec
    [junit] Running org.openid4java.message.MessageTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.285 sec
    [junit] Running org.openid4java.message.ParameterListTest
    [junit] Tests run: 14, Failures: 0, Errors: 0, Time elapsed: 0.288 sec
    [junit] Running org.openid4java.message.ParameterTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.193 sec
    [junit] Running org.openid4java.samples.ConsumerAndProviderTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.001 sec
    [junit] Running org.openid4java.server.InMemoryServerAssociationStoreTest
    [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 4.552 sec
    [junit] Running org.openid4java.server.IncrementalNonceGeneratorTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.187 sec
    [junit] Running org.openid4java.server.RealmVerifierTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.365 sec
    [junit] Running org.openid4java.util.CyberNekoDOMHtmlParserTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.382 sec
    [junit] Running org.openid4java.util.InternetDateFormatTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.269 sec
    [mkdir] Created dir:
/Users/foobar/Documents/workspace/openid4java/build/test/junit/html
[junitreport] Processing
/Users/foobar/Documents/workspace/openid4java/build/test/junit/html/TESTS-TestSu
ites.xml
to /tmp/null1244901082
[junitreport] Loading stylesheet
jar:file:/usr/share/ant/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optiona
l/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 721ms
[junitreport] Deleting: /tmp/null1244901082

launch_browser:

BUILD SUCCESSFUL

Note:

--- currently, HttpClient 4.0 is in beta (beta 1).   

--- I can't guarantee that my modifications are bug free.
    Please review the code before committing to your project.

Files attached.

Original issue reported on code.google.com by sean%sea...@gtempaccount.com on 26 Oct 2008 at 4:15

Attachments:

GoogleCodeExporter commented 9 years ago
i would like to use openid4java in my project and my project is using 
httpclient 4.0
already. it would be great if this change is included, at least, in a branch, 
so we
could conduct tests more easily. 

to original issue reporter (sorry, i can't see ur name), to apply your change, 
the
project developer should need svn diff/patch file(s) rather than full java 
source
file. i wonder if you could provide that.

Original comment by mingfai...@gmail.com on 1 Nov 2008 at 3:27

GoogleCodeExporter commented 9 years ago
I'll take this issue.

Maybe I'll add an adapter to solve this.

Original comment by zhoushu...@gmail.com on 1 Nov 2008 at 9:48

GoogleCodeExporter commented 9 years ago
As the package name is diffrent between httpclent 3 and 4, the adapter is not 
requried,
so I create a branch 'openid4java-httpclient4' and apply the patch.

The branch should be merged to trunk after the httpclient 4 released.

Original comment by zhoushu...@gmail.com on 10 Nov 2008 at 4:23

GoogleCodeExporter commented 9 years ago
Thank you for creating the branch!

http://code.google.com/p/openid4java/source/browse/#svn/branches/openid4java-htt
pclient4

Original comment by sean%sea...@gtempaccount.com on 10 Nov 2008 at 4:30

GoogleCodeExporter commented 9 years ago
http://www.theserverside.com/news/thread.tss?thread_id=55715 - HttpClient 4 
released!

Original comment by nikolay....@gmail.com on 1 Oct 2009 at 1:18

GoogleCodeExporter commented 9 years ago

Patch file that will update the Openid4java project from HttpClient 3.1 to 
HttpClient
4.0 (final)

This patch should be applied to SVN trunk.

Original comment by sean%sea...@gtempaccount.com on 29 Oct 2009 at 3:56

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by zhoushu...@gmail.com on 6 Nov 2009 at 2:04

GoogleCodeExporter commented 9 years ago
Done, many thanks for the patch. And please check the r629.

Original comment by zhoushu...@gmail.com on 6 Nov 2009 at 5:38

GoogleCodeExporter commented 9 years ago
Three years later I've got 0.9.5 and it still requires httpclient 3.0.1.  Why 
was this never incorporated into the trunk? Am I missing something?

Original comment by rosse...@gmail.com on 29 Mar 2011 at 3:23

GoogleCodeExporter commented 9 years ago
0.9.5 is based on r593, but this patch is merged into trunk on r629.

Original comment by zhoushu...@gmail.com on 29 Mar 2011 at 3:26

GoogleCodeExporter commented 9 years ago
I've been told we can't use a patch: we need an official release. Maybe this is 
the wrong thread to ask, but will there be an official release containing that 
patch in the near future? 

We're not allowed to have more than one version of a library in our system, 
which means we'll have to downgrade other code that needs httpclient to use 
3.0.1 if we want to use openid4java.

Original comment by rosse...@gmail.com on 30 Mar 2011 at 2:08