yahya800 / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

OAuth Java library: All HTTP status codes 2xx should be considered successful #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use OAuth on any web service that may return 2xx status codes other than 200

What is the expected output? What do you see instead?
Expected:
OAuthClient.invoke(OAuthMessage request, ParameterStyle style) works fine
Instead:
It throws an OAuthException

What version of the product are you using? On what operating system?
Revision 901 from http://oauth.googlecode.com/svn/code/java/ on Linux

Please provide any additional information below.
Easy to fix: in 
OAuthClient.invoke(OAuthMessage request, ParameterStyle style)
just replace
if (response.getHttpResponse().getStatusCode() !=
HttpResponseMessage.STATUS_OK) {
with
if (response.getHttpResponse().getStatusCode() < 200 ||
response.getHttpResponse().getStatusCode() >= 300) {

Original issue reported on code.google.com by gubler.d...@gmail.com on 25 Feb 2009 at 10:38

GoogleCodeExporter commented 9 years ago

related discussion:

http://groups.google.com/group/oauth/browse_thread/thread/b6fbab9230d79b9e

Original comment by sean%sea...@gtempaccount.com on 4 Apr 2009 at 4:31

GoogleCodeExporter commented 9 years ago
Fixed in -r939.

Original comment by jmkrist...@gmail.com on 9 Apr 2009 at 3:19