omit / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

Linkedin-J Fails when calling client.updateCurrentStatus while running in Google AppEngine Java Development Environment #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run a client.updateCurrentStatus from within the Google AppEngine java dev 
environment.

What is the expected output? What do you see instead?
The expected output is the setting of the status.
Instead you get a container exception complaining about redirecting a client 
request.

What version of the product are you using? On what operating system?
1.0.335-rc2 on MAC OSX 10.6
Google Appengine dev server for Java 1.3.7

Please provide any additional information below.

Adding the following to line 1904 of BaseLinkedInApiClient.java fixes the 
problem.
1904:             request.setInstanceFollowRedirects(false);
Just before:
1905:             request.connect();

The problem is that the local HttpClient library used by appEngine (including 
1.3.7) automatically sets FollowRedirects to true, which is invalid for a PUT 
operation. 

I've only tested this with updateCurrentStatus.  Not sure about the rest of the 
API calls.

Original issue reported on code.google.com by ans...@gmail.com on 15 Sep 2010 at 12:14

GoogleCodeExporter commented 9 years ago
Thanks for reporting it. Let me have a look and find a solution.

Original comment by nabeelmukhtar on 15 Sep 2010 at 5:32